From a2cd5e8966557058b1a12585e7f15911473e6a8f Mon Sep 17 00:00:00 2001 From: InvalidArgument3 Date: Wed, 11 Sep 2024 21:40:52 -0500 Subject: [PATCH] put some climbing cost related stuff back to floats for a cleaner diff in the future --- TLBGridPoints/Data/Scripts/ShipPoints/AllGridsList.cs | 2 +- .../Data/Scripts/ShipPoints/BuildingBlockPoints.cs | 4 ++-- .../Data/Scripts/ShipPoints/ShipTracking/GridStats.cs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TLBGridPoints/Data/Scripts/ShipPoints/AllGridsList.cs b/TLBGridPoints/Data/Scripts/ShipPoints/AllGridsList.cs index a08029d..49a2d80 100644 --- a/TLBGridPoints/Data/Scripts/ShipPoints/AllGridsList.cs +++ b/TLBGridPoints/Data/Scripts/ShipPoints/AllGridsList.cs @@ -461,7 +461,7 @@ public void Draw() } } - public static void ClimbingCostRename(ref string blockDisplayName, ref double climbingCostMultiplier) // Double instead of float. + public static void ClimbingCostRename(ref string blockDisplayName, ref float climbingCostMultiplier) // Double instead of float. { if (I._climbingCostFunction == null) return; var results = I._climbingCostFunction.Invoke(blockDisplayName); diff --git a/TLBGridPoints/Data/Scripts/ShipPoints/BuildingBlockPoints.cs b/TLBGridPoints/Data/Scripts/ShipPoints/BuildingBlockPoints.cs index b4d5a7c..ed9aed6 100644 --- a/TLBGridPoints/Data/Scripts/ShipPoints/BuildingBlockPoints.cs +++ b/TLBGridPoints/Data/Scripts/ShipPoints/BuildingBlockPoints.cs @@ -56,7 +56,7 @@ private void UpdateHud(MyHudBlockInfo blockInfo) string blockDisplayName = blockInfo.BlockName; - double thisClimbingCostMult = 0; + float thisClimbingCostMult = 0; AllGridsList.ClimbingCostRename(ref blockDisplayName, ref thisClimbingCostMult); // Use double instead of float. _pointsMessage.Message.Clear(); @@ -65,7 +65,7 @@ private void UpdateHud(MyHudBlockInfo blockInfo) _pointsMessage.Message.Append($" +{(blockPoints * thisClimbingCostMult)}bp/b"); // Even though this is here, the tooltip will not be visible - _pointsMessage.Visible = false; // Ensures the HUD is never displayed + //_pointsMessage.Visible = false; // Ensures the HUD is never displayed } } } diff --git a/TLBGridPoints/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs b/TLBGridPoints/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs index 4d3af57..2749289 100644 --- a/TLBGridPoints/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs +++ b/TLBGridPoints/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs @@ -218,7 +218,7 @@ private void UpdateGlobalStats() if (!AllGridsList.PointValues.ContainsKey(block.BlockDefinition.SubtypeName)) continue; - double ignored = 0; + float ignored = 0; AllGridsList.ClimbingCostRename(ref blockDisplayName, ref ignored); ShipTracker.SpecialBlockRename(ref blockDisplayName, block); if (!SpecialBlockCounts.ContainsKey(blockDisplayName)) @@ -251,7 +251,7 @@ private void UpdateWeaponStats() // Check for WeaponCore weapons if (AllGridsList.PointValues.TryGetValue(block.BlockDefinition.SubtypeName, out weaponPoints) && WcApi.HasCoreWeapon((MyEntity)block)) { - double thisClimbingCostMult = 0; + float thisClimbingCostMult = 0; AllGridsList.ClimbingCostRename(ref weaponDisplayName, ref thisClimbingCostMult); AddWeaponCount(weaponDisplayName); continue; @@ -296,7 +296,7 @@ private void CalculateCost(IMyCubeBlock block) if (blockPoints == 0) return; var blockDisplayName = block.DefinitionDisplayNameText; - double climbingCostMultiplier = 0; // Updated name + float climbingCostMultiplier = 0; // Updated name AllGridsList.ClimbingCostRename(ref blockDisplayName, ref climbingCostMultiplier); // DEBUG: Check multiplier