Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F278489
init.lua
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
709 B
Referenced Files
None
Subscribers
None
init.lua
View Options
-- 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
,
})
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 12, 7:44 PM (1 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f2/07/6814dba207cb2d8b7d4a2a845378
Default Alt Text
init.lua (709 B)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment