Use player team name in ACF campaign
authorWuzzy <Wuzzy2@mail.ru>
Fri, 21 Dec 2018 01:43:21 +0100
changeset 14486 f8c2b995c009
parent 14485 f37910a73c19
child 14487 d72fb761aa59
Use player team name in ACF campaign
share/hedgewars/Data/Locale/campaigns_de.txt
share/hedgewars/Data/Locale/campaigns_en.txt
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/family.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/united.lua
--- a/share/hedgewars/Data/Locale/campaigns_de.txt	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Locale/campaigns_de.txt	Fri Dec 21 01:43:21 2018 +0100
@@ -19,10 +19,10 @@
 A_Classic_Fairytale-dragon.desc="Unser Held muss auf die andere Seite des Sees kommen. Werd zum Seilprofi und vermeide es, von feindlichen Schüssen getroffen zu werden."
 
 A_Classic_Fairytale-family.name="7. Mission: Familientreffen"
-A_Classic_Fairytale-family.desc="Unser Held muss erneut die Eingeborenen retten. Eliminiere die feindlichen Igel und befreie deine Kameraden. Benutze deine Ressourcen vorsichtig, weil sie begrenzt sind. Bohr ein paar Löcher an den richtigen Stellen und nähere dich der Prinzessin."
+A_Classic_Fairytale-family.desc="Unser Held muss erneut den Stamm retten. Eliminiere die feindlichen Igel und befreie deine Kameraden. Benutze deine Ressourcen vorsichtig, weil sie begrenzt sind. Bohr ein paar Löcher an den richtigen Stellen und nähere dich der Prinzessin."
 
 A_Classic_Fairytale-queen.name="8. Mission: Lang lebe die Königin"
-A_Classic_Fairytale-queen.desc="Die Eingeborenen müssen noch einmal kämpfen. Um zu gewinnen, müssen sie den Verräter bekämpfen und alle verfügbaren Ressourcen benutzen. Besieg den Feind!"
+A_Classic_Fairytale-queen.desc="Der Stamm muss noch einmal kämpfen. Um zu gewinnen, müssen die Igel den Verräter bekämpfen und alle verfügbaren Ressourcen benutzen. Besieg den Feind!"
 
 A_Classic_Fairytale-enemy.name="9. Mission: Der Feind meines Feindes"
 A_Classic_Fairytale-enemy.desc="Was für eine umwerfende Wendung! Undichte Stelle muss mit den … »Kannibalen« gegen den gemeinsamen Feind – die bösen Cyborgs – kämpfen!"
--- a/share/hedgewars/Data/Locale/campaigns_en.txt	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Locale/campaigns_en.txt	Fri Dec 21 01:43:21 2018 +0100
@@ -19,10 +19,10 @@
 A_Classic_Fairytale-dragon.desc="Our hero has to get to the other side of the lake. Become a rope master and avoid getting hit by the enemy shots."
 
 A_Classic_Fairytale-family.name="Mission 7: Family Reunion"
-A_Classic_Fairytale-family.desc="Our hero has to save the natives once more. Eliminate the enemy hogs and free your comrades. Use your resources carefully as they are limited. Drill some holes in the right spot and get close to the princess."
+A_Classic_Fairytale-family.desc="Our hero has to save the tribe once more. Eliminate the enemy hogs and free your comrades. Use your resources carefully as they are limited. Drill some holes in the right spot and get close to the princess."
 
 A_Classic_Fairytale-queen.name="Mission 8: Long Live The Queen"
-A_Classic_Fairytale-queen.desc="The natives have to fight once again. In order to win, they'll have to fight the traitor and use all the resources available. Defeat the enemy!"
+A_Classic_Fairytale-queen.desc="The tribe has to fight once again. In order to win, they'll have to fight the traitor and use all the resources available. Defeat the enemy!"
 
 A_Classic_Fairytale-enemy.name="Mission 9: The Enemy Of My Enemy"
 A_Classic_Fairytale-enemy.desc="What a great twist! Leaks a Lot has to fight side by side with the … “cannibals” against the common enemy: The evil cyborgs!"
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -966,7 +966,7 @@
     natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i])
   end
 
