Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F261858
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/twi_cmds/init.lua b/twi_cmds/init.lua
new file mode 100644
index 0000000..8cdd9dc
--- /dev/null
+++ b/twi_cmds/init.lua
@@ -0,0 +1,21 @@
+-- twi_mods/twi_cmds/init.lua
+-- commands
+-- Copyright (C) 2024 1F616EMO
+-- SPDX-License-Identifier: LGPL-3.0-or-later
+
+local S = minetest.get_translator("twi_cmds")
+
+minetest.register_chatcommand("day", {
+ privs = { ban = true },
+ description = S("Set time to day"),
+ func = function()
+ minetest.set_timeofday(0.3125)
+ for _, player in ipairs(minetest.get_connected_players()) do
+ local name = player:get_player_name()
+ background_music.set_start_play_gap(name, 2)
+ background_music.decide_and_play(player, true)
+ end
+ minetest.sound_play("ui_morning", { gain = 1.0 })
+ return true, S("Successfully set time to day.")
+ end,
+})
diff --git a/twi_cmds/mod.conf b/twi_cmds/mod.conf
new file mode 100644
index 0000000..0706aa0
--- /dev/null
+++ b/twi_cmds/mod.conf
@@ -0,0 +1 @@
+name = twi_cmds
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Jun 10, 5:15 AM (3 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c8/21/3235eff286e8ce11fb4e3c1c8c70
Default Alt Text
(1 KB)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment