Expose the gotten achievements of Bamboo Thicked and Dangerous Ducklings in the stats screen
authorWuzzy <Wuzzy2@mail.ru>
Thu, 26 Oct 2017 05:25:45 +0200
changeset 12771 957e4e2e2802
parent 12770 cf1377ab2f89
child 12772 b6deecd79d27
Expose the gotten achievements of Bamboo Thicked and Dangerous Ducklings in the stats screen Also fix Basic rope training captions. The string freeze is maintained. Only existing strings are used.
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Bamboo_Thicket.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua
--- a/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Bamboo_Thicket.lua	Thu Oct 26 04:10:57 2017 +0200
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Bamboo_Thicket.lua	Thu Oct 26 05:25:45 2017 +0200
@@ -80,7 +80,9 @@
 		ShowMission(loc("Bamboo Thicket"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
 		
 		if (turnNumber < 6) and (firedShell == false) then
-			AddCaption(string.format(loc("Achievement gotten: %s"), loc("Energetic Engineer")),0xffba00ff,capgrpMessage2)
+			local achievementString = string.format(loc("Achievement gotten: %s"), loc("Energetic Engineer"))
+			AddCaption(achievementString, 0xffba00ff, capgrpMessage2)
+			SendStat(siCustomAchievement, achievementString)
 		end
 
 	elseif gear == player then
--- a/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.lua	Thu Oct 26 04:10:57 2017 +0200
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.lua	Thu Oct 26 05:25:45 2017 +0200
@@ -136,7 +136,9 @@
 		elseif (gear == instructor) and (GetY(gear) > WaterLine) then
 			HogSay(player, loc("See ya!"), SAY_THINK)
 			TurnTimeLeft = 3000
-			AddCaption(string.format(loc("Achievement gotten: %s"), loc("Naughty Ninja")) ,0xffba00ff,capgrpMessage2)
+			local achievementString = string.format(loc("Achievement gotten: %s"), loc("Naughty Ninja"))
+			AddCaption(achievementString, 0xffba00ff, capgrpMessage2)
+			SendStat(siCustomAchievement, achievementString)
 			DismissTeam(loc("Blue Team"))
 			gameWon = true
 		elseif gear == enemy then
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Thu Oct 26 04:10:57 2017 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Thu Oct 26 05:25:45 2017 +0200
@@ -36,10 +36,10 @@
 	Info( loc("Congratulations"), loc("Congratulations! You've completed the Basic Rope Training!"), 0 ) -- Congrats
 	PlaySound( sndVictory, Player )
 
-	AddCaption( loc( "Victory!" ))
+	AddCaption( loc( "Victory!" ), 0xFFFFFFFF, capgrpGameState)
 	if TurnTimeLeft >= 250000 then -- If you very fast, unlock the ahievement "Rope Master!"
 		RopeMaster = true
-		AddCaption( string.format(loc("Achievement gotten: %s"), loc("Rope Master") ),0xffba00ff,capgrpAmmoinfo )
+		AddCaption( string.format(loc("Achievement gotten: %s"), loc("Rope Master") ), 0xffba00ff, capgrpMessage2)
 		PlaySound( sndHomerun )
 	end
 	Objective = true