From 3beb3c82052f87ef9ff0d184abadc5281260ad59 Mon Sep 17 00:00:00 2001 From: Imbris Date: Tue, 18 Jan 2022 00:52:31 -0500 Subject: [PATCH] Address review comments --- common/src/comp/energy.rs | 2 +- common/src/comp/health.rs | 2 +- common/systems/src/stats.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/comp/energy.rs b/common/src/comp/energy.rs index 02ec4d76c9..037d73e416 100644 --- a/common/src/comp/energy.rs +++ b/common/src/comp/energy.rs @@ -76,7 +76,7 @@ impl Energy { /// So attempting to pass values that weren't returned from /// [`Self::needs_maximum_update`] can produce strange or unexpected /// results. - pub fn update_maximum(&mut self, maximum: u32) { + pub fn update_internal_integer_maximum(&mut self, maximum: u32) { self.maximum = maximum; // Clamp the current energy to enforce the current <= maximum invariant. self.current = self.current.min(self.maximum); diff --git a/common/src/comp/health.rs b/common/src/comp/health.rs index 89833010a8..ac771637e0 100644 --- a/common/src/comp/health.rs +++ b/common/src/comp/health.rs @@ -112,7 +112,7 @@ impl Health { /// So attempting to pass values that weren't returned from /// [`Self::needs_maximum_update`] can produce strange or unexpected /// results. - pub fn update_maximum(&mut self, maximum: u32) { + pub fn update_internal_integer_maximum(&mut self, maximum: u32) { self.maximum = maximum; // Clamp the current health to enforce the current <= maximum invariant. self.current = self.current.min(self.maximum); diff --git a/common/systems/src/stats.rs b/common/systems/src/stats.rs index ec4ec284f2..0d58c6a9e6 100644 --- a/common/systems/src/stats.rs +++ b/common/systems/src/stats.rs @@ -93,7 +93,7 @@ impl<'a> System<'a> for Sys { let stat = stats; if let Some(new_max) = health.needs_maximum_update(stat.max_health_modifiers) { - health.update_maximum(new_max); + health.update_internal_integer_maximum(new_max); } // Calculates energy scaling from stats and inventory @@ -104,7 +104,7 @@ impl<'a> System<'a> for Sys { }; if let Some(new_max) = energy.needs_maximum_update(energy_mods) { - energy.update_maximum(new_max); + energy.update_internal_integer_maximum(new_max); } }