mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Merge branch 'dev' into dev4
This commit is contained in:
@@ -24,60 +24,6 @@ for k, _ in pairs(config.machine) do
|
||||
table.insert(machine_name, k)
|
||||
end
|
||||
|
||||
--[[
|
||||
local module_allowed = {}
|
||||
|
||||
for _, r in pairs(game.item_prototypes['productivity-module'].limitations) do
|
||||
module_allowed[r] = true
|
||||
end
|
||||
]]
|
||||
|
||||
local module_allowed = {
|
||||
['advanced-circuit'] = true,
|
||||
['automation-science-pack'] = true,
|
||||
['battery'] = true,
|
||||
['chemical-science-pack'] = true,
|
||||
['copper-cable'] = true,
|
||||
['copper-plate'] = true,
|
||||
['electric-engine-unit'] = true,
|
||||
['electronic-circuit'] = true,
|
||||
['empty-barrel'] = true,
|
||||
['engine-unit'] = true,
|
||||
['explosives'] = true,
|
||||
['flying-robot-frame'] = true,
|
||||
['iron-gear-wheel'] = true,
|
||||
['iron-plate'] = true,
|
||||
['iron-stick'] = true,
|
||||
['logistic-science-pack'] = true,
|
||||
['low-density-structure'] = true,
|
||||
['lubricant'] = true,
|
||||
['military-science-pack'] = true,
|
||||
['nuclear-fuel'] = true,
|
||||
['plastic-bar'] = true,
|
||||
['processing-unit'] = true,
|
||||
['production-science-pack'] = true,
|
||||
['rocket-control-unit'] = true,
|
||||
['rocket-fuel'] = true,
|
||||
['rocket-part'] = true,
|
||||
['steel-plate'] = true,
|
||||
['stone-brick'] = true,
|
||||
['sulfur'] = true,
|
||||
['sulfuric-acid'] = true,
|
||||
['uranium-fuel-cell'] = true,
|
||||
['utility-science-pack'] = true,
|
||||
['basic-oil-processing'] = true,
|
||||
['advanced-oil-processing'] = true,
|
||||
['coal-liquefaction'] = true,
|
||||
['heavy-oil-cracking'] = true,
|
||||
['light-oil-cracking'] = true,
|
||||
['solid-fuel-from-light-oil'] = true,
|
||||
['solid-fuel-from-petroleum-gas'] = true,
|
||||
['solid-fuel-from-heavy-oil'] = true,
|
||||
['uranium-processing'] = true,
|
||||
['nuclear-fuel-reprocessing'] = true,
|
||||
['kovarex-enrichment-process'] = true
|
||||
}
|
||||
|
||||
local elem_filter = {
|
||||
name = {{
|
||||
filter = 'name',
|
||||
@@ -123,15 +69,17 @@ end
|
||||
|
||||
local function apply_module(player, area, machine, module)
|
||||
for _, entity in pairs(player.surface.find_entities_filtered{area=area, name=machine, force=player.force}) do
|
||||
local m_current_recipe = entity.get_recipe()
|
||||
if config.machine_craft[machine] then
|
||||
local m_current_recipe = entity.get_recipe()
|
||||
|
||||
-- insert
|
||||
if m_current_recipe ~= nil then
|
||||
if module_allowed[m_current_recipe.name] ~= nil then
|
||||
if 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
|
||||
if m_current_recipe ~= nil 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
|
||||
|
||||
else
|
||||
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
||||
end
|
||||
|
||||
else
|
||||
entity.surface.create_entity{name='item-request-proxy', target=entity, position=entity.position, force=entity.force, modules=module}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user