From f6ed5241b4f96ad8f9083c20173d7d16254eccd9 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Fri, 23 Jul 2021 14:12:20 -0700 Subject: [PATCH] documentation for wireframe stuff --- CHANGELOG.md | 2 +- Chat-Command-Reference.md | 25 +++++++++++++++++++ .../commands/wireframe/wbox.lua | 7 ++++-- .../commands/wireframe/wcorner.lua | 4 +-- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d2d61..28eeafa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Note to self: See the bottom of this file for the release template text. - Add `//sfactor` (_selection factor_) - Selection Tools by @VorTechnix are finished for now. - Add `mface` (_measure facing_), `midpos` (_measure middle position_), `msize` (_measure size_), `mtrig` (_measure trigonometry_) - Measuring Tools implemented by @VorTechnix. - Add `//airapply` for applying commands only to air nodes in the defined region - + - Add `wcorner` (_wireframe corners_), `wbox` (_wireframe box_), `wcompass` (_wireframe compass_) - Wireframes implemented by @VorTechnix. ## v1.12: The selection tools update (26th June 2021) - Add `//spush`, `//spop`, and `//sstack` diff --git a/Chat-Command-Reference.md b/Chat-Command-Reference.md index 142343e..1a0692a 100644 --- a/Chat-Command-Reference.md +++ b/Chat-Command-Reference.md @@ -253,6 +253,31 @@ Creates vertical walls of `` around the inside edges of the define //walls goldblock ``` +## `//wbox ` +Sets the edges of the current selection to ``to create an outline of a rectangular prism. Useful for roughing in walls. + +```weacmd +//wbox silver_sandstone +//wbox dirt +``` + +## `//wcompass []` +Creates a compass around pos1 with a single node bead pointing north (+Z). + +```weacmd +//wcompass meselamp +//wcompass desert_cobble torch +//wcompass gold diamond +``` + +## `//wcorner ` +Set the corners of the current selection to ``. Useful for outlining building sites and setting boundaries. + +```weacmd +//wcorner glass +//wcorner stone_with_iron +``` + ## `//scale | [ [ ` Advanced version of [`//stretch` from WorldEdit](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#stretch-stretchx-stretchy-stretchz) that can scale both up and down at the same time by transparently splitting it into 2 different operations. Scaling up is *always* done before scaling down. diff --git a/worldeditadditions_commands/commands/wireframe/wbox.lua b/worldeditadditions_commands/commands/wireframe/wbox.lua index bf8b98a..c2bd9c4 100644 --- a/worldeditadditions_commands/commands/wireframe/wbox.lua +++ b/worldeditadditions_commands/commands/wireframe/wbox.lua @@ -6,11 +6,14 @@ local wea = worldeditadditions local v3 = worldeditadditions.Vector3 worldedit.register_command("wbox", { - params = "", - description = "Set the corners of the current selection to ", + params = "", + description = "Sets the edges of the current selection to ", privs = {worldedit=true}, require_pos = 2, parse = function(params_text) + if params_text == "" then + return false, "Error: too few arguments! Expected: \"\"" + end local node = worldedit.normalize_nodename(params_text) if not node then return false, "invalid node name: " .. params_text diff --git a/worldeditadditions_commands/commands/wireframe/wcorner.lua b/worldeditadditions_commands/commands/wireframe/wcorner.lua index 5de03a3..af08d6f 100644 --- a/worldeditadditions_commands/commands/wireframe/wcorner.lua +++ b/worldeditadditions_commands/commands/wireframe/wcorner.lua @@ -5,8 +5,8 @@ -- ███ ███ ██████ ██████ ██ ██ ██ ████ ███████ ██ ██ local wea = worldeditadditions worldedit.register_command("wcorner", { - params = "", - description = "Set the corners of the current selection to ", + params = "", + description = "Set the corners of the current selection to ", privs = {worldedit=true}, require_pos = 2, parse = function(params_text)