Fix error with empty module table (#328)

This commit is contained in:
2024-09-15 07:25:33 +09:00
committed by GitHub
parent 90faf2ff93
commit 659a8acb0d

View File

@@ -307,6 +307,9 @@ Event.add(defines.events.on_entity_settings_pasted, function(event)
end end
clear_module(player, destination.bounding_box, destination.name) clear_module(player, destination.bounding_box, destination.name)
if next(source_inventory_content) ~= nil then
apply_module(player, destination.bounding_box, destination.name, {['n']=source_inventory_content, ['p']=source_inventory_content}) apply_module(player, destination.bounding_box, destination.name, {['n']=source_inventory_content, ['p']=source_inventory_content})
end end
end
end) end)