Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---------------------------------------------------------------------------------------------------
Version: 5.2.5
Date: ????
Date: 27.11.2021
Changes:
- Additional check for the module inserter item added on the open event. This prevents module inserter from overwriting other items from other mods allowing parallel use of them (e.g. RailSignalPlanner, Artillery Bombardment Remote)
---------------------------------------------------------------------------------------------------
Version: 5.2.4
Date: 2021-01-06
Expand Down Expand Up @@ -263,4 +264,4 @@ Date: 13. 01. 2018
Version: 3.0.0
Date: 06. 01. 2018
Changes:
- Updated for Factorio 0.16
- Updated for Factorio 0.16
12 changes: 7 additions & 5 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ local function sort_modules(entity, modules, cTable)
end

local function on_mod_item_opened(e)
e.player = game.get_player(e.player_index)
e.pdata = global._pdata[e.player_index]
if not e.pdata.gui_open then
mi_gui.open(e)
if e.item.name == "module-inserter" then
e.player = game.get_player(e.player_index)
e.pdata = global._pdata[e.player_index]
if not e.pdata.gui_open then
mi_gui.open(e)
end
end
end
event.on_mod_item_opened(on_mod_item_opened)
Expand Down Expand Up @@ -746,4 +748,4 @@ commands.add_command("mi_clean", "", function()
egui.destroy()
end
end
end)
end)