mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-08-20 13:34:05 +02:00
Fix override aliases
This commit is contained in:
parent
af7d39110b
commit
64ff61a4d2
@ -33,6 +33,7 @@ read_globals = {
|
|||||||
"describe",
|
"describe",
|
||||||
"bonemeal",
|
"bonemeal",
|
||||||
"dofile",
|
"dofile",
|
||||||
"PerlinNoise"
|
"PerlinNoise",
|
||||||
|
"Settings"
|
||||||
}
|
}
|
||||||
std = "max"
|
std = "max"
|
||||||
|
@ -15,9 +15,12 @@ wea_c.register_alias("mfacing", "mface")
|
|||||||
|
|
||||||
|
|
||||||
--- Overrides to core WorldEdit commands
|
--- Overrides to core WorldEdit commands
|
||||||
-- These are commented out for now, as they could be potentially dangerous to stability
|
-- 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 uncommented
|
-- Thorough testing is required of our replacement commands before these are enabled by default
|
||||||
if minetest.settings:get_bool("worldeditadditions.override_commands", false) then
|
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("copy", "copy+", true)
|
||||||
worldeditadditions_core.register_alias("move", "move+", true)
|
worldeditadditions_core.register_alias("move", "move+", true)
|
||||||
worldeditadditions_core.register_alias("replace", "replacemix", true)
|
worldeditadditions_core.register_alias("replace", "replacemix", true)
|
||||||
|
@ -16,7 +16,7 @@ local function register_alias(cmdname_target, cmdname_source, override)
|
|||||||
return false
|
return false
|
||||||
end
|
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
|
if minetest.chatcommands["/"..cmdname_target] then
|
||||||
minetest.override_chatcommand(
|
minetest.override_chatcommand(
|
||||||
|
Loading…
Reference in New Issue
Block a user