--- a/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua Wed Jun 28 21:14:56 2023 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua Wed Jun 28 21:16:14 2023 +0200
@@ -236,8 +236,27 @@
select_wep = ""
quit_hint = ""
end
+ local gameFlagPrepend = ""
+ local continentInfoPlace = loc("Continents: Select a continent after placing your hogs.")
+ local continentInfoNormal = loc("Continents: Select a continent at the beginning.")
+ local continentInfo = continentInfoNormal
+ if GetGameFlag(gfKing) then
+ gameFlagPrepend = gameFlagPrepend .. GetEngineString("TGoalStrId", gidKing).."|"
+ if GetGameFlag(gfPlaceHog) then
+ gameFlagPrepend = gameFlagPrepend .. GetEngineString("TGoalStrId", gidPlaceHog).."|"
+ else
+ gameFlagPrepend = gameFlagPrepend .. GetEngineString("TGoalStrId", gidPlaceKing).."|"
+ end
+ continentInfo = continentInfoPlace
+ else
+ if GetGameFlag(gfPlaceHog) then
+ gameFlagPrepend = gameFlagPrepend .. GetEngineString("TGoalStrId", gidPlaceHog).."|"
+ continentInfo = continentInfoPlace
+ end
+ end
local general_information =
- loc("Continents: Select a continent at the beginning.").."|"..
+ gameFlagPrepend..
+ continentInfo.."|"..
loc("Supplies: Each continent gives you unique weapons, specials and health.").."|"..
loc("Weapon specials: Some weapons have special modes (see weapon description).")..
select_wep..
@@ -1145,10 +1164,14 @@
function onGameInit()
SuddenDeathTurns= SuddenDeathTurns+1
-- Disable GameFlags that are incompatible with this game
- DisableGameFlags(gfKing, gfPlaceHog, gfPerHogAmmo, gfSharedAmmo, gfResetWeps)
+ DisableGameFlags(gfPerHogAmmo, gfSharedAmmo, gfResetWeps)
end
function onEndTurn()
+ if(TotalRounds == -1) then
+ -- Do nothing if placing hogs
+ return
+ end
if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0)
then
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(#CS.CONTINENT_INFORMATION)+1
@@ -1190,7 +1213,7 @@
SetAttackState(true)
--when all hogs are "placed"
- if(GetCurAmmoType()~=amTeleport)
+ if(TotalRounds ~= -1)
then
--will run once when the game really starts (after placing hogs and so on
if(CS.INIT_TEAMS[GetHogTeamName(CurrentHedgehog)] == nil)