# HG changeset patch # User Periklis Ntanasis # Date 1379551769 -10800 # Node ID 8a691e0f117ae2a6d9dcd613c39d94e5f19a5c5b # Parent b08c8bde57e3f4a1b2c4bbaae283f7587915221e use consts for TStatInfo enum diff -r b08c8bde57e3 -r 8a691e0f117a hedgewars/uScript.pas --- a/hedgewars/uScript.pas Thu Sep 19 02:33:23 2013 +0300 +++ b/hedgewars/uScript.pas Thu Sep 19 03:49:29 2013 +0300 @@ -1291,7 +1291,7 @@ var i : LongInt; var color : shortstring; begin - statInfo := TStatInfoType(GetEnumValue(TypeInfo(TStatInfoType),lua_tostring(L, 1))); + statInfo := TStatInfoType(lua_tointeger(L, 1)); if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) and (statInfo <> siClanHealth)) then begin @@ -2299,6 +2299,7 @@ var at : TGearType; vgt: TVisualGearType; am : TAmmoType; + si : TStatInfoType; st : TSound; he : THogEffect; cg : TCapGroup; @@ -2381,6 +2382,9 @@ for am:= Low(TAmmoType) to High(TAmmoType) do ScriptSetInteger(EnumToStr(am), ord(am)); +for si:= Low(TStatInfoType) to High(TStatInfoType) do + ScriptSetInteger(EnumToStr(si), ord(si)); + for he:= Low(THogEffect) to High(THogEffect) do ScriptSetInteger(EnumToStr(he), ord(he)); diff -r b08c8bde57e3 -r 8a691e0f117a hedgewars/uUtils.pas --- a/hedgewars/uUtils.pas Thu Sep 19 02:33:23 2013 +0300 +++ b/hedgewars/uUtils.pas Thu Sep 19 03:49:29 2013 +0300 @@ -31,6 +31,7 @@ function EnumToStr(const en : TVisualGearType) : shortstring; overload; function EnumToStr(const en : TSound) : shortstring; overload; function EnumToStr(const en : TAmmoType) : shortstring; overload; +function EnumToStr(const en : TStatInfoType) : shortstring; overload; function EnumToStr(const en : THogEffect) : shortstring; overload; function EnumToStr(const en : TCapGroup) : shortstring; overload; @@ -150,6 +151,11 @@ EnumToStr:= GetEnumName(TypeInfo(TAmmoType), ord(en)) end; +function EnumToStr(const en : TStatInfoType) : shortstring; overload; +begin +EnumToStr:= GetEnumName(TypeInfo(TStatInfoType), ord(en)) +end; + function EnumToStr(const en: THogEffect) : shortstring; overload; begin EnumToStr := GetEnumName(TypeInfo(THogEffect), ord(en)) diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Thu Sep 19 03:49:29 2013 +0300 @@ -359,10 +359,10 @@ -- player climbed the moon with rope FollowGear(doctor.gear) AnimSay(doctor.gear, loc("One cannot simply walk in moon with rope!"), SAY_SHOUT, 4000) - SendStat('siGameResult', loc("This is the wrong way!")) --1 - SendStat('siCustomAchievement', loc("Collect the crate with the flying saucer")) --11 - SendStat('siCustomAchievement', loc("Fly to the moon")) --11 - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("This is the wrong way!")) + SendStat(siCustomAchievement, loc("Collect the crate with the flying saucer")) + SendStat(siCustomAchievement, loc("Fly to the moon")) + SendStat(siPlayerKills,'0',teamC.name) EndGame() else if checkPointReached ~= 5 then @@ -559,18 +559,18 @@ end function sendStats(planet) - SendStat('siGameResult', loc("Hog Solo arrived to "..planet)) --1 - SendStat('siCustomAchievement', loc("Return to the mission menu by pressing the \"Go back\" button")) --11 - SendStat('siCustomAchievement', loc("Choose another planet by replaying the mission")) --11 - SendStat('siPlayerKills','1',teamC.name) + SendStat(siGameResult, loc("Hog Solo arrived to "..planet)) + SendStat(siCustomAchievement, loc("Return to the mission menu by pressing the \"Go back\" button")) + SendStat(siCustomAchievement, loc("Choose another planet by replaying the mission")) + SendStat(siPlayerKills,'1',teamC.name) EndGame() end function sendStatsOnRetry() - SendStat('siGameResult', loc("You have to travel again")) --1 - SendStat('siCustomAchievement', loc("Your first destination is moon in order to get more fuels")) --11 - SendStat('siCustomAchievement', loc("You have to complete the moon main mission in order to travel to other planets")) --11 - SendStat('siCustomAchievement', loc("You have to be careful and not die!")) --11 - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("You have to travel again")) + SendStat(siCustomAchievement, loc("Your first destination is moon in order to get more fuels")) + SendStat(siCustomAchievement, loc("You have to complete the moon main mission in order to travel to other planets")) + SendStat(siCustomAchievement, loc("You have to be careful and not die!")) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Thu Sep 19 03:49:29 2013 +0300 @@ -264,22 +264,22 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("To win the game you have to eliminate all your enemies")) --11 - SendStat('siPlayerKills','1',teamC.name) - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies")) + SendStat(siPlayerKills,'1',teamC.name) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end function enemiesDeath(gear) saveCompletedStatus(6) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("You have successfuly eliminated Professor Hogevil")) --11 - SendStat('siCustomAchievement', loc("You have rescued H and Dr.Cornelius")) --11 - SendStat('siCustomAchievement', loc("You have acquired the last part")) --11 - SendStat('siCustomAchievement', loc("Now go and play the menu mission to complete the campaign")) --11 - SendStat('siPlayerKills','1',teamA.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("You have successfuly eliminated Professor Hogevil")) + SendStat(siCustomAchievement, loc("You have rescued H and Dr.Cornelius")) + SendStat(siCustomAchievement, loc("You have acquired the last part")) + SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign")) + SendStat(siPlayerKills,'1',teamA.name) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Thu Sep 19 03:49:29 2013 +0300 @@ -176,20 +176,20 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("You have to eliminate all the enemies")) --11 - SendStat('siCustomAchievement', loc("Read the Challenge Objectives from within the mission for more details")) --11 - SendStat('siPlayerKills','1',teamB.name) - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siPlayerKills,'1',teamB.name) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end function heroWin(gear) saveBonus(3, 4) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("You complete the mission in "..TotalRounds.." rounds")) --11 - SendStat('siCustomAchievement', loc("The next 4 times you'll play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) --11 - SendStat('siPlayerKills','1',teamA.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) + SendStat(siCustomAchievement, loc("The next 4 times you'll play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) + SendStat(siPlayerKills,'1',teamA.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Thu Sep 19 03:49:29 2013 +0300 @@ -348,12 +348,12 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("To win the game you have to find the right crate")) --11 - SendStat('siCustomAchievement', loc("You can avoid some battles")) --11 - SendStat('siCustomAchievement', loc("Use your ammo wisely")) --11 - SendStat('siPlayerKills','1',teamB.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("To win the game you have to find the right crate")) + SendStat(siCustomAchievement, loc("You can avoid some battles")) + SendStat(siCustomAchievement, loc("Use your ammo wisely")) + SendStat(siPlayerKills,'1',teamB.name) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end @@ -504,10 +504,10 @@ -- end game saveCompletedStatus(5) AnimSay(hero.gear, loc("Hoo Ray!!!"), SAY_SHOUT, 5000) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("To win the game you had to collect the 2 crates with no specific order")) --11 - SendStat('siPlayerKills','1',teamC.name) - SendStat('siPlayerKills','0',teamB.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order")) + SendStat(siPlayerKills,'1',teamC.name) + SendStat(siPlayerKills,'0',teamB.name) EndGame() end end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Thu Sep 19 03:49:29 2013 +0300 @@ -139,19 +139,19 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("To win the game you have to go to the surface")) --11 - SendStat('siCustomAchievement', loc("Most mines are not active")) --11 - SendStat('siCustomAchievement', loc("From the second turn and beyond the water rises")) --11 - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("To win the game you have to go to the surface")) + SendStat(siCustomAchievement, loc("Most mines are not active")) + SendStat(siCustomAchievement, loc("From the second turn and beyond the water rises")) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end function heroSafe(gear) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("You have escaped successfully")) --11 - SendStat('siCustomAchievement', loc("Your escape took you "..TotalRounds.." turns")) --11 - SendStat('siPlayerKills','1',teamA.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("You have escaped successfully")) + SendStat(siCustomAchievement, loc("Your escape took you "..TotalRounds.." turns")) + SendStat(siPlayerKills,'1',teamA.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Thu Sep 19 03:49:29 2013 +0300 @@ -208,19 +208,19 @@ function win() saveBonus(1, 1) - SendStat('siGameResult', loc("Congratulations, you are the best!")) --1 - SendStat('siCustomAchievement', loc("You have destroyed all the targets")) --11 - SendStat('siCustomAchievement', loc("You are indeed the best PAotH pilot")) --11 - SendStat('siCustomAchievement', loc("Next you play \"Searching in the dust\" you'll have an RC plane available")) --11 - SendStat('siPlayerKills','1',teamA.name) + SendStat(siGameResult, loc("Congratulations, you are the best!")) + SendStat(siCustomAchievement, loc("You have destroyed all the targets")) + SendStat(siCustomAchievement, loc("You are indeed the best PAotH pilot")) + SendStat(siCustomAchievement, loc("Next you play \"Searching in the dust\" you'll have an RC plane available")) + SendStat(siPlayerKills,'1',teamA.name) EndGame() end function gameOver() - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("You have to destroy all the targets")) --11 - SendStat('siCustomAchievement', loc("You will fail if you run out of ammo and there are still targets available")) --11 - SendStat('siCustomAchievement', loc("Read the Challenge Objectives from within the mission for more details")) --11 - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("You have to destroy all the targets")) + SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Thu Sep 19 03:49:29 2013 +0300 @@ -139,15 +139,15 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("You have to destroy all the explosives without dying!")) --11 - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("You have to destroy all the explosives without dying!")) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end function heroWin(gear) - SendStat('siGameResult', loc("Congratulations, you have saved Hogera!")) --1 - SendStat('siCustomAchievement', loc("Hogera is safe!")) --11 - SendStat('siPlayerKills','1',teamA.name) + SendStat(siGameResult, loc("Congratulations, you have saved Hogera!")) + SendStat(siCustomAchievement, loc("Hogera is safe!")) + SendStat(siPlayerKills,'1',teamA.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Thu Sep 19 03:49:29 2013 +0300 @@ -328,22 +328,22 @@ function battleWin(gear) -- add stats saveVariables() - SendStat('siGameResult', loc("Green Bananas won!")) --1 - SendStat('siCustomAchievement', loc("You have eliminated all the visible enemy hogs!")) --11 - SendStat('siPlayerKills','1',teamA.name) - SendStat('siPlayerKills','1',teamB.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Green Bananas won!")) + SendStat(siCustomAchievement, loc("You have eliminated all the visible enemy hogs!")) + SendStat(siPlayerKills,'1',teamA.name) + SendStat(siPlayerKills,'1',teamB.name) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end function escapeWin(gear) -- add stats saveVariables() - SendStat('siGameResult', loc("Hog Solo escaped successfully!")) --1 - SendStat('siCustomAchievement', loc("You have reached the flying area successfully!")) --11 - SendStat('siPlayerKills','1',teamA.name) - SendStat('siPlayerKills','0',teamB.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Hog Solo escaped successfully!")) + SendStat(siCustomAchievement, loc("You have reached the flying area successfully!")) + SendStat(siPlayerKills,'1',teamA.name) + SendStat(siPlayerKills,'0',teamB.name) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end @@ -433,21 +433,21 @@ function gameLost() if chooseToBattle then - SendStat('siGameResult', loc("Green Bananas lost, try again!")) --1 - SendStat('siCustomAchievement', loc("You have to eliminate all the visible enemies")) --11 - SendStat('siCustomAchievement', loc("5 additional enemies will be spawned during the game")) --11 - SendStat('siCustomAchievement', loc("You are controlling all the active ally units")) --11 - SendStat('siCustomAchievement', loc("The ally units share their ammo")) --11 - SendStat('siCustomAchievement', loc("Try to keep as many allies alive as possible")) --11 + SendStat(siGameResult, loc("Green Bananas lost, try again!")) + SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies")) + SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game")) + SendStat(siCustomAchievement, loc("You are controlling all the active ally units")) + SendStat(siCustomAchievement, loc("The ally units share their ammo")) + SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible")) else - SendStat('siGameResult', loc("Hog Solo couldn't escape, try again!")) --1 - SendStat('siCustomAchievement', loc("You have to get to the most left land and remove any enemy hog from there")) --11 - SendStat('siCustomAchievement', loc("You will play every 3 turns")) --11 - SendStat('siCustomAchievement', loc("Green hogs won't intenionally hurt you")) --11 + SendStat(siGameResult, loc("Hog Solo couldn't escape, try again!")) + SendStat(siCustomAchievement, loc("You have to get to the most left land and remove any enemy hog from there")) + SendStat(siCustomAchievement, loc("You will play every 3 turns")) + SendStat(siCustomAchievement, loc("Green hogs won't intenionally hurt you")) end - SendStat('siPlayerKills','1',teamC.name) - SendStat('siPlayerKills','0',teamA.name) - SendStat('siPlayerKills','0',teamB.name) + SendStat(siPlayerKills,'1',teamC.name) + SendStat(siPlayerKills,'0',teamA.name) + SendStat(siPlayerKills,'0',teamB.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Thu Sep 19 03:49:29 2013 +0300 @@ -375,15 +375,15 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("To win the game Hog Solo has to get the bottom crates and come back to the surface")) --11 - SendStat('siCustomAchievement', loc("You can use the other 2 hogs to assist you")) --11 + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("To win the game Hog Solo has to get the bottom crates and come back to the surface")) + SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you")) if tookPartInBattle then - SendStat('siCustomAchievement', loc("You'll have to eliminate the Strawberry Assasins at the end")) --11 + SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assasins at the end")) else - SendStat('siCustomAchievement', loc("You'll have to eliminate Captain Lime at the end")) --11 + SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end")) end - SendStat('siPlayerKills','0',teamA.name) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end @@ -426,22 +426,22 @@ function captainLimeDeath(gear) -- hero win in scenario of escape in 1st part saveCompletedStatus(3) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("You retrieved the lost part")) --11 - SendStat('siCustomAchievement', loc("You defended yourself against Captain Lime")) --11 - SendStat('siPlayerKills','1',teamA.name) - SendStat('siPlayerKills','0',teamB.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("You retrieved the lost part")) + SendStat(siCustomAchievement, loc("You defended yourself against Captain Lime")) + SendStat(siPlayerKills,'1',teamA.name) + SendStat(siPlayerKills,'0',teamB.name) EndGame() end function redTeamDeath(gear) -- hero win in battle scenario saveCompletedStatus(3) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("You retrieved the lost part")) --11 - SendStat('siCustomAchievement', loc("You defended yourself against Strawberry Assasins")) --11 - SendStat('siPlayerKills','1',teamA.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("You retrieved the lost part")) + SendStat(siCustomAchievement, loc("You defended yourself against Strawberry Assasins")) + SendStat(siPlayerKills,'1',teamA.name) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Thu Sep 19 03:49:29 2013 +0300 @@ -202,20 +202,20 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("You have to eliminate all the enemies")) --11 - SendStat('siCustomAchievement', loc("Read the Challenge Objectives from within the mission for more details")) --11 - SendStat('siPlayerKills','1',teamB.name) - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siPlayerKills,'1',teamB.name) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end function heroWin(gear) saveBonus(2, 1) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("You complete the mission in "..TotalRounds.." rounds")) --11 - SendStat('siCustomAchievement', loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission")) --11 - SendStat('siPlayerKills','1',teamA.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) + SendStat(siCustomAchievement, loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission")) + SendStat(siPlayerKills,'1',teamA.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Thu Sep 19 03:49:29 2013 +0300 @@ -414,12 +414,12 @@ end function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("To win the game you have to go next to Thanta")) --11 - SendStat('siCustomAchievement', loc("Most of the time you'll be able to use only the icegun")) --11 - SendStat('siCustomAchievement', loc("Use the bazooka and the flying saucer to get the icegun")) --11 - SendStat('siPlayerKills','1',teamB.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta")) + SendStat(siCustomAchievement, loc("Most of the time you'll be able to use only the icegun")) + SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun")) + SendStat(siPlayerKills,'1',teamB.name) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end @@ -440,13 +440,13 @@ end function thantaDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("Noooo, Thanta has to stay alive!")) --11 - SendStat('siCustomAchievement', loc("To win the game you have to go next to Thanta")) --11 - SendStat('siCustomAchievement', loc("Most of the time you'll be able to use only the icegun")) --11 - SendStat('siCustomAchievement', loc("Use the bazooka and the flying saucer to get the icegun")) --11 - SendStat('siPlayerKills','1',teamB.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("Noooo, Thanta has to stay alive!")) + SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta")) + SendStat(siCustomAchievement, loc("Most of the time you'll be able to use only the icegun")) + SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun")) + SendStat(siPlayerKills,'1',teamB.name) + SendStat(siPlayerKills,'0',teamC.name) EndGame() end @@ -505,10 +505,10 @@ function actionsOnWin() saveCompletedStatus(4) - SendStat('siGameResult', loc("Congratulations, you got the part!")) --1 - SendStat('siCustomAchievement', loc("At the end of the game your health was ")..GetHealth(hero.gear)) --11 + SendStat(siGameResult, loc("Congratulations, you got the part!")) + SendStat(siCustomAchievement, loc("At the end of the game your health was ")..GetHealth(hero.gear)) -- maybe add number of tries for each part? - SendStat('siPlayerKills','1',teamC.name) - SendStat('siPlayerKills','0',teamB.name) + SendStat(siPlayerKills,'1',teamC.name) + SendStat(siPlayerKills,'0',teamB.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua Thu Sep 19 03:49:29 2013 +0300 @@ -135,11 +135,11 @@ totalTime = totalTime / 1000 local saucersLeft = GetAmmoCount(hero.gear, amJetpack) local saucersUsed = totalSaucers - saucersLeft - SendStat('siGameResult', loc("Hoo Ray! You are a champion!")) --1 - SendStat('siCustomAchievement', loc("You complete the mission in "..totalTime.." seconds")) --11 - SendStat('siCustomAchievement', loc("You have used "..saucersUsed.." flying saucers")) --11 - SendStat('siCustomAchievement', loc("You had "..saucersLeft.." more flying saucers left")) --11 - SendStat('siPlayerKills','1',teamA.name) + SendStat(siGameResult, loc("Hoo Ray! You are a champion!")) + SendStat(siCustomAchievement, loc("You complete the mission in "..totalTime.." seconds")) + SendStat(siCustomAchievement, loc("You have used "..saucersUsed.." flying saucers")) + SendStat(siCustomAchievement, loc("You had "..saucersLeft.." more flying saucers left")) + SendStat(siPlayerKills,'1',teamA.name) EndGame() end end @@ -257,11 +257,11 @@ end function heroLost() - SendStat('siGameResult', loc("Oh man! Learn how to fly!")) --1 - SendStat('siCustomAchievement', loc("To win the game you have to pass into the rings in time")) --11 - SendStat('siCustomAchievement', loc("You'll get extra time in case you need it when you pass a ring")) --11 - SendStat('siCustomAchievement', loc("Every 2 rings you'll get extra flying saucers")) --11 - SendStat('siCustomAchievement', loc("Use space button twice to change flying saucer while being on air")) --11 - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Oh man! Learn how to fly!")) + SendStat(siCustomAchievement, loc("To win the game you have to pass into the rings in time")) + SendStat(siCustomAchievement, loc("You'll get extra time in case you need it when you pass a ring")) + SendStat(siCustomAchievement, loc("Every 2 rings you'll get extra flying saucers")) + SendStat(siCustomAchievement, loc("Use space button twice to change flying saucer while being on air")) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Thu Sep 19 03:49:29 2013 +0300 @@ -328,10 +328,10 @@ end function heroDeath(gear) - SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 - SendStat('siCustomAchievement', loc("You have to get the weapons and rescue the PAotH researchers")) --11 - SendStat('siPlayerKills','1',teamC.name) - SendStat('siPlayerKills','0',teamD.name) + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("You have to get the weapons and rescue the PAotH researchers")) + SendStat(siPlayerKills,'1',teamC.name) + SendStat(siPlayerKills,'0',teamD.name) EndGame() end @@ -364,11 +364,11 @@ AnimWait(hero.gear,5000) saveCompletedStatus(1) - SendStat('siGameResult', loc("Hog Solo win, conrgatulations!")) --1 - SendStat('siCustomAchievement', loc("Eliminated the professor Hogevil")) --11 - SendStat('siCustomAchievement', loc("Drove the minions away")) --11 - SendStat('siPlayerKills','1',teamD.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Hog Solo win, conrgatulations!")) + SendStat(siCustomAchievement, loc("Eliminated the professor Hogevil")) + SendStat(siCustomAchievement, loc("Drove the minions away")) + SendStat(siPlayerKills,'1',teamD.name) + SendStat(siPlayerKills,'0',teamC.name) SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels EndGame() end @@ -381,11 +381,11 @@ AnimWait(hero.gear,5000) saveCompletedStatus(1) - SendStat('siGameResult', loc("Congratulations, you won!")) --1 - SendStat('siCustomAchievement', loc("Eliminated the evil minions")) --11 - SendStat('siCustomAchievement', loc("Drove the professor away")) --11 - SendStat('siPlayerKills','1',teamD.name) - SendStat('siPlayerKills','0',teamC.name) + SendStat(siGameResult, loc("Congratulations, you won!")) + SendStat(siCustomAchievement, loc("Eliminated the evil minions")) + SendStat(siCustomAchievement, loc("Drove the professor away")) + SendStat(siPlayerKills,'1',teamD.name) + SendStat(siPlayerKills,'0',teamC.name) SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels EndGame() end diff -r b08c8bde57e3 -r 8a691e0f117a share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Thu Sep 19 02:33:23 2013 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Thu Sep 19 03:49:29 2013 +0300 @@ -216,18 +216,18 @@ end function lose() - SendStat('siGameResult', loc("Too slow! Try again...")) --1 - SendStat('siCustomAchievement', loc("You have to caught the other hog 3 times")) --11 - SendStat('siCustomAchievement', loc("The time that you'll have left when you reach the hog will be added to the next turn")) --11 - SendStat('siCustomAchievement', loc("Each turn you'll have only one rope to use")) --11 - SendStat('siCustomAchievement', loc("You'll lose if you die or if your time is up")) --11 - SendStat('siPlayerKills','0',teamA.name) + SendStat(siGameResult, loc("Too slow! Try again...")) + SendStat(siCustomAchievement, loc("You have to caught the other hog 3 times")) + SendStat(siCustomAchievement, loc("The time that you'll have left when you reach the hog will be added to the next turn")) + SendStat(siCustomAchievement, loc("Each turn you'll have only one rope to use")) + SendStat(siCustomAchievement, loc("You'll lose if you die or if your time is up")) + SendStat(siPlayerKills,'0',teamA.name) EndGame() end function win() - SendStat('siGameResult', loc("Congratulations, you are the fastest!")) --1 - SendStat('siCustomAchievement', loc("You have managed to caught the other hog in time")) --11 - SendStat('siPlayerKills','1',teamA.name) + SendStat(siGameResult, loc("Congratulations, you are the fastest!")) + SendStat(siCustomAchievement, loc("You have managed to caught the other hog in time")) + SendStat(siPlayerKills,'1',teamA.name) EndGame() end