Add proper temperature reset command #39
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
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:
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.
The text was updated successfully, but these errors were encountered: