Centralise all command aliases

This should avoid any crashes on startup because worldedit.alias_command 
is nil too (strange!)
This commit is contained in:
Starbeamrainbowlabs 2020-06-11 01:00:19 +01:00
parent caf56313cd
commit b8a5bec987
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
4 changed files with 9 additions and 8 deletions

View file

@ -59,5 +59,3 @@ function worldeditadditions.bonemeal(pos1, pos2, strength, chance)
return true, nodes_bonemealed, candidates return true, nodes_bonemealed, candidates
end end
worldedit.alias_command("flora", "bonemeal")

View file

@ -72,6 +72,3 @@ worldedit.register_command("convolve", {
return true, "Added "..stats.added.." and removed "..stats.removed.." nodes in " .. time_taken .. "s" return true, "Added "..stats.added.." and removed "..stats.removed.." nodes in " .. time_taken .. "s"
end end
}) })
worldedit.alias_command("smoothadv", "convolve")
worldedit.alias_command("conv", "convolve")

View file

@ -31,6 +31,3 @@ worldedit.register_command("layers", {
return true, changes.replaced .. " nodes replaced and " .. changes.skipped_columns .. " columns skipped in " .. time_taken .. "s" return true, changes.replaced .. " nodes replaced and " .. changes.skipped_columns .. " columns skipped in " .. time_taken .. "s"
end end
}) })
worldedit.alias_command("naturalise", "layers")
worldedit.alias_command("naturalize", "layers")

View file

@ -35,3 +35,12 @@ if minetest.get_modpath("bonemeal") then
else else
minetest.log("action", "[WorldEditAdditions] bonemeal mod not detected: //bonemeal command not registered (if you see this message and you're using an alternative mod that provides bonemeal, please get in touch by opening an issue)") minetest.log("action", "[WorldEditAdditions] bonemeal mod not detected: //bonemeal command not registered (if you see this message and you're using an alternative mod that provides bonemeal, please get in touch by opening an issue)")
end end
worldedit.alias_command("smoothadv", "convolve")
worldedit.alias_command("conv", "convolve")
worldedit.alias_command("naturalise", "layers")
worldedit.alias_command("naturalize", "layers")
worldedit.alias_command("flora", "bonemeal")