-  nativesTeamName = AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  nativesTeamName = AddMissionTeam(-2)
   for i = 1, 7 do
     natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i])
   end
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -627,7 +627,7 @@
 end
 
 function AddHogs()
-  AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  AddMissionTeam(-2)
   for i = 1, 7 do
     natives[i] = AddHog(nativeNames[i], 0, 200, nativeHats[i])
     gearDead[natives[i]] = false
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -528,7 +528,7 @@
   cyborgTeamName = AddTeam(loc("011101001"), -1, "ring", "UFO", "Robot", "cm_binary")
   cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1")
 
-  nativesTeamName = AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  nativesTeamName = AddMissionTeam(-2)
   -- There are 3-4 natives in this mission
   natives[1] = AddHog(nativeNames[leaksNum], 0, 100, nativeHats[leaksNum])
   if m5DeployedNum ~= leaksNum and m8DeployedLeader == 0 then
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -311,12 +311,13 @@
 end
 
 function AddHogs()
-  AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  local nativesTeamName = AddMissionTeam(-2)
   for i = 1, 5 do
     natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i])
   end
 
-	AddTeam(loc("More Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  local grave, voice, flag = GetHogGrave(natives[1]), GetHogVoicepack(natives[1]), GetHogFlag(natives[1])
+  AddTeam(string.format(loc("%s (contd.)"), nativesTeamName), -2, grave, "Island", voice, flag)
   for i = 6, 10 do
     natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i])
   end
@@ -327,7 +328,7 @@
   end
 
   if m8Scene == denseScene or m8Scene == waterScene then
-    AddTeam(loc("Traitors"), -2, "Bone", "Island", "HillBilly", "cm_bloodyblade")
+    AddTeam(loc("Traitors"), -2, grave, "Island", voice, "cm_bloodyblade")
     if m8Scene == denseScene then
       DeleteGear(natives[2])
       natives[2] = AddHog(nativeNames[2], 0, 100, nativeHats[2])
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/family.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/family.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -529,7 +529,7 @@
   SetGearAIHints(princess, aihDoesntMatter)
   gearDead[princess] = false
 
-  nativesTeamName = AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  nativesTeamName = AddMissionTeam(-2)
   for i = 7, 9 do
     natives[i-6] = AddHog(nativeNames[i], 0, 100, nativeHats[i])
     gearDead[natives[i-6]] = false
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -747,7 +747,7 @@
 	Theme = "Nature"
 
 
-  AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  AddMissionTeam(-2)
   youngh = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
   elderh = AddHog(loc("Righteous Beard"), 0, 99, "IndianChief")
   princess = AddHog(loc("Fell From Heaven"), 0, 300, "tiara")
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -1091,7 +1091,7 @@
 
   AnimInit(true)
 
-  nativesTeamName = AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  nativesTeamName = AddMissionTeam(-2)
   leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
   dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
 
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -729,7 +729,7 @@
 cyborgTeamName = nil
 
 function AddHogs()
-  nativesTeamName = AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  nativesTeamName = AddMissionTeam(-2)
   for i = 7, 9 do
     natives[i-6] = AddHog(nativeNames[i], 0, 100, nativeHats[i])
     origNatives[i-6] = natives[i-6]
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -617,7 +617,7 @@
 end
 
 function AddHogs()
-  nativesTeamName = AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  nativesTeamName = AddMissionTeam(-2)
   ramon = AddHog(loc("Ramon"), 0, 100, "rasta")
 	leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
   dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/united.lua	Fri Dec 21 01:04:24 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/united.lua	Fri Dec 21 01:43:21 2018 +0100
@@ -327,7 +327,7 @@
 end
 
 function AddHogs()
-  nativesTeamName = AddTeam(loc("Natives"), -2, "Bone", "Island", "HillBilly", "cm_birdy")
+  nativesTeamName = AddMissionTeam(-2)
   leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
   dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
   water = AddHog(loc("Fiery Water"), 0, 100, "pirate_jack")