Skip to content

Commit

Permalink
Multiplayer starting items - Companion Drones #337
Browse files Browse the repository at this point in the history
Event handler for on_player_created was being defined twice. Second time overwrites the first.
  • Loading branch information
KiwiHawk committed Sep 8, 2024
1 parent 8ef1e18 commit 2293472
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions SeaBlock/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions SeaBlock/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" })
Expand All @@ -248,5 +246,5 @@ if script.active_mods["Companion_Drones"] then
end
end
end
end)
end
end
end)

0 comments on commit 2293472

Please sign in to comment.