# HG changeset patch # User Wuzzy # Date 1560607513 -7200 # Node ID 276bdf531ae01afca7f2c1b1608d8fbf830a5aa4 # Parent 35f6213ba1fa6269bd7ea756feb7793ed31d1501 Continental supplies: Show continent in team bars diff -r 35f6213ba1fa -r 276bdf531ae0 ChangeLog.txt --- a/ChangeLog.txt Sat Jun 15 14:49:18 2019 +0200 +++ b/ChangeLog.txt Sat Jun 15 16:05:13 2019 +0200 @@ -42,6 +42,7 @@ + Control, CTF_Blizzard: Display scores in stats screen + CTF_Blizzard: Various minor graphical and text improvements + Frenzy: Change ammo slots + + Continental supplies: Show continent in team bars * Balanced Random Weapon: Fix Lua errors after using Time Box * Racer: Fix racer ghost not getting reset after a skip * Space Invasion: No longer allow to set start shield above shield limit diff -r 35f6213ba1fa -r 276bdf531ae0 share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua Sat Jun 15 14:49:18 2019 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua Sat Jun 15 16:05:13 2019 +0200 @@ -528,6 +528,7 @@ elseif not CS.GAME_STARTED then AddCaption(CS.CONTINENT_INFORMATION[continent][1], GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo) end + SetContinentTeamLabel() end --will show a circle of gears (eye candy) @@ -1145,6 +1146,16 @@ SuddenDeathTurns= SuddenDeathTurns+1 end +function onEndTurn() + if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) + then + CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(#CS.CONTINENT_INFORMATION)+1 + SetContinentWeapons() + HideMission() + end + SetContinentTeamLabel() +end + --what happen when a turn starts function onNewTurn() --will refresh the info on each tab weapon @@ -1631,6 +1642,10 @@ end end +function SetContinentTeamLabel() + SetTeamLabel(GetHogTeamName(CurrentHedgehog), CS.CONTINENT_INFORMATION[CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]][1]) +end + function onGameTick() -- This is a trick to show the continent label delayed by 1 tick if CS.CONTINENT_LABEL_TIMER > 0 then