Hide player ranks in training missions
authorWuzzy <Wuzzy2@mail.ru>
Wed, 15 May 2019 03:25:20 +0200
changeset 14972 c173fae0a223
parent 14971 ef3352839616
child 14973 8e4e508d153c
Hide player ranks in training missions
ChangeLog.txt
share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua
--- a/ChangeLog.txt	Wed May 15 03:00:14 2019 +0200
+++ b/ChangeLog.txt	Wed May 15 03:25:20 2019 +0200
@@ -104,6 +104,7 @@
  + More intelligent automatic mission selection in campaign screen
  + New data directory for video thumbnails: Data/VideoThumbnails
  + Display a warning when the same key is used multiple times
+ + Stats screen now hides empty sections
  * Fix broken handling of /watch chat command on official server
  * Fix renaming a video leading to loss of thumbnail after restart
  * Fix controls list failing to display correct key names with regards to keyboard layout
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Wed May 15 03:00:14 2019 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Wed May 15 03:25:20 2019 +0200
@@ -53,6 +53,7 @@
 	SetEffect(hog, heResurrectable, 1)
 
 	SendHealthStatsOff()
+	SendRankingStatsOff()
 end
 
 function onGearResurrect(gear, vGear)
@@ -228,7 +229,6 @@
 		end
 		SendStat(siCustomAchievement, loc("Good job!"))
 		SendStat(siGameResult, loc("You have completed the Basic Bazooka Training!"))
-		SendStat(siPlayerKills, "0", GetHogTeamName(hog))
 		EndGame()
 		SetState(hog, gstWinner)
 		gameOver = true
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Wed May 15 03:00:14 2019 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Wed May 15 03:25:20 2019 +0200
@@ -215,7 +215,6 @@
 
 	SendStat(siGameResult, loc("You have finished the Flying Saucer Training!"))
 	SendStat(siCustomAchievement, loc("Good job!"))
-	SendStat(siPlayerKills, "0", GetHogTeamName(Player))
 
 	EndTurn(true)
 	EndGame()
@@ -416,6 +415,7 @@
 
 function onGameStart()
 	SendHealthStatsOff()
+	SendRankingStatsOff()
 
 	-- Girder near first crate
 	PlaceGirder(1257, 204, 6)
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Wed May 15 03:00:14 2019 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Wed May 15 03:25:20 2019 +0200
@@ -45,6 +45,7 @@
 	SetEffect(hog, heResurrectable, 1)
 
 	SendHealthStatsOff()
+	SendRankingStatsOff()
 end
 
 function onGearResurrect(gear, vGear)
@@ -197,7 +198,6 @@
 		end
 		SendStat(siCustomAchievement, loc("Good job!"))
 		SendStat(siGameResult, loc("You have completed the Basic Grenade Training!"))
-		SendStat(siPlayerKills, "0", GetHogTeamName(hog))
 		EndGame()
 		gameOver = true
 		SetState(hog, gstWinner)
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua	Wed May 15 03:00:14 2019 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua	Wed May 15 03:25:20 2019 +0200
@@ -154,6 +154,7 @@
 	end
 	
 	SendHealthStatsOff()
+	SendRankingStatsOff()
 end
 
 local function LoadGearData()
@@ -265,7 +266,6 @@
 	SendStat(siGameResult, loc("You have completed the Basic Movement Training!"))
 	SendStat(siCustomAchievement, loc("Congratulations!"))
 	SendStat(siCustomAchievement, loc("Return to the training menu by pressing the “Go back” button."))
-	SendStat(siPlayerKills, "0", GetHogTeamName(hog_greenhorn))
 	PlaySound(sndVictory, CurrentHedgehog)
 	-- Disable controls, end game
 	SetInputMask(0)
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Wed May 15 03:00:14 2019 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Wed May 15 03:25:20 2019 +0200
@@ -105,6 +105,7 @@
 	drawMap()
 
 	SendHealthStatsOff()
+	SendRankingStatsOff()
 
 end
 
@@ -378,7 +379,6 @@
 			AddAmmo(hog, amRope, 0)
 			SendStat(siCustomAchievement, loc("Oh yeah! You sure know how to rope!"))
 			SendStat(siGameResult, loc("You have finished the Basic Rope Training!"))
-			SendStat(siPlayerKills, "0", teamName)
 			EndGame()
 			SetState(hog, gstWinner)
 			gameOver = true