mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-23 15:43:50 +01:00
//replacemix: fix crash caused by invalid invocation
This commit is contained in:
parent
75d40d7a6c
commit
be3166624a
@ -26,6 +26,7 @@ Note to self: See the bottom of this file for the release template text.
|
||||
- `moretrees:apple_tree_sapling_ongen` from `apple` to `apple_moretrees`
|
||||
- Add `plum` → `plumtree:sapling`
|
||||
- Add `holly` ⇒ `hollytree:sapling`
|
||||
- `//replacemix`: Improve error handling to avoid crashes (thanks, Jonathon for reporting via Discord!)
|
||||
|
||||
|
||||
## v1.12: The selection tools update (26th June 2021)
|
||||
|
@ -53,6 +53,9 @@ worldedit.register_command("replacemix", {
|
||||
end
|
||||
end
|
||||
end
|
||||
if not target_node then return false, "Error: No target node specified." end
|
||||
if not last_node_name then return false, "Error: At least 1 replace node must be specified." end
|
||||
|
||||
if not replace_nodes[last_node_name] then
|
||||
replace_nodes[last_node_name] = 1
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user