From 87659d843ec5397a3833bf13d883bb7fb9d763f7 Mon Sep 17 00:00:00 2001 From: Phoenicia Date: Wed, 24 Apr 2024 08:28:57 +0100 Subject: [PATCH] Reverted renamed variables --- scripts/Addicted/System.reds | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/Addicted/System.reds b/scripts/Addicted/System.reds index 390b3fbc..0f1266f3 100644 --- a/scripts/Addicted/System.reds +++ b/scripts/Addicted/System.reds @@ -192,24 +192,24 @@ public class AddictedSystem extends ScriptableSystem { E(s"no consumption tracked during prologue"); return; } - let previousThreshold: Threshold; - let newConsumption: Int32; + let before: Threshold; + let amount: Int32; let hint: Bool; - let newThreshold: Threshold; + let after: Threshold; let daysPast: Int32; if Generic.IsAddictive(id) { let usedToday = this.DaysSinceLastConsumption(Generic.Consumable(id)) == 0; if this.consumptions.KeyExist(itemID) { let consumption: ref = this.consumptions.Get(itemID); - previousThreshold = Helper.Threshold(consumption.current); - newConsumption = Min(consumption.current + Helper.Potency(itemID, usedToday), 100); + before = Helper.Threshold(consumption.current); + amount = Min(consumption.current + Helper.Potency(itemID, usedToday), 100); } else { - previousThreshold = Threshold.Clean; - newConsumption = Helper.Potency(itemID, usedToday); + before = Threshold.Clean; + amount = Helper.Potency(itemID, usedToday); } - newThreshold = Helper.Threshold(newConsumption); - hint = this.Consume(itemID, newConsumption); + after = Helper.Threshold(amount); + hint = this.Consume(itemID, amount); let consumable: Consumable = Generic.Consumable(id); if NotEquals(EnumInt(consumable), EnumInt(Consumable.Invalid)) { @@ -224,7 +224,7 @@ public class AddictedSystem extends ScriptableSystem { if hint { this.Hint(id); } - if NotEquals(EnumInt(previousThreshold), EnumInt(newThreshold)) { + if NotEquals(EnumInt(before), EnumInt(after)) { if Generic.IsHealer(id) { this.UpdateHealingChargeDuration(this.player); } this.CheckWarn(); }