mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-04 23:03:51 +01:00
Fix chatcommand not under mcl_structures in /help
This commit is contained in:
parent
726d1f07fa
commit
92da429f50
@ -573,16 +573,9 @@ end
|
|||||||
|
|
||||||
dofile(modpath.."/api.lua")
|
dofile(modpath.."/api.lua")
|
||||||
|
|
||||||
minetest.register_on_mods_loaded(function()
|
-- Debug command
|
||||||
-- Debug command
|
minetest.register_chatcommand("spawnstruct", {
|
||||||
local chatcommand_params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_exit_portal_open | end_gateway_portal | end_portal_shrine | nether_portal | dungeon"
|
params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_exit_portal_open | end_gateway_portal | end_portal_shrine | nether_portal | dungeon",
|
||||||
|
|
||||||
for n,_ in pairs(mcl_structures.registered_structures) do
|
|
||||||
chatcommand_params = chatcommand_params .. " | "..n
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_chatcommand("spawnstruct", {
|
|
||||||
params = chatcommand_params,
|
|
||||||
description = S("Generate a pre-defined structure near your position."),
|
description = S("Generate a pre-defined structure near your position."),
|
||||||
privs = {debug = true},
|
privs = {debug = true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
@ -642,5 +635,11 @@ minetest.register_on_mods_loaded(function()
|
|||||||
minetest.chat_send_player(name, S("Use /help spawnstruct to see a list of avaiable types."))
|
minetest.chat_send_player(name, S("Use /help spawnstruct to see a list of avaiable types."))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
minetest.register_on_mods_loaded(function()
|
||||||
|
local p = ""
|
||||||
|
for n,_ in pairs(mcl_structures.registered_structures) do
|
||||||
|
p = p .. " | "..n
|
||||||
|
end
|
||||||
|
minetest.registered_chatcommands["spawnstruct"].params = minetest.registered_chatcommands["spawnstruct"].params .. p
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user