2020-12-05 20:03:01 -08:00
|
|
|
-- CHAT COMMANDS
|
2020-12-06 10:57:53 -08:00
|
|
|
if adv_core.setting("enable_chat_commands",true) then
|
2020-12-05 20:03:01 -08:00
|
|
|
|
2020-12-07 20:41:27 -08:00
|
|
|
if adv_core.setting("enable_adventure_shop_chat",true) then
|
|
|
|
minetest.register_chatcommand("shop", {
|
|
|
|
params = "<name> <privilege>",
|
|
|
|
|
|
|
|
description = "Browse the Adventure Shop",
|
|
|
|
|
|
|
|
privs = {interact = true},
|
|
|
|
|
|
|
|
func = function(name)
|
|
|
|
minetest.show_formspec(name, "adventure_core:store", adv_core.store_formspec(name, 1, "", ""))
|
|
|
|
return true
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
if adv_core.setting("enable_adventure_shop_chat_build",true) then
|
|
|
|
minetest.register_chatcommand("make_shop", {
|
|
|
|
params = "<name> <privilege>",
|
|
|
|
|
|
|
|
description = "Generate the Adventure Shop",
|
|
|
|
|
|
|
|
privs = {interact = true},
|
|
|
|
|
|
|
|
func = function(name)
|
|
|
|
return true
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end
|
2020-12-06 10:57:53 -08:00
|
|
|
|
2020-12-06 20:10:41 -08:00
|
|
|
minetest.register_chatcommand("pouch", {
|
|
|
|
params = "<name> <privilege>",
|
|
|
|
|
|
|
|
description = "Check your element pouch",
|
|
|
|
|
|
|
|
privs = {interact = true},
|
|
|
|
|
|
|
|
func = function (name)
|
|
|
|
minetest.show_formspec(name, "adventure_core:pouch", adv_core.pouch_formspec(name))
|
|
|
|
return true
|
|
|
|
end,
|
|
|
|
})
|
2020-12-06 10:57:53 -08:00
|
|
|
|
2020-12-06 20:10:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
--Priv only API commands
|
2020-12-06 10:57:53 -08:00
|
|
|
|
2020-12-06 20:10:41 -08:00
|
|
|
--Set player pouch contents
|
2020-12-06 10:57:53 -08:00
|
|
|
|
2020-12-06 20:10:41 -08:00
|
|
|
--spawn elements
|
|
|
|
|
|
|
|
--
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_chatcommand("guidebook", {
|
|
|
|
params = "<name> <privilege>",
|
|
|
|
|
|
|
|
description = "Read the Adventure_Core Guide",
|
|
|
|
|
|
|
|
privs = {interact = true},
|
|
|
|
|
|
|
|
func = function (name)
|
|
|
|
minetest.show_formspec(name, "adventure_core:guidebook", adv_core.guide_formspec(name))
|
|
|
|
return true
|
|
|
|
end,
|
|
|
|
})
|