share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
changeset 15153 276bdf531ae0
parent 15152 35f6213ba1fa
child 15154 13a69aad9325
equal deleted inserted replaced
15152:35f6213ba1fa 15153:276bdf531ae0
   526 	then
   526 	then
   527 		HideMission()
   527 		HideMission()
   528 	elseif not CS.GAME_STARTED then
   528 	elseif not CS.GAME_STARTED then
   529 		AddCaption(CS.CONTINENT_INFORMATION[continent][1], GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
   529 		AddCaption(CS.CONTINENT_INFORMATION[continent][1], GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
   530 	end
   530 	end
       
   531 	SetContinentTeamLabel()
   531 end
   532 end
   532 
   533 
   533 --will show a circle of gears (eye candy)
   534 --will show a circle of gears (eye candy)
   534 function VisualExplosion(range,xpos,ypos,gear1,gear2)
   535 function VisualExplosion(range,xpos,ypos,gear1,gear2)
   535 	local degr=0
   536 	local degr=0
  1143 
  1144 
  1144 function onGameInit()
  1145 function onGameInit()
  1145 	SuddenDeathTurns= SuddenDeathTurns+1
  1146 	SuddenDeathTurns= SuddenDeathTurns+1
  1146 end
  1147 end
  1147 
  1148 
       
  1149 function onEndTurn()
       
  1150 	if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0)
       
  1151 	then
       
  1152 		CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(#CS.CONTINENT_INFORMATION)+1
       
  1153 		SetContinentWeapons()
       
  1154 		HideMission()
       
  1155 	end
       
  1156 	SetContinentTeamLabel()
       
  1157 end
       
  1158 
  1148 --what happen when a turn starts
  1159 --what happen when a turn starts
  1149 function onNewTurn()
  1160 function onNewTurn()
  1150 	--will refresh the info on each tab weapon
  1161 	--will refresh the info on each tab weapon
  1151 	CS.AUSTRALIAN_SPECIAL=0
  1162 	CS.AUSTRALIAN_SPECIAL=0
  1152 	CS.AFRICAN_SPECIAL_SEDUCTION=0
  1163 	CS.AFRICAN_SPECIAL_SEDUCTION=0
  1627 	if continent == 0 then
  1638 	if continent == 0 then
  1628 		AddCaption(loc("Random continent"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
  1639 		AddCaption(loc("Random continent"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
  1629 	else
  1640 	else
  1630 		AddCaption(CS.CONTINENT_INFORMATION[CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]][1], GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
  1641 		AddCaption(CS.CONTINENT_INFORMATION[CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]][1], GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
  1631 	end
  1642 	end
       
  1643 end
       
  1644 
       
  1645 function SetContinentTeamLabel()
       
  1646 	SetTeamLabel(GetHogTeamName(CurrentHedgehog), CS.CONTINENT_INFORMATION[CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]][1])
  1632 end
  1647 end
  1633 
  1648 
  1634 function onGameTick()
  1649 function onGameTick()
  1635 	-- This is a trick to show the continent label delayed by 1 tick
  1650 	-- This is a trick to show the continent label delayed by 1 tick
  1636 	if CS.CONTINENT_LABEL_TIMER > 0 then
  1651 	if CS.CONTINENT_LABEL_TIMER > 0 then