From 93d1aeb33c84199d1f105d7cc7cc19b7554fa8d1 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 26 May 2026 22:03:25 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 4 ++++ PHI-CL/control/pump.lua | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 PHI-CL/control/pump.lua diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index e7c2684..9ecabb9 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -49,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 diff --git a/PHI-CL/control/pump.lua b/PHI-CL/control/pump.lua new file mode 100644 index 0000000..18575e6 --- /dev/null +++ b/PHI-CL/control/pump.lua @@ -0,0 +1,13 @@ +local main = {} + +function main.recipe_hidden(event) + local status = (event.name == defines.events.on_player_cheat_mode_enabled) + + for _, v in pairs(prototypes.fluid) do + if v.subgroup == 'fluid' then + prototypes.recipe['super-pump-' .. v.name].enabled = status + end + end +end + +return main