From 14130b39877213c8e4b0e8c0c54309563a754fff Mon Sep 17 00:00:00 2001 From: Louis Hong Date: Tue, 29 Oct 2024 06:02:49 -0700 Subject: [PATCH] last known mould/crucible score now clear after picking up preform (stage == 0) --- .../easygiantsfoundry/EasyGiantsFoundryPlugin.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/toofifty/easygiantsfoundry/EasyGiantsFoundryPlugin.java b/src/main/java/com/toofifty/easygiantsfoundry/EasyGiantsFoundryPlugin.java index 6ed742e..2b7e404 100644 --- a/src/main/java/com/toofifty/easygiantsfoundry/EasyGiantsFoundryPlugin.java +++ b/src/main/java/com/toofifty/easygiantsfoundry/EasyGiantsFoundryPlugin.java @@ -354,6 +354,14 @@ public class EasyGiantsFoundryPlugin extends Plugin 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 // if heat varbit updated and the user clicked, start the state-machine if (event.getVarbitId() == VARBIT_HEAT && state.heatingCoolingState.getActionName() != null)