mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-12 04:33:15 +01:00
fixes
This commit is contained in:
parent
3f1b12e327
commit
658028e90a
@ -90,6 +90,12 @@ mcl_commands.types = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mcl_commands.match_param(string, type, params)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
mcl_commands.registered_commands = {}
|
||||||
|
|
||||||
function mcl_commands.register_complex_command()
|
function mcl_commands.register_complex_command()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -97,8 +103,10 @@ end
|
|||||||
function mcl_commands.register_basic_command(name, def)
|
function mcl_commands.register_basic_command(name, def)
|
||||||
local func
|
local func
|
||||||
if def.params then
|
if def.params then
|
||||||
|
local funcparams =
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
mcl_commands.registered_commands[name] = {type = "basic", description = def.desc, privs = def.privs}
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
if param == "" then
|
if param == "" then
|
||||||
local out, msg = def.func(name)
|
local out, msg = def.func(name)
|
||||||
@ -128,6 +136,17 @@ mcl_commands.register_basic_command("test", {
|
|||||||
})
|
})
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
mcl_commands.register_basic_command("testb", {
|
||||||
|
description = S("testing command"),
|
||||||
|
params = {
|
||||||
|
{type="bool"},
|
||||||
|
{type="int", params={min=1, max=10}}
|
||||||
|
},
|
||||||
|
func = function(name, bool, int)
|
||||||
|
return true, "test: "..int
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
function mcl_commands.alias_command(alias, original_name, bypass_setting)
|
function mcl_commands.alias_command(alias, original_name, bypass_setting)
|
||||||
if minetest.settings:get_bool("mcl_builtin_commands_overide", true) or bypass_setting then
|
if minetest.settings:get_bool("mcl_builtin_commands_overide", true) or bypass_setting then
|
||||||
local def = minetest.registered_chatcommands[original_name]
|
local def = minetest.registered_chatcommands[original_name]
|
||||||
|
Loading…
Reference in New Issue
Block a user