From 0b969649c87cd425a2fbbead6c49972b099d3d3c Mon Sep 17 00:00:00 2001 From: grilledham Date: Thu, 21 Jun 2018 12:20:07 +0100 Subject: [PATCH] added is-meltdown command --- reactor_meltdown.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reactor_meltdown.lua b/reactor_meltdown.lua index 7b77eefa..2f5032ce 100644 --- a/reactor_meltdown.lua +++ b/reactor_meltdown.lua @@ -161,7 +161,16 @@ local function reactor_toggle() end end +local function is_meltdown() + if global.reactors_enabled then + player_print('Reactor metldown is enabled.') + else + player_print('Reactor metldown is disabled.') + end +end + commands.add_command('meltdown', 'Toggles if reactors blow up', reactor_toggle) +commands.add_command('is-meltdown', 'Prints if meltdown is enabled', is_meltdown) Event.on_nth_tick(60, on_tick) Event.add(defines.events.on_player_mined_entity, entity_destroyed)