mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2025-02-11 13:15:30 +02:00
Fix rocket gui tab not being enabled on players not connected, or new players.
This commit is contained in:
parent
a36aa4517e
commit
5fa7d4bd51
@ -43,7 +43,11 @@ function InitOarcGuiTabs(player)
|
||||
SetOarcGuiTabEnabled(player, OARC_TAGS_GUI_TAB_NAME, true)
|
||||
end
|
||||
|
||||
-- Rockets tab, only enable if one has been launched already
|
||||
AddOarcGuiTab(player, OARC_ROCKETS_GUI_TAB_NAME)
|
||||
if (global.satellite_sent) then
|
||||
SetOarcGuiTabEnabled(player, OARC_ROCKETS_GUI_TAB_NAME, true)
|
||||
end
|
||||
end
|
||||
|
||||
function CreateOarcGuiButton(player)
|
||||
|
@ -27,7 +27,7 @@ function RocketLaunchEvent(event)
|
||||
SendBroadcastMsg("Team " .. event.rocket.force.name .. " was the first to launch a rocket!")
|
||||
ServerWriteFile("rocket_events", "Team " .. event.rocket.force.name .. " was the first to launch a rocket!" .. "\n")
|
||||
|
||||
for name,player in pairs(game.connected_players) do
|
||||
for name,player in pairs(game.players) do
|
||||
SetOarcGuiTabEnabled(player, OARC_ROCKETS_GUI_TAB_NAME, true)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user