diff --git a/About/About.xml b/About/About.xml index f61d3519..2ec6f2ae 100644 --- a/About/About.xml +++ b/About/About.xml @@ -70,6 +70,7 @@ rw-chaos: German translation (update) Marcos Villar: Portuguese (Brazilian) translation (update) CrapoFR: French translation update maarxx: Fix for settings persistance bug, add unassign training option, add restrict wool/milkable option +rimpy-custom: Fix for Russian translation <size=24>Version</size> This is version 4.25.600, for RimWorld 1.1.2566. diff --git a/Assemblies/Fluffy_ColonyManager.dll b/Assemblies/Fluffy_ColonyManager.dll index bb8b7cd9..6434b2c5 100644 Binary files a/Assemblies/Fluffy_ColonyManager.dll and b/Assemblies/Fluffy_ColonyManager.dll differ diff --git a/Readme.md b/Readme.md index 0990c942..99618e40 100644 --- a/Readme.md +++ b/Readme.md @@ -57,6 +57,7 @@ In theory there is no real limit to the number of manager jobs that can be creat - Marcos Villar: Portuguese (Brazilian) translation (update) - CrapoFR: French translation update - maarxx: Fix for settings persistance bug, add unassign training option, add restrict wool/milkable option + - rimpy-custom: Fix for Russian translation # Think you found a bug? Please read [this guide](http://steamcommunity.com/sharedfiles/filedetails/?id=725234314) before creating a bug report, diff --git a/Source/ManagerTabs/ManagerTab_Power.cs b/Source/ManagerTabs/ManagerTab_Power.cs index 88d174e1..467785fd 100644 --- a/Source/ManagerTabs/ManagerTab_Power.cs +++ b/Source/ManagerTabs/ManagerTab_Power.cs @@ -176,11 +176,18 @@ public override void Tick() // update the history tracker. var trade = GetCurrentTrade(); tradingHistory.Update( trade ); - overallHistory.Update( trade.Where( i => i > 0 ).Sum(), trade.Where( i => i < 0 ).Sum( Math.Abs ), + overallHistory.Update( trade.Where( i => i > 0 ).Sum(), trade.Where( i => i < 0 ).Sum( SafeAbs ), GetCurrentBatteries().Sum() ); } } + private static int SafeAbs( int value ) + { + if ( value >= 0 ) return value; + if ( value == int.MinValue ) return int.MaxValue; + return -value; + } + private void DrawConsumption( Rect canvas ) { // setup rects