ACF10: Show proper messages when everyone dies
authorWuzzy <Wuzzy2@mail.ru>
Mon, 17 Jun 2019 19:33:43 +0200
changeset 15173 e1dbe2c9026f
parent 15172 9d4a6ab60dec
child 15174 f532203c5ceb
ACF10: Show proper messages when everyone dies If everyone died, the game cannot continue, but you still win (since it's a sandbox mission).
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua	Mon Jun 17 19:20:02 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua	Mon Jun 17 19:33:43 2019 +0200
@@ -497,3 +497,8 @@
     SetAnimSkip(true)
   end
 end
+
+function onGameResult(winner)
+  AddCaption(loc("Game over!"), capcolDefault, capgrpGameState)
+  SendStat(siGameResult, loc("You have successfully finished the campaign!"))
+end