Make the HedgeEditor mission output strings collectable by translation scripts
authorWuzzy <Wuzzy2@mail.ru>
Fri, 31 May 2019 19:02:42 +0200
changeset 15088 9aa1ab824ec7
parent 15087 ea443499ad8a
child 15089 24994035a0e0
Make the HedgeEditor mission output strings collectable by translation scripts
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Fri May 31 18:35:26 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Fri May 31 19:02:42 2019 +0200
@@ -2260,33 +2260,33 @@
 	WriteLnToConsole("")
 	WriteLnToConsole("	if victoryObj > 0 then ")
 	WriteLnToConsole("		if victoryObj == 1 then ")
-	WriteLnToConsole("			vComment = loc(\"- Destroy the red target\") .. \"|\"")
+	WriteLnToConsole([[			vComment = loc("- Destroy the red target") .. "|"]])
 	WriteLnToConsole("		else ")
-	WriteLnToConsole("			vComment = loc(\"- Destroy the red targets\") .. \"|\"")
+	WriteLnToConsole([[			vComment = loc("- Destroy the red targets") .. "|"]])
 	WriteLnToConsole("		end")
 	WriteLnToConsole("	end")
 	WriteLnToConsole("")
 	WriteLnToConsole("	if collectObj > 0 then ")
 	WriteLnToConsole("		if collectObj == 1 then ")
-	WriteLnToConsole("			collectComment = loc(\"- Collect the blue crate\") .. \"|\"")
+	WriteLnToConsole([[			collectComment = loc("- Collect the blue crate") .. "|"]])
 	WriteLnToConsole("		else ")
-	WriteLnToConsole("			collectComment = loc(\"- Collect all the blue crates\") .. \"|\"")
+	WriteLnToConsole([[			collectComment = loc("- Collect all the blue crates") .. "|"]])
 	WriteLnToConsole("		end")
 	WriteLnToConsole("	end")
 	WriteLnToConsole("")
 	WriteLnToConsole("	if (collectObj == 0) and (victoryObj == 0) then")
-	WriteLnToConsole("		vComment = loc(\"- Destroy the enemy\") .. \"|\"")
+	WriteLnToConsole([[		vComment = loc("- Destroy the enemy") .. "|"]])
 	WriteLnToConsole("	end")
 	WriteLnToConsole("")
 	WriteLnToConsole("	if failObj > 0 then ")
 	WriteLnToConsole("		if failObj == 1 then ")
-	WriteLnToConsole("			fComment = loc(\"- The green target must survive\") .. \"|\"")
+	WriteLnToConsole([[			fComment = loc("- The green target must survive") .. "|"]])
 	WriteLnToConsole("		else ")
-	WriteLnToConsole("			fComment = loc(\"- The green targets must survive\") .. \"|\"")
+	WriteLnToConsole([[			fComment = loc("- The green targets must survive") .. "|"]])
 	WriteLnToConsole("		end")
 	WriteLnToConsole("	end")
 	WriteLnToConsole("")
-	WriteLnToConsole("	ShowMission(loc(\"User Mission\"), loc(\"Mission\"), collectComment .. vComment .. fComment, 1, 0)")
+	WriteLnToConsole([[	ShowMission(loc("User Mission"), loc("Mission"), collectComment .. vComment .. fComment, 1, 0)]])
 	WriteLnToConsole("")
 	WriteLnToConsole("end")
 
@@ -2337,12 +2337,12 @@
 	WriteLnToConsole("")
 	WriteLnToConsole("			if (c ==  \"victory\") and (GetHogLevel(hhs[i]) ~= 0) then")
 	WriteLnToConsole("				DismissTeam(GetHogTeamName(hhs[i]))")
-	WriteLnToConsole("				AddCaption(loc(\"Victory!\"), capcolDefault, capgrpGameState)")
-	WriteLnToConsole("				ShowMission(loc(\"User Mission\"), loc(\"Mission\"), loc(\"Mission succeeded!\"), 0, 0)")
+	WriteLnToConsole([[				AddCaption(loc("Victory!"), capcolDefault, capgrpGameState)]])
+	WriteLnToConsole([[				ShowMission(loc("User Mission"), loc("Mission"), loc("Mission succeeded!"), 0, 0)]])
 	WriteLnToConsole("			elseif (c ==  \"failure\") and (GetHogLevel(hhs[i]) == 0) then")
 	WriteLnToConsole("				DismissTeam(GetHogTeamName(hhs[i]))")
-	WriteLnToConsole("				AddCaption(loc(\"Defeat!\"), capcolDefault, capgrpGameState)")
-	WriteLnToConsole("				ShowMission(loc(\"User Mission\"), loc(\"Mission\"), loc(\"Mission failed!\"), -amSkip, 0)")
+	WriteLnToConsole([[				AddCaption(loc("Defeat!"), capcolDefault, capgrpGameState)]])
+	WriteLnToConsole([[				ShowMission(loc("User Mission"), loc("Mission"), loc("Mission failed!"), -amSkip, 0)]])
 	WriteLnToConsole("			elseif (c ==  \"victory\") and (GetHogLevel(hhs[i]) == 0) then")
 	WriteLnToConsole("				PlaySound(sndVictory,hhs[i]) -- check if we actually need this")
 	WriteLnToConsole("			end")