add stop and resume command

This commit is contained in:
Li0n 2022-02-25 23:30:34 +01:00
parent 8b497cbeaa
commit 2709bd0041
1 changed files with 18 additions and 1 deletions

View File

@ -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,
})