From 22934723e99f108ce63f84a8753271908f542844 Mon Sep 17 00:00:00 2001 From: KiwiHawk <59639+KiwiHawk@users.noreply.github.com> Date: Sun, 8 Sep 2024 18:22:32 +1200 Subject: [PATCH] Multiplayer starting items - Companion Drones #337 Event handler for on_player_created was being defined twice. Second time overwrites the first. --- SeaBlock/changelog.txt | 1 + SeaBlock/control.lua | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/SeaBlock/changelog.txt b/SeaBlock/changelog.txt index 2ee8d03..29a7db1 100644 --- a/SeaBlock/changelog.txt +++ b/SeaBlock/changelog.txt @@ -25,6 +25,7 @@ Date: ??.??.?? - Buffed the output of recipe Carbon 2 #336 Bugfixes: - Fixed tech steam-power missing a locale in some mod configurations #332 + - Fixed missing starting items in multiplayer games when Companion Drones mod is enabled #337 --------------------------------------------------------------------------------------------------- Version: 0.5.16 Date: 27.02.2024 diff --git a/SeaBlock/control.lua b/SeaBlock/control.lua index 50b1423..53a43e5 100644 --- a/SeaBlock/control.lua +++ b/SeaBlock/control.lua @@ -230,10 +230,8 @@ script.on_event(defines.events.on_player_created, function(e) end end end -end) -if script.active_mods["Companion_Drones"] then - script.on_event(defines.events.on_player_created, function(e) + if script.active_mods["Companion_Drones"] then local s = game.surfaces["nauvis"] if s then local companions = s.find_entities_filtered({ name = "companion" }) @@ -248,5 +246,5 @@ if script.active_mods["Companion_Drones"] then end end end - end) -end + end +end)