display caption for ammotype amNothing when switched to so that players know what just happened
authorsheepluva
Sun, 02 Jan 2011 13:54:28 +0100
changeset 4807 180dbfb13903
parent 4806 48c1a395f0a7
child 4808 7c3e5b52344a
display caption for ammotype amNothing when switched to so that players know what just happened
hedgewars/uAmmos.pas
hedgewars/uLocale.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
share/hedgewars/Data/Locale/de.txt
share/hedgewars/Data/Locale/en.txt
--- a/hedgewars/uAmmos.pas	Sat Jan 01 23:10:57 2011 +0100
+++ b/hedgewars/uAmmos.pas	Sun Jan 02 13:54:28 2011 +0100
@@ -320,15 +320,12 @@
 
     with CurWeapon^ do
         begin
-        if AmmoType <> amNothing then
-            begin
-            s:= trammo[Ammoz[AmmoType].NameId];
-            if (Count <> AMMO_INFINITE) and not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0)) then
-                s:= s + ' (' + IntToStr(Count) + ')';
-            if (Propz and ammoprop_Timerable) <> 0 then
-                s:= s + ', ' + IntToStr(Timer div 1000) + ' ' + trammo[sidSeconds];
-            AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo);
-            end;
+        s:= trammo[Ammoz[AmmoType].NameId];
+        if (Count <> AMMO_INFINITE) and not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0)) then
+            s:= s + ' (' + IntToStr(Count) + ')';
+        if (Propz and ammoprop_Timerable) <> 0 then
+            s:= s + ', ' + IntToStr(Timer div 1000) + ' ' + trammo[sidSeconds];
+        AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo);
         if (Propz and ammoprop_NeedTarget) <> 0
             then begin
             Gear^.State:= Gear^.State or      gstHHChooseTarget;
--- a/hedgewars/uLocale.pas	Sat Jan 01 23:10:57 2011 +0100
+++ b/hedgewars/uLocale.pas	Sun Jan 02 13:54:28 2011 +0100
@@ -44,7 +44,6 @@
     loaded: boolean;
 begin
 loaded:= false;
-trammo[sidNothing]:= ' ';
 for e:= Low(TEventId) to High(TEventId) do first[e]:= true;
 
 {$I-} // iochecks off
@@ -69,7 +68,7 @@
        TryDo(s[6] = '=', 'Load locale: "=" expected', true);
        Delete(s, 1, 6);
        case a of
-           0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b+1)]:= s;
+           0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b)]:= s;
            1: if (b >=0) and (b <= ord(High(TMsgStrId))) then trmsg[TMsgStrId(b)]:= s;
            2: if (b >=0) and (b <= ord(High(TEventId))) then begin
                TryDo(trevt_n[TEventId(b)] < MAX_EVENT_STRINGS, 'Too many event strings in ' + IntToStr(a) + ':' + IntToStr(b), false);
@@ -81,8 +80,8 @@
                trevt[TEventId(b)][trevt_n[TEventId(b)]]:= s;
                inc(trevt_n[TEventId(b)]);
                end;
-           3: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammoc[TAmmoStrId(b+1)]:= s;
-           4: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammod[TAmmoStrId(b+1)]:= s;
+           3: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammoc[TAmmoStrId(b)]:= s;
+           4: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammod[TAmmoStrId(b)]:= s;
            5: if (b >=0) and (b <= ord(High(TGoalStrId))) then trgoal[TGoalStrId(b)]:= s;
            end;
        end;
--- a/hedgewars/uTypes.pas	Sat Jan 01 23:10:57 2011 +0100
+++ b/hedgewars/uTypes.pas	Sun Jan 02 13:54:28 2011 +0100
@@ -334,7 +334,7 @@
             TurnNumber: LongWord;
             end;
 
-     TAmmoStrId = (sidNothing, sidGrenade, sidClusterBomb, sidBazooka, sidBee, sidShotgun,
+     TAmmoStrId = (sidGrenade, sidClusterBomb, sidBazooka, sidBee, sidShotgun,
             sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle,
             sidDynamite, sidBaseballBat, sidFirePunch, sidSeconds,
             sidParachute, sidAirAttack, sidMineStrike, sidBlowTorch,
@@ -344,7 +344,7 @@
             sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower,
-            sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball);
+            sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing);
 
     TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
--- a/hedgewars/uVariables.pas	Sat Jan 01 23:10:57 2011 +0100
+++ b/hedgewars/uVariables.pas	Sun Jan 02 13:54:28 2011 +0100
@@ -1981,7 +1981,7 @@
             PosSprite: sprAmAirplane;
             ejectX: 0;
             ejectY: 0),
-// Snowball
+// Snowball/Mudball
             (NameId: sidSnowball;
             NameTex: nil;
             Probability: 0;
--- a/share/hedgewars/Data/Locale/de.txt	Sat Jan 01 23:10:57 2011 +0100
+++ b/share/hedgewars/Data/Locale/de.txt	Sun Jan 02 13:54:28 2011 +0100
@@ -50,6 +50,9 @@
 00:47=Haftmine
 00:48=Hammer
 00:49=Totenbeschwörung
+00:50=Bohr-Luftangriff
+00:51=Schlammball
+00:52=Keine Waffe ausgewählt
 
 
 01:00=Auf in die Schlacht!
--- a/share/hedgewars/Data/Locale/en.txt	Sat Jan 01 23:10:57 2011 +0100
+++ b/share/hedgewars/Data/Locale/en.txt	Sun Jan 02 13:54:28 2011 +0100
@@ -52,6 +52,7 @@
 00:49=Resurrector
 00:50=Drill Strike
 00:51=Mudball
+00:52=No weapon selected
 
 01:00=Let's fight!
 01:01=Round draw