last known mould/crucible score now clear after picking up preform (stage == 0)

This commit is contained in:
Louis Hong
2024-10-29 06:02:49 -07:00
parent f1edc659fa
commit 14130b3987

View File

@@ -354,6 +354,14 @@ public class EasyGiantsFoundryPlugin extends Plugin
reputation = client.getVarpValue(REPUTATION_VARBIT); reputation = client.getVarpValue(REPUTATION_VARBIT);
} }
// STAGE becomes 0 again after player picks up the preform
if (event.getVarbitId() == VARBIT_GAME_STAGE && event.getValue() == 0)
{
// clear out the current and soon to be previous scores.
state.setLastKnownCrucibleScore(-1);
state.setMouldScore(-1);
}
// start the heating state-machine when the varbit updates // start the heating state-machine when the varbit updates
// if heat varbit updated and the user clicked, start the state-machine // if heat varbit updated and the user clicked, start the state-machine
if (event.getVarbitId() == VARBIT_HEAT && state.heatingCoolingState.getActionName() != null) if (event.getVarbitId() == VARBIT_HEAT && state.heatingCoolingState.getActionName() != null)