This commit is contained in:
2026-04-30 22:52:55 +09:00
parent 3ac3a7ad59
commit c4b30811f5
3 changed files with 35 additions and 84 deletions
-24
View File
@@ -97,24 +97,6 @@ local function inserter_changed(event)
end end
end end
local function hidden_recipe_enable(event)
if not settings.startup['PHI-CT'].value then
return
end
local enable = (event.name == defines.events.on_player_cheat_mode_enabled)
for _, v in pairs(prototypes.fluid) do
if game.players[event.player_index].force.recipes['super-pump-' .. v.name] then
game.players[event.player_index].force.recipes['super-pump-' .. v.name].enabled = enable
end
end
for _, v in pairs({'super-radar', 'passive-energy-void', 'active-energy-void', 'linked-chest', 'infinity-chest', 'infinity-cargo-wagon', 'infinity-pipe'}) do
game.players[event.player_index].force.recipes[v].enabled = enable
end
end
-- settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'SAP' -- settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'SAP'
local function entity_build(event) local function entity_build(event)
if event.entity.type == 'rail-support' then if event.entity.type == 'rail-support' then
@@ -308,12 +290,6 @@ if settings.startup['PHI-MI'].value or (settings.startup['PHI-GM'].value and set
end end
if settings.startup['PHI-CT'].value then
script.on_event({defines.events.on_player_cheat_mode_enabled, defines.events.on_player_cheat_mode_disabled}, function(event)
hidden_recipe_enable(event)
end)
end
script.on_nth_tick(1800, function(_) script.on_nth_tick(1800, function(_)
if storage.phi_cl and storage.phi_cl.loop and storage.phi_cl.loop.combinator and game.forces['player'] then if storage.phi_cl and storage.phi_cl.loop and storage.phi_cl.loop.combinator and game.forces['player'] then
storage.phi_cl.combinator.research_progress = math.floor(game.forces['player'].research_progress * 1000) storage.phi_cl.combinator.research_progress = math.floor(game.forces['player'].research_progress * 1000)
+12 -4
View File
@@ -18,7 +18,9 @@ for _, v in pairs({'infinity-chest', 'infinity-cargo-wagon', 'infinity-pipe'}) d
type = 'recipe', type = 'recipe',
name = data.raw['item'][v].name, name = data.raw['item'][v].name,
energy_required = 2, energy_required = 2,
enabled = false, enabled = true,
hidden = true,
hidden_in_factoriopedia = true,
ingredients = {}, ingredients = {},
results = {{type = 'item', name = data.raw['item'][v].name, amount = 1}}, results = {{type = 'item', name = data.raw['item'][v].name, amount = 1}},
main_product = data.raw['item'][v].name main_product = data.raw['item'][v].name
@@ -44,7 +46,9 @@ if data.raw['linked-container']['linked-chest'] then
type = 'recipe', type = 'recipe',
name = 'linked-chest', name = 'linked-chest',
energy_required = 2, energy_required = 2,
enabled = false, enabled = true,
hidden = true,
hidden_in_factoriopedia = true,
ingredients = {{type = 'item', name = 'steel-chest', amount = 1}}, ingredients = {{type = 'item', name = 'steel-chest', amount = 1}},
results = {{type = 'item', name = 'linked-chest', amount = 1}}, results = {{type = 'item', name = 'linked-chest', amount = 1}},
main_product = 'linked-chest' main_product = 'linked-chest'
@@ -77,7 +81,9 @@ if data.raw['radar']['radar'] then
type = 'recipe', type = 'recipe',
name = item.name, name = item.name,
energy_required = 2, energy_required = 2,
enabled = false, enabled = true,
hidden = true,
hidden_in_factoriopedia = true,
ingredients = {{type = 'item', name = 'electronic-circuit', amount = 5}, {type = 'item', name = 'iron-gear-wheel', amount = 5}, {type = 'item', name = 'iron-plate', amount = 10}}, 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}}, results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name, main_product = item.name,
@@ -113,7 +119,9 @@ if data.raw['electric-energy-interface']['electric-energy-interface'] then
type = 'recipe', type = 'recipe',
name = item.name, name = item.name,
energy_required = 2, energy_required = 2,
enabled = false, enabled = true,
hidden = true,
hidden_in_factoriopedia = true,
ingredients = {{type = 'item', name = 'accumulator', amount = 1}}, ingredients = {{type = 'item', name = 'accumulator', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}}, results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name, main_product = item.name,
+23 -56
View File
@@ -82,80 +82,47 @@ for _, force in pairs(game.forces) do
end end
end end
if settings.startup['PHI-CT'].value then if (settings.startup['PHI-MI'].value and settings.startup['PHI-MI-GENERIC'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '') then
recipes['electric-boiler'].enabled = true if technologies['steel-processing'] and technologies['steel-processing'].researched then
recipes['electric-boiler'].reload()
recipes['super-pump'].enabled = true
recipes['super-pump'].reload()
recipes['super-radar'].enabled = true
recipes['super-radar'].reload()
recipes['passive-energy-void'].enabled = true
recipes['passive-energy-void'].reload()
if (not technologies['steel-processing']) or technologies['steel-processing'].researched then
if recipes['trash-chest'] then if recipes['trash-chest'] then
recipes['trash-chest'].enabled = true recipes['trash-chest'].enabled = true
recipes['trash-chest'].reload() recipes['trash-chest'].reload()
end end
if recipes['linked-chest'] then
recipes['linked-chest'].enabled = true
recipes['linked-chest'].reload()
end
end end
if (not technologies['automation']) or technologies['automation'].researched and recipes['trash-pipe'] then if technologies['automation'] and technologies['automation'].researched and recipes['trash-pipe'] then
recipes['trash-pipe'].enabled = true recipes['trash-pipe'].enabled = true
recipes['trash-pipe'].reload() recipes['trash-pipe'].reload()
end end
if (not technologies['heating-tower']) or technologies['heating-tower'].researched and recipes['electric-heating-tower'] then if technologies['heating-tower'] and technologies['heating-tower'].researched and recipes['electric-heating-tower'] then
recipes['electric-heating-tower'].enabled = true recipes['electric-heating-tower'].enabled = true
recipes['electric-heating-tower'].reload() recipes['electric-heating-tower'].reload()
end end
if (not technologies['logistics']) or technologies['logistics'].researched and recipes['underground-belt-a'] then for _, v in pairs({{'logistics', 'underground-belt'}, {'logistics-2', 'fast-underground-belt'}, {'logistics-3', 'express-underground-belt'}, {'turbo-transport-belt', 'turbo-underground-belt'}, {'logistics', 'loader'}, {'logistics-2', 'fast-loader'}, {'logistics-3', 'express-loader'}, {'turbo-transport-belt', 'turbo-loader'}}) do
recipes['underground-belt-a'].enabled = true local vn = v[2] .. '-a'
recipes['underground-belt-a'].reload()
if technologies[v[1]] and technologies[v[1]].researched and recipes[vn] then
recipes[vn].enabled = true
recipes[vn].reload()
end
end
end end
if (not technologies['logistics-2']) or technologies['logistics-2'].researched and recipes['fast-underground-belt-a'] then if recipes['electric-boiler'] then
recipes['fast-underground-belt-a'].enabled = true recipes['electric-boiler'].enabled = true
recipes['fast-underground-belt-a'].reload() recipes['electric-boiler'].reload()
end end
if (not technologies['logistics-3']) or technologies['logistics-3'].researched and recipes['express-underground-belt-a'] then if recipes['super-pump'] then
recipes['express-underground-belt-a'].enabled = true recipes['super-pump'].enabled = true
recipes['express-underground-belt-a'].reload() recipes['super-pump'].reload()
end
if (not technologies['turbo-transport-belt']) or technologies['turbo-transport-belt'].researched and recipes['turbo-underground-belt-a'] then
recipes['turbo-underground-belt-a'].enabled = true
recipes['turbo-underground-belt-a'].reload()
end
if (not technologies['steel-processing']) or technologies['steel-processing'].researched and recipes['linked-chest'] then
recipes['linked-chest'].enabled = true
recipes['linked-chest'].reload()
end
if (not technologies['logistics']) or technologies['logistics'].researched and recipes['loader'] then
recipes['loader'].enabled = true
recipes['loader'].reload()
end
if (not technologies['logistics-2']) or technologies['logistics-2'].researched and recipes['fast-loader'] then
recipes['fast-loader'].enabled = true
recipes['fast-loader'].reload()
end
if (not technologies['logistics-3']) or technologies['logistics-3'].researched and recipes['express-loader'] then
recipes['express-loader'].enabled = true
recipes['express-loader'].reload()
end
if (not technologies['turbo-transport-belt']) or technologies['turbo-transport-belt'].researched and recipes['turbo-loader'] then
recipes['turbo-loader'].enabled = true
recipes['turbo-loader'].reload()
end
end end
if settings.startup['PHI-MB'].value and script.active_mods['space-exploration'] then if settings.startup['PHI-MB'].value and script.active_mods['space-exploration'] then