From 9bfb428c3f042a1b1e4b414c0c095f55cc7bc1c1 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 24 May 2022 00:11:22 +0100 Subject: [PATCH] add override aliases behind a setting --- worldeditadditions_commands/aliases.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/worldeditadditions_commands/aliases.lua b/worldeditadditions_commands/aliases.lua index bf102f6..28d3bc6 100644 --- a/worldeditadditions_commands/aliases.lua +++ b/worldeditadditions_commands/aliases.lua @@ -1,5 +1,6 @@ local wea_c = worldeditadditions_core + wea_c.register_alias("smoothadv", "convolve") wea_c.register_alias("conv", "convolve") @@ -16,8 +17,8 @@ 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 --- TODO: Depend on worldeditadditions_core before uncommenting this --- BUG: //move+ seems to be leaving stuff behind for some strange reason --@sbrl 2021-12-26 --- worldeditadditions_core.alias_override("copy", "copy+") --- worldeditadditions_core.alias_override("move", "move+") -- MAY have issues where it doesn't overwrite the old region properly, but haven't been able to reliably reproduce this --- worldeditadditions_core.alias_override("replace", "replacemix") +if minetest.settings:get_bool("worldeditadditions.override_commands", false) then + worldeditadditions_core.register_alias("copy", "copy+", true) + worldeditadditions_core.register_alias("move", "move+", true) + worldeditadditions_core.register_alias("replace", "replacemix", true) +end