Quick fix for player physical position

This commit is contained in:
Cooldude2606
2024-10-19 18:30:58 +01:00
parent 90d0a122cd
commit 34a7879761
31 changed files with 82 additions and 41 deletions

View File

@@ -60,6 +60,7 @@ local elem_filter = {
}
local function clear_module(player, area, machine)
-- Intentionally left as player.surface to allow use in remote view
for _, entity in pairs(player.surface.find_entities_filtered{ area = area, name = machine, force = player.force }) do
for _, r in pairs(player.surface.find_entities_filtered{ position = entity.position, name = "item-request-proxy", force = player.force }) do
if r then
@@ -84,6 +85,7 @@ local function clear_module(player, area, machine)
end
local function apply_module(player, area, machine, modules)
-- Intentionally left as player.surface to allow use in remote view
for _, entity in pairs(player.surface.find_entities_filtered{ area = area, name = machine, force = player.force }) do
local m_current_recipe