From 03f907c4d0a505c7143b586b8df26b76de23915d Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sun, 10 Sep 2023 15:41:17 -0700 Subject: [PATCH] Rename floating energy --> excess energy --- proto/apl.proto | 4 ++-- sim/druid/feral/apl_values.go | 21 ++++++++++--------- .../individual_sim_ui/apl_values.ts | 8 +++---- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/proto/apl.proto b/proto/apl.proto index 87616fcd20..f4410a1000 100644 --- a/proto/apl.proto +++ b/proto/apl.proto @@ -128,7 +128,7 @@ message APLValue { // Class or Spec-specific values APLValueTotemRemainingTime totem_remaining_time = 49; - APLValueCatFloatingEnergy cat_floating_energy = 52; + APLValueCatExcessEnergy cat_excess_energy = 52; } } @@ -402,5 +402,5 @@ message APLValueSequenceTimeToReady { message APLValueTotemRemainingTime { ShamanTotems.TotemType totem_type = 1; } -message APLValueCatFloatingEnergy { +message APLValueCatExcessEnergy { } \ No newline at end of file diff --git a/sim/druid/feral/apl_values.go b/sim/druid/feral/apl_values.go index 0a0a8878d3..c8c76d8a94 100644 --- a/sim/druid/feral/apl_values.go +++ b/sim/druid/feral/apl_values.go @@ -9,27 +9,27 @@ import ( func (cat *FeralDruid) NewAPLValue(rot *core.APLRotation, config *proto.APLValue) core.APLValue { switch config.Value.(type) { - case *proto.APLValue_CatFloatingEnergy: - return cat.newValueCatFloatingEnergy(rot, config.GetCatFloatingEnergy()) + case *proto.APLValue_CatExcessEnergy: + return cat.newValueCatExcessEnergy(rot, config.GetCatExcessEnergy()) default: return nil } } -type APLValueCatFloatingEnergy struct { +type APLValueCatExcessEnergy struct { core.DefaultAPLValueImpl cat *FeralDruid } -func (cat *FeralDruid) newValueCatFloatingEnergy(rot *core.APLRotation, config *proto.APLValueCatFloatingEnergy) core.APLValue { - return &APLValueCatFloatingEnergy{ +func (cat *FeralDruid) newValueCatExcessEnergy(rot *core.APLRotation, config *proto.APLValueCatExcessEnergy) core.APLValue { + return &APLValueCatExcessEnergy{ cat: cat, } } -func (value *APLValueCatFloatingEnergy) Type() proto.APLValueType { +func (value *APLValueCatExcessEnergy) Type() proto.APLValueType { return proto.APLValueType_ValueTypeFloat } -func (value *APLValueCatFloatingEnergy) GetFloat(sim *core.Simulation) float64 { +func (value *APLValueCatExcessEnergy) GetFloat(sim *core.Simulation) float64 { cat := value.cat pendingPool := PoolingActions{} pendingPool.create(4) @@ -61,8 +61,9 @@ func (value *APLValueCatFloatingEnergy) GetFloat(sim *core.Simulation) float64 { pendingPool.sort() - return pendingPool.calcFloatingEnergy(cat, sim) + floatingEnergy := pendingPool.calcFloatingEnergy(cat, sim) + return cat.CurrentEnergy() - floatingEnergy } -func (value *APLValueCatFloatingEnergy) String() string { - return "Cat Floating Energy()" +func (value *APLValueCatExcessEnergy) String() string { + return "Cat Excess Energy()" } diff --git a/ui/core/components/individual_sim_ui/apl_values.ts b/ui/core/components/individual_sim_ui/apl_values.ts index 9cd6612f22..9cd539c237 100644 --- a/ui/core/components/individual_sim_ui/apl_values.ts +++ b/ui/core/components/individual_sim_ui/apl_values.ts @@ -63,7 +63,7 @@ import { APLValueNextRuneCooldown, APLValueNumberTargets, APLValueTotemRemainingTime, - APLValueCatFloatingEnergy, + APLValueCatExcessEnergy, } from '../../proto/apl.js'; import { EventID } from '../../typed_event.js'; @@ -896,11 +896,11 @@ const valueKindFactories: {[f in NonNullable]: ValueKindConfig, isPrepull: boolean) => player.spec == Spec.SpecFeralDruid, fields: [ ],