mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-21 23:13:00 +00:00
Fix override aliases
This commit is contained in:
parent
af7d39110b
commit
64ff61a4d2
3 changed files with 9 additions and 5 deletions
|
@ -33,6 +33,7 @@ read_globals = {
|
|||
"describe",
|
||||
"bonemeal",
|
||||
"dofile",
|
||||
"PerlinNoise"
|
||||
"PerlinNoise",
|
||||
"Settings"
|
||||
}
|
||||
std = "max"
|
||||
|
|
|
@ -15,9 +15,12 @@ wea_c.register_alias("mfacing", "mface")
|
|||
|
||||
|
||||
--- Overrides to core WorldEdit commands
|
||||
-- These are commented out for now, as they could be potentially dangerous to stability
|
||||
-- Thorough testing is required of our replacement commands before these are uncommented
|
||||
if minetest.settings:get_bool("worldeditadditions.override_commands", false) then
|
||||
-- These are disabled by default for now, as they could be potentially dangerous to stability
|
||||
-- Thorough testing is required of our replacement commands before these are enabled by default
|
||||
local worldmt_settings = Settings(minetest.get_worldpath().."/world.mt")
|
||||
local should_override = worldmt_settings:get_bool("worldeditadditions_override_commands", false)
|
||||
if should_override then
|
||||
minetest.log("info", "[WorldEditAdditions] Enabling override aliases")
|
||||
worldeditadditions_core.register_alias("copy", "copy+", true)
|
||||
worldeditadditions_core.register_alias("move", "move+", true)
|
||||
worldeditadditions_core.register_alias("replace", "replacemix", true)
|
||||
|
|
|
@ -16,7 +16,7 @@ local function register_alias(cmdname_target, cmdname_source, override)
|
|||
return false
|
||||
end
|
||||
|
||||
print("DEBUG ALIAS source "..cmdname_source.." target "..cmdname_target)
|
||||
-- print("DEBUG ALIAS source "..cmdname_source.." target "..cmdname_target)
|
||||
|
||||
if minetest.chatcommands["/"..cmdname_target] then
|
||||
minetest.override_chatcommand(
|
||||
|
|
Loading…
Reference in a new issue