mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -40,21 +40,23 @@ if settings.startup['PHI-CT'].value then
|
||||
script.on_event(defines.events.script_raised_built, trash_creation)
|
||||
script.on_event(defines.events.script_raised_revive, trash_creation)
|
||||
|
||||
local function hidden_recipe_enable(enable)
|
||||
local function hidden_recipe_enable(e, enable)
|
||||
local force = game.players[e.player_index].force
|
||||
|
||||
for _, v in pairs(prototypes.fluid) do
|
||||
prototypes.recipe['pump-' .. v.name].hidden = enable
|
||||
force.recipes['pump-' .. v.name].enabled = enable
|
||||
end
|
||||
|
||||
prototypes.recipe['super-radar'].hidden = enable
|
||||
prototypes.recipe['passive-energy-void'].hidden = enable
|
||||
prototypes.recipe['linked-chest'].hidden = enable
|
||||
force.recipes['super-radar'].enabled = enable
|
||||
force.recipes['passive-energy-void'].enabled = enable
|
||||
force.recipes['linked-chest'].enabled = enable
|
||||
end
|
||||
|
||||
script.on_event(defines.events.on_player_cheat_mode_enabled, function(_)
|
||||
hidden_recipe_enable(true)
|
||||
script.on_event(defines.events.on_player_cheat_mode_enabled, function(e)
|
||||
hidden_recipe_enable(e, true)
|
||||
end)
|
||||
|
||||
script.on_event(defines.events.on_player_cheat_mode_disabled, function(_)
|
||||
hidden_recipe_enable(false)
|
||||
script.on_event(defines.events.on_player_cheat_mode_disabled, function(e)
|
||||
hidden_recipe_enable(e, false)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -1320,7 +1320,6 @@ if settings.startup['PHI-CT'].value then
|
||||
local item = table.deepcopy(data.raw['item']['radar'])
|
||||
item.name = 'super-radar'
|
||||
item.place_result = item.name
|
||||
item.hidden = true
|
||||
item.order = 'd[radar]-b[radar]'
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/radar.png', tint = items['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icon = nil
|
||||
@@ -1342,8 +1341,7 @@ if settings.startup['PHI-CT'].value then
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = true,
|
||||
hidden = true,
|
||||
enabled = false,
|
||||
ingredients = {{type = 'item', name = 'electronic-circuit', amount = 5}, {type = 'item', name = 'iron-gear-wheel', amount = 5}, {type = 'item', name = 'iron-plate', amount = 10}},
|
||||
results = {{type = 'item', name = item.name, amount = 1}},
|
||||
main_product = item.name,
|
||||
@@ -1353,7 +1351,6 @@ if settings.startup['PHI-CT'].value then
|
||||
item = table.deepcopy(data.raw['item']['electric-energy-interface'])
|
||||
item.name = 'passive-energy-void'
|
||||
item.place_result = item.name
|
||||
item.hidden = true
|
||||
item.subgroup = 'energy'
|
||||
item.localised_name = {'name.passive-energy-void'}
|
||||
data:extend({item})
|
||||
@@ -1376,8 +1373,7 @@ if settings.startup['PHI-CT'].value then
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = true,
|
||||
hidden = true,
|
||||
enabled = false,
|
||||
ingredients = {{type = 'item', name = 'accumulator', amount = 1}},
|
||||
results = {{type = 'item', name = item.name, amount = 1}},
|
||||
main_product = item.name,
|
||||
@@ -1387,7 +1383,6 @@ if settings.startup['PHI-CT'].value then
|
||||
item = table.deepcopy(data.raw['item']['linked-chest'])
|
||||
item.subgroup = 'storage'
|
||||
item.order = 'a[items]-d[linked-chest]'
|
||||
item.hidden = true
|
||||
item.stack_size = 50
|
||||
data:extend({item})
|
||||
|
||||
@@ -1406,14 +1401,11 @@ if settings.startup['PHI-CT'].value then
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
hidden = true,
|
||||
ingredients = {{type = 'item', name = 'steel-chest', amount = 1}},
|
||||
results = {{type = 'item', name = item.name, amount = 1}},
|
||||
main_product = item.name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['steel-processing'].effects, {type = 'unlock-recipe', recipe = item.name})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['steel-chest'])
|
||||
item.name = 'trash-chest'
|
||||
item.place_result = item.name
|
||||
|
||||
Reference in New Issue
Block a user