1
0
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:
Oarcinae 2019-09-24 09:40:10 -05:00
parent a36aa4517e
commit 5fa7d4bd51
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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