Alias //napply to //nodeapply

This commit is contained in:
Starbeamrainbowlabs 2024-05-25 14:48:38 +01:00
parent ffdd1b65b3
commit 170ec01bed
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 19 additions and 12 deletions

View file

@ -19,6 +19,8 @@ Note to self: See the bottom of this file for the release template text.
### Bugfixes and changes ### Bugfixes and changes
- Don't warn on failed registration of `//flora` → [`//bonemeal`](https://worldeditadditions.mooncarrot.space/Reference/#bonemeal) if the `bonemeal` mod isn't installed (e.g. in MineClone2) - thanks @VorTechnix in #106 - Don't warn on failed registration of `//flora` → [`//bonemeal`](https://worldeditadditions.mooncarrot.space/Reference/#bonemeal) if the `bonemeal` mod isn't installed (e.g. in MineClone2) - thanks @VorTechnix in #106
- Improve documentation of [`//noise2d`](https://worldeditadditions.mooncarrot.space/Reference/#noise2d). If it still doesn't make sense, please let me know. It's a complicated command that needs reworking a bit to be easier to use. - Improve documentation of [`//noise2d`](https://worldeditadditions.mooncarrot.space/Reference/#noise2d). If it still doesn't make sense, please let me know. It's a complicated command that needs reworking a bit to be easier to use.
- Alias `//napply` to [`//nodeapply`](https://worldeditadditions.mooncarrot.space/Reference/#nodeapply)
### Lua API changes ### Lua API changes
- Add `core.pos.get12(player_name, sort=false)` - Add `core.pos.get12(player_name, sort=false)`

View file

@ -1433,6 +1433,8 @@ As with `//ellipsoidapply` for advanced users `//multi` is also supported - but
### `//nodeapply <node_a> [<node_b>] [... <node_N>] -- <command_name> <args>` ### `//nodeapply <node_a> [<node_b>] [... <node_N>] -- <command_name> <args>`
**Aliases:** `//napply`
It's got `apply` in the name, so as you might imagine it works the same as [`//ellipsoidapply`](#ellipsoidapply), [`//airapply`](#airapply), [`//noiseapply2d`](#noiseapply2d), etc. Only changes made by the given command that replace nodes on the list given will be replaced. For example: It's got `apply` in the name, so as you might imagine it works the same as [`//ellipsoidapply`](#ellipsoidapply), [`//airapply`](#airapply), [`//noiseapply2d`](#noiseapply2d), etc. Only changes made by the given command that replace nodes on the list given will be replaced. For example:
```weacmd ```weacmd

View file

@ -1,27 +1,30 @@
local wea_c = worldeditadditions_core local core = worldeditadditions_core
wea_c.register_alias("smoothadv", "convolve") core.register_alias("smoothadv", "convolve")
wea_c.register_alias("conv", "convolve") core.register_alias("conv", "convolve")
wea_c.register_alias("naturalise", "layers") core.register_alias("naturalise", "layers")
wea_c.register_alias("naturalize", "layers") core.register_alias("naturalize", "layers")
if wea_c.command_exists("/bonemeal") then -- Commands prefixed with n affect nodes
core.register_alias("napply", "nodeapply")
if core.command_exists("/bonemeal") then
-- No need to log here, since we notify the server admin in the server logs in the dofile() for the main //bonemeal command -- No need to log here, since we notify the server admin in the server logs in the dofile() for the main //bonemeal command
wea_c.register_alias("flora", "bonemeal") core.register_alias("flora", "bonemeal")
end end
-- Measure Tools -- Measure Tools
wea_c.register_alias("mcount", "count") core.register_alias("mcount", "count")
wea_c.register_alias("mfacing", "mface") core.register_alias("mfacing", "mface")
--- Overrides to core WorldEdit commands that have been thoroughly tested --- Overrides to core WorldEdit commands that have been thoroughly tested
-- These are now enabled by default, but if you find a bug please report and -- These are now enabled by default, but if you find a bug please report and
-- it will be fixed as a matter of priority. -- it will be fixed as a matter of priority.
wea_c.register_alias("copy", "copy+", true) core.register_alias("copy", "copy+", true)
wea_c.register_alias("move", "move+", true) core.register_alias("move", "move+", true)
--- Overrides to core WorldEdit commands --- Overrides to core WorldEdit commands
-- These are disabled by default 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
@ -30,5 +33,5 @@ local worldmt_settings = Settings(minetest.get_worldpath().."/world.mt")
local should_override = worldmt_settings:get_bool("worldeditadditions_override_commands", false) local should_override = worldmt_settings:get_bool("worldeditadditions_override_commands", false)
if should_override then if should_override then
minetest.log("info", "[WorldEditAdditions] Enabling override aliases") minetest.log("info", "[WorldEditAdditions] Enabling override aliases")
wea_c.register_alias("replace", "replacemix", true) core.register_alias("replace", "replacemix", true)
end end