Use crown icon in mission panel for King Mode
authorWuzzy <Wuzzy2@mail.ru>
Tue, 28 May 2019 01:58:42 +0200
changeset 15075 57f7d89067ef
parent 15074 e16f906224fd
child 15076 dc236bcd7309
Use crown icon in mission panel for King Mode
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Tue May 28 01:28:59 2019 +0200
+++ b/hedgewars/uWorld.pas	Tue May 28 01:58:42 2019 +0200
@@ -189,10 +189,10 @@
     g:= LuaGoals + '|';
 
 // check different game flags
-g:= AddGoal(g, gfPlaceHog, gidPlaceHog); // placement?
 g:= AddGoal(g, gfKing, gidKing); // king?
 if ((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) then
     g:= AddGoal(g, gfAny, gidPlaceKing);
+g:= AddGoal(g, gfPlaceHog, gidPlaceHog); // placement?
 g:= AddGoal(g, gfTagTeam, gidTagTeam); // tag team mode?
 g:= AddGoal(g, gfSharedAmmo, gidSharedAmmo); // shared ammo?
 g:= AddGoal(g, gfPerHogAmmo, gidPerHogAmmo);
@@ -230,7 +230,13 @@
 
 // if the string has been set, show it for (default timeframe) seconds
 if length(g) > 0 then
-    ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);
+    // choose icon
+    if ((GameFlags and gfKing) <> 0) then
+        // crown icon for King Mode
+        ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 0, 0)
+    else
+        // target icon for anything else
+        ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);
 
 //cWaveWidth:= SpritesData[sprWater].Width;
 //cWaveHeight:= SpritesData[sprWater].Height;