Add game_sounds priv.
parent
bd6892e368
commit
352e15cbcd
11
init.lua
11
init.lua
|
@ -3,7 +3,8 @@
|
|||
-- GPL3+
|
||||
gen_music = {}
|
||||
local se = minetest.request_insecure_environment()
|
||||
local show_st = minetest.settings:get_bool("show_sound_travelers")
|
||||
local settings = minetest.settings
|
||||
local show_st = settings:get_bool("show_sound_travelers")
|
||||
|
||||
gen_music.songs = {}
|
||||
local mod_name = minetest.get_current_modname()
|
||||
|
@ -317,10 +318,16 @@ gen_music.gs = function(object, song, loop)
|
|||
end)
|
||||
end
|
||||
|
||||
-- Restrict usage until further testing has been done.
|
||||
minetest.register_privilege("game_sounds", {
|
||||
description = "Can use /gs command.",
|
||||
give_to_singleplayer = true,
|
||||
give_to_admin = true,
|
||||
})
|
||||
minetest.register_chatcommand("gs", {
|
||||
description = "Play and load game sound sequences.",
|
||||
params = "[load <file>] [list] [stop] [song <duration>]",
|
||||
privs = nil, --"game_sounds",
|
||||
privs = "game_sounds",
|
||||
func = function(name, param)
|
||||
param = param:split(" ")
|
||||
local player = minetest.get_player_by_name(name)
|
||||
|
|
Loading…
Reference in New Issue