ACF5: Fix incorrect ammo display on turn start at wave 3
authorWuzzy <Wuzzy2@mail.ru>
Mon, 17 Jun 2019 20:55:11 +0200
changeset 15172 dc94bb5990a0
parent 15171 2765731b378b
child 15173 21e87882df1c
ACF5: Fix incorrect ammo display on turn start at wave 3
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Mon Jun 17 20:27:34 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Mon Jun 17 20:55:11 2019 +0200
@@ -1192,11 +1192,14 @@
       wave3TurnsLeft = 7
     end
     if wave3TurnsLeft > 0 then
-      AddCaption(string.format(loc("Turns until arrival: %d"), wave3TurnsLeft))
+      -- Workaround for the FIXME below: Use capgrpAmmoinfo to overwrite the incorrect ammo display
+      AddCaption(string.format(loc("Turns until arrival: %d"), wave3TurnsLeft), capcolDefault, capgrpAmmoinfo)
     end
   end
   if deployedHog then
     if GetHogTeamName(CurrentHedgehog) == nativesTeamName then
+      -- FIXME: This screws up the selected weapon caption, as
+      -- this function does not update the selected display caption (workaround above)
       AnimSwitchHog(deployedHog)
     end
   end