diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2023-10-21 17:44:17 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2023-10-21 17:44:17 +0200 |
commit | fc89b01224150bd0e4e32e92494539e890dc90ae (patch) | |
tree | a5ffe286559b66c2115fbac86bfe7ba1701d57dc /lib/colonial_twilight/forces.rb | |
parent | 23073ffb11a0a8ea1437933618b98e8d18b2f7b1 (diff) | |
download | colonial-twilight-fc89b01224150bd0e4e32e92494539e890dc90ae.zip colonial-twilight-fc89b01224150bd0e4e32e92494539e890dc90ae.tar.gz |
Forces : #update_control return true if changed
Diffstat (limited to 'lib/colonial_twilight/forces.rb')
-rw-r--r-- | lib/colonial_twilight/forces.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/colonial_twilight/forces.rb b/lib/colonial_twilight/forces.rb index 2048a00..4991c89 100644 --- a/lib/colonial_twilight/forces.rb +++ b/lib/colonial_twilight/forces.rb @@ -130,8 +130,9 @@ module ColonialTwilight end def update_control - return if @control.nil? + return nil if @control.nil? + ctr = @control @control = ( case gov <=> fln when 0 then :uncontrolled @@ -139,6 +140,7 @@ module ColonialTwilight when -1 then :FLN end ) + @control != ctr end end end |