Engine:
authorsmxx
Mon, 01 Mar 2010 19:20:43 +0000
changeset 2904 209a0c573917
parent 2903 e28356fe532a
child 2905 f3c79f7193a9
Engine: * Show modified mine timer as a game mode/setting
hedgewars/uLocale.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Locale/de.txt
share/hedgewars/Data/Locale/en.txt
--- a/hedgewars/uLocale.pas	Mon Mar 01 18:01:09 2010 +0000
+++ b/hedgewars/uLocale.pas	Mon Mar 01 19:20:43 2010 +0000
@@ -40,7 +40,7 @@
 
 	TGoalStrId = (gidCaption, gidSubCaption, gidForts, gidLowGravity, gidInvulnerable,
 			gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery,
-			gidSolidLand, gidSharedAmmo);
+			gidSolidLand, gidSharedAmmo, gidMineTimer);
 
 const MAX_EVENT_STRINGS = 100;
 var trammo: array[TAmmoStrId] of string;
--- a/hedgewars/uWorld.pas	Mon Mar 01 18:01:09 2010 +0000
+++ b/hedgewars/uWorld.pas	Mon Mar 01 19:20:43 2010 +0000
@@ -77,10 +77,22 @@
     cp: PClan;
     g: ansistring;
 
-    // helper function to create the goal/game mode string
+    // helper functions to create the goal/game mode string
+    function AddGoal(s: ansistring; gf: LongInt; si: TGoalStrId; i: LongInt): ansistring;
+    var t: string;
+    begin
+        if (GameFlags and gf) <> 0 then
+            begin
+            t:= inttostr(i);
+            s:= s + format(trgoal[si], t) + '|'
+            end;
+        AddGoal:= s;
+    end;
+
     function AddGoal(s: ansistring; gf: LongInt; si: TGoalStrId): ansistring;
     begin
-        if (GameFlags and gf) <> 0 then s:= s + trgoal[si] + '|';
+        if (GameFlags and gf) <> 0 then
+            s:= s + trgoal[si] + '|';
         AddGoal:= s;
     end;
 begin
@@ -117,6 +129,7 @@
 g:= AddGoal(g, gfArtillery, gidArtillery); // artillery?
 g:= AddGoal(g, gfSolidLand, gidSolidLand); // solid land?
 g:= AddGoal(g, gfSharedAmmo, gidSharedAmmo); // shared ammo?
+if cMinesTime <> 3000 then g:= AddGoal(g, gfMines, gidMineTimer, cMinesTime div 1000); // changed mine timer?
 // if the string has been set, show it for (default timeframe) seconds
 if g <> '' then ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);
 
--- a/share/hedgewars/Data/Locale/de.txt	Mon Mar 01 18:01:09 2010 +0000
+++ b/share/hedgewars/Data/Locale/de.txt	Mon Mar 01 19:20:43 2010 +0000
@@ -258,3 +258,4 @@
 05:09=Artillerie: Deine Igel können nicht laufen
 05:10=Unzerstörbares Terrain: Explosionen zerstören den Boden nicht
 05:11=Gemeinsames Arsenal: Alle Teams gleicher Farbe teilen sich ihr Arsenal
+05:12=Minenzünder: Minen explodieren nach %1 Sekunde(n)
--- a/share/hedgewars/Data/Locale/en.txt	Mon Mar 01 18:01:09 2010 +0000
+++ b/share/hedgewars/Data/Locale/en.txt	Mon Mar 01 19:20:43 2010 +0000
@@ -460,3 +460,4 @@
 05:09=Artillery: Hogs can't walk to change position
 05:10=Indestructible Terrain: Most weapons won't destroy terrain
 05:11=Shared Ammo: All teams of the same color share their ammunition
+05:12=Mine timers: Mines will detonated after %1 second(s)