Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper temperature reset command #39

Open
nsporillo opened this issue Oct 2, 2019 · 2 comments
Open

Add proper temperature reset command #39

nsporillo opened this issue Oct 2, 2019 · 2 comments
Labels
Accepted Good issue, working on a solution enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nsporillo
Copy link
Owner

GlobalWarming works by taking the cumulative carbon scores on a per world basis and translating that into a temperature based on the configurable models files.

Right now we support a /gw debug temp <value> command which will manually override the worlds temperature by calculating the score that the desired temperature matches to and setting the worlds score in the database. However, we track a detailed record of player contributions and reductions which are linked to furnace and tree tables.
This means that player scores remain what they are, so scoreboards and GW commands will show scores which do not add up to the current global carbon score.

Ideally we'd have this temperature reset command not destroy the referential integrity of the database. We can probably assume that if one wishes to reset the temperature, then they are okay with erasing all of the player contributions and reductions. The typical suggested workaround for when server owners want to reset their world is to:

  1. Shutdown the server
  2. Manually delete the H2 database files
  3. Restart the server

However if the owner is not using H2 and is instead using MySQL.. this is a more involved process. We want this command to simply purge all relevant tables and reload the internal GlobalWarming storage such that it is fully consistent.

@nsporillo nsporillo added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers Accepted Good issue, working on a solution labels Oct 2, 2019
@tizzymac
Copy link

tizzymac commented Oct 3, 2019

Hi, can I take this?

@nsporillo
Copy link
Owner Author

@tizzymac Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Good issue, working on a solution enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Development

No branches or pull requests

2 participants