This commit is contained in:
2026-05-10 03:08:11 +09:00
parent 97c6ce9a33
commit cce38aa273
2 changed files with 18 additions and 0 deletions
+5
View File
@@ -1,6 +1,7 @@
local cargo_landing = require('control/cargo-landing')
local combinator = require('control/combinator')
local lab = require('control/lab')
local pump = require('control/pump')
local rail_support = require('control/rail-support')
local trash = require('control/trash')
@@ -48,6 +49,10 @@ script.on_configuration_changed(function()
combinator.storage_init()
end)
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
script.on_event({defines.events.on_player_cheat_mode_enabled, defines.events.on_player_cheat_mode_disabled}, pump.recipe_hidden)
end
if settings.startup['PHI-MI'].value or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '') then
script.on_event(defines.events.on_player_created, function(event)
if not event.player_index or not game.players[event.player_index] then
+13
View File
@@ -0,0 +1,13 @@
local main = {}
function main.recipe_hidden(event)
local hidden = (event.name == defines.events.on_player_cheat_mode_enabled and true) or false
for _, v in pairs(prototypes.fluid) do
if v.subgroup == 'fluid' then
prototypes.recipe['super-pump-' .. v.name].hidden = hidden
end
end
end
return main