hedgewars/uWorld.pas
changeset 2904 209a0c573917
parent 2903 e28356fe532a
child 2905 f3c79f7193a9
--- 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);