diff --git a/CHANGELOG.md b/CHANGELOG.md index 56f5107..e706c8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ Note to self: See the bottom of this file for the release template text. - Fix crash if no arguments are specified - Fix automatic seed when generating many mazes in the same second (e.g. with `//for`, `//many`) - `//convolve`: Fix those super tall pillars appearing randomly + - cloud wand: improve feedback messages sent to players ## v1.12: The selection tools update (26th June 2021) diff --git a/worldeditadditions/lib/selection/selection.lua b/worldeditadditions/lib/selection/selection.lua index e32fc08..a1e5ed0 100644 --- a/worldeditadditions/lib/selection/selection.lua +++ b/worldeditadditions/lib/selection/selection.lua @@ -13,6 +13,7 @@ local selection = {} -- @param pos vector The position to include. function selection.add_point(name, pos) if pos ~= nil then + local created_new = not worldedit.pos1[name] or not worldedit.pos2[name] -- print("[set_pos1]", name, "("..pos.x..", "..pos.y..", "..pos.z..")") if not worldedit.pos1[name] then worldedit.pos1[name] = vector.new(pos) end if not worldedit.pos2[name] then worldedit.pos2[name] = vector.new(pos) end @@ -26,9 +27,17 @@ function selection.add_point(name, pos) local volume_after = worldedit.volume(worldedit.pos1[name], worldedit.pos2[name]) local volume_difference = volume_after - volume_before + if volume_difference == 0 and created_new then + volume_difference = 1 + end + + local msg = "Expanded region by " + if created_new then msg = "Created new region with " end + msg = msg..volume_difference.." node" + if volume_difference ~= 1 then msg = msg.."s" end worldedit.marker_update(name) - worldedit.player_notify(name, "Expanded region by "..volume_difference.." nodes") + worldedit.player_notify(name, msg) else worldedit.player_notify(name, "Error: Too far away (try raising your maxdist with //farwand maxdist )") -- print("[set_pos1]", name, "nil")