Minor refactor in single missions
authorWuzzy <Wuzzy2@mail.ru>
Fri, 21 Dec 2018 17:47:54 +0100
changeset 14495 ff2c1f25fc03
parent 14494 cc358e997e32
child 14496 8db03d9bc6e9
Minor refactor in single missions
share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua
--- a/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Fri Dec 21 17:43:04 2018 +0100
+++ b/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Fri Dec 21 17:47:54 2018 +0100
@@ -133,8 +133,7 @@
 	HealthDecrease = 0
 
 	-- Create the player team
-	AddMissionTeam(-1)
-	playerTeamName = GetTeamName(0)
+	playerTeamName = AddMissionTeam(-1)
 	-- And add a hog to it
 	player = AddMissionHog(1)
 	SetGearPosition(player, 602, 1465)
--- a/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua	Fri Dec 21 17:43:04 2018 +0100
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua	Fri Dec 21 17:47:54 2018 +0100
@@ -24,8 +24,7 @@
 	HealthDecrease = 0
 	WaterRise = 0
 
-	local idx = AddMissionTeam(-1)
-	playerTeamName = GetTeamName(idx)
+	playerTeamName = AddMissionTeam(-1)
 	player = AddMissionHog(50)
 	p2 = AddMissionHog(20)
 
--- a/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua	Fri Dec 21 17:43:04 2018 +0100
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua	Fri Dec 21 17:47:54 2018 +0100
@@ -26,8 +26,7 @@
 	Map = "CrazyMission"
 	Theme = "CrazyMission"
 
-	local idx = AddMissionTeam(-1)
-	playerTeamName = GetTeamName(idx)
+	playerTeamName = AddMissionTeam(-1)
 	player = AddMissionHog(30)
 	hlayer = AddMissionHog(40)