Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F155181
init.lua
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
689 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
=
core
.
get_translator
(
"twi_cmds"
)
core
.
register_chatcommand
(
"day"
,
{
privs
=
{
ban
=
true
},
description
=
S
(
"Set time to day"
),
func
=
function
()
core
.
set_timeofday
(
0.3125
)
for
_
,
player
in
ipairs
(
core
.
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
core
.
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
Sat, Feb 21, 8:54 AM (1 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b6/e9/f56d633099c502a1d34295d2732b
Default Alt Text
init.lua (689 B)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment