Store campaign victories in campaign variable "Won"
authorWuzzy <almikes@aol.com>
Tue, 03 May 2016 22:56:26 +0200
changeset 11949 079d687671b2
parent 11948 6da9bb4b3449
child 11950 3792a9f9fa9c
Store campaign victories in campaign variable "Won"
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua	Tue May 03 22:26:39 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua	Tue May 03 22:56:26 2016 +0200
@@ -403,6 +403,7 @@
   if progress and progress<9 then
     SaveCampaignVar("Progress", "9")
   end
+  SaveCampaignVar("Won", "true")
   DismissTeam(loc("011101001"))
   TurnTimeLeft = 0
 end
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Tue May 03 22:26:39 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Tue May 03 22:56:26 2016 +0200
@@ -151,6 +151,7 @@
 
 function heroWin(gear)
 	saveCompletedStatus(7)
+	SaveCampaignVar("Won", "true")
 	SendStat(siGameResult, loc("Congratulations, you have saved Hogera!"))
 	SendStat(siCustomAchievement, loc("Hogera is safe!"))
 	SendStat(siPlayerKills,'1',teamA.name)