mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 21:01:39 +09:00
fixed non prod module insertion with recipe
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
-- type of machine to handle together
|
-- type of machine to handle together
|
||||||
default_module_row_count = 4,
|
default_module_row_count = 6,
|
||||||
module_slot_max = 4,
|
module_slot_max = 4,
|
||||||
machine_prod_disallow = {
|
machine_prod_disallow = {
|
||||||
['beacon'] = true
|
['beacon'] = true
|
||||||
|
|||||||
@@ -74,14 +74,32 @@ local function apply_module(player, area, machine, module)
|
|||||||
|
|
||||||
if m_current_recipe ~= nil then
|
if m_current_recipe ~= nil then
|
||||||
if config.module_allowed[m_current_recipe.name] then
|
if config.module_allowed[m_current_recipe.name] then
|
||||||
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module} end
|
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
||||||
|
entity.last_user = player
|
||||||
|
|
||||||
|
else
|
||||||
|
local prod = false
|
||||||
|
|
||||||
|
for k, _ in pairs(module) do
|
||||||
|
if k:sub(1, 12) == 'productivity' then
|
||||||
|
prod = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not prod then
|
||||||
|
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
||||||
|
entity.last_user = player
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
||||||
|
entity.last_user = player
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
||||||
|
entity.last_user = player
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user