Change mission panel icons for a couple of game styles
authorWuzzy <Wuzzy2@mail.ru>
Tue, 28 May 2019 01:28:59 +0200
changeset 15090 e16f906224fd
parent 15089 6f51c75994a4
child 15091 57f7d89067ef
Change mission panel icons for a couple of game styles
share/hedgewars/Data/Maps/TrophyRace/map.lua
share/hedgewars/Data/Scripts/Multiplayer/Frenzy.lua
share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua
share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua
share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua
share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua
--- a/share/hedgewars/Data/Maps/TrophyRace/map.lua	Tue May 28 00:48:17 2019 +0200
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua	Tue May 28 01:28:59 2019 +0200
@@ -139,11 +139,16 @@
         if not reached and x > goal_area[1] and x < goal_area[1] + goal_area[3] and y > goal_area[2] and y < goal_area[2] + goal_area[4] then -- hog is within goal rectangle
             reached = true
             local ttime = GameTime-startTime
+            local icon
             -- give it a sound ;)
             if ttime < besttime then
                 PlaySound (sndHomerun)
+                icon = 0
             elseif ttime > worsttime then
                 PlaySound (sndHellish)
+                icon = -amSkip
+            else
+                icon = 2
             end
             for i = 0, numhhs - 1 do
                 if hhs[i] == CurrentHedgehog then
@@ -194,7 +199,7 @@
             ShowMission(loc("TrophyRace"), loc("Status update"),
                 string.format(loc("Time: %.3fs by %s"), (ttime/1000), GetHogName(CurrentHedgehog))
                 .. hscore,
-                0, 0)
+                icon, 0)
             AddCaption(string.format(loc("Time: %.3fs"), (ttime/1000)), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpMessage2)
             AddCaption(loc("Track completed!"), capcolDefault, capgrpGameState)
             EndTurn(true)
--- a/share/hedgewars/Data/Scripts/Multiplayer/Frenzy.lua	Tue May 28 00:48:17 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Frenzy.lua	Tue May 28 01:28:59 2019 +0200
@@ -37,7 +37,7 @@
 
 	ShowMission(loc("FRENZY"),
                 loc("A frenetic Hedgewars mini-game"),
-                ruleSet, 0, 4000)
+                ruleSet, -amMolotov, 4000)
 
 end
 
--- a/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua	Tue May 28 00:48:17 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua	Tue May 28 01:28:59 2019 +0200
@@ -128,7 +128,7 @@
 
 function showStartingInfo()
 
-    ShowMission(loc("Mutant"), loc("A Hedgewars tag game"), rules(), 1, 5000)
+    ShowMission(loc("Mutant"), loc("A Hedgewars tag game"), rules(), -amWatermelon, 5000)
 
 end
 
@@ -465,7 +465,7 @@
     ShowMission(loc("Mutant"),
         loc("Final result"),
         string.format(loc("Winner: %s"), teamsSorted[1]) .. "| |" .. loc("Scores:") .. " |" ..
-        showScore, 0, 15000)
+        showScore, 4, 15000)
 
         -- return winning team
         return teamsSorted[1]
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Tue May 28 00:48:17 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Tue May 28 01:28:59 2019 +0200
@@ -505,10 +505,16 @@
                         totalComment = totalComment .. teamComment[i]
         end
 
+        local icon
+        if roundNumber >= roundLimit then
+                icon = 0
+        else
+                icon = 2
+        end
         ShowMission(    loc("Racer"),
                                         loc("Status update"),
                                         string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit) .. "|" .. " " .. "|" ..
-                                        loc("Best team times: ") .. "|" .. totalComment, 0, 4000)
+                                        loc("Best team times: ") .. "|" .. totalComment, icon, 4000)
 
         -- end game if its at round limit
         if roundNumber >= roundLimit then
@@ -857,7 +863,7 @@
                                 infoString = loc("Place 2 waypoints using the waypoint placement tool.")
                         end
                         ShowMission(loc("Racer"),
-                        loc("Waypoint placement phase"), infoString, 2, 4000)
+                        loc("Waypoint placement phase"), infoString, -amAirAttack, 4000)
                         AddAmmo(CurrentHedgehog, amAirAttack, 4000)
                         SetWeapon(amAirAttack)
                 end
--- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Tue May 28 00:48:17 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Tue May 28 01:28:59 2019 +0200
@@ -571,10 +571,16 @@
 	else
 		displayTime = 1
 	end
+	local icon
+	if lGameOver then
+		icon = 4
+	else
+		icon = 2
+	end
 	ShowMission(	loc("Space Invasion"),
 			statusText,
 			string.format(loc("Rounds complete: %d/%d"), SI.roundNumber, SI.roundLimit) .. "| " .. "|" ..
-			scoreText .. " |" ..entireC, 4, displayTime)
+			scoreText .. " |" ..entireC, icon, displayTime)
 
 	if lGameOver then
 		local winnerTeam = teamStats[1].name
@@ -1136,7 +1142,7 @@
 				loc("Toggle Shield: [Long jump]") .. "|" ..
 				loc("Radar Ping: [High jump]") .. "|" ..
 
-				"", 4, 5000
+				"", 8, 5000
 				)
 
 	CreateMeSomeCircles()
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Tue May 28 00:48:17 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Tue May 28 01:28:59 2019 +0200
@@ -399,12 +399,18 @@
 		end
 	end
 
+	local icon
+	if roundNumber >= roundLimit then
+		icon = 0
+	else
+		icon = 2
+	end
 	ShowMission(loc("TechRacer"),
 		loc("Status update"),
 		string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit) .. "| |" ..
 		loc("Best team times: ") .. "|" ..
 		totalComment,
-		0, 4000)
+		icon, 4000)
 
 	-- end game if its at round limit
 	if roundNumber >= roundLimit then
--- a/share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua	Tue May 28 00:48:17 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua	Tue May 28 01:28:59 2019 +0200
@@ -671,7 +671,7 @@
 			clockStr ..
 			loc("Ammo is reset at the end of your turn.") .. "|" ..
 
-			"", 4, 4000
+			"", -amMine, 4000
 			)
 
 end