From 2709bd00414291a8c376891ed26c2bb0ba730ff3 Mon Sep 17 00:00:00 2001 From: Li0n Date: Fri, 25 Feb 2022 23:30:34 +0100 Subject: [PATCH] add stop and resume command --- init.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f9710b5..51127ba 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,6 @@ local rumble_duration_max_standard = 5 -- move python program to a different directory -- chat mode: trigger from specific words written by either yourself (humiliation) or others (degradation) - local rumble_strength_max local rumble_duration_max local log @@ -26,6 +25,9 @@ local log_and_chat = function(text) minetest.display_chat_message(text) end +local no_log_no_chat = function(text) +end + -- step 1 (start) minetest.register_on_mods_loaded(function() minetest.display_chat_message("rumble mod loaded. May the rumble be with you!") @@ -97,3 +99,18 @@ minetest.register_chatcommand("chat_on", { log = log_and_chat end, }) + +minetest.register_chatcommand("stop", { + description = "pauses the rumble program", + func = function() + log("[rumble] instant 0 0") + log = no_log_no_chat + end, +}) + +minetest.register_chatcommand("resume", { + description = "resumes the rumble program", + func = function() + log = log_only + end, +})