From 9020948dc514b03e5b8f83f71ec1c3ab92d5eef6 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 19 Jul 2021 00:26:19 +0100 Subject: [PATCH 1/4] bit polyfill: fix undeclared global accessed warning --- worldeditadditions/utils/bit.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/worldeditadditions/utils/bit.lua b/worldeditadditions/utils/bit.lua index ca5b33f..05b6341 100644 --- a/worldeditadditions/utils/bit.lua +++ b/worldeditadditions/utils/bit.lua @@ -12,7 +12,13 @@ -- Docs: http://bitop.luajit.org/api.html -- module: bit -local bit = bit or {} + +local bit +if minetest.global_exists("bit") then + bit = bit +else + bit = {} +end bit.bits = 32 bit.powtab = { 1 } From 73e07eb01373cfb0311a29cc637701400ac55c58 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 19 Jul 2021 00:26:52 +0100 Subject: [PATCH 2/4] bit polyfill: tiny tweak --- worldeditadditions/utils/bit.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/worldeditadditions/utils/bit.lua b/worldeditadditions/utils/bit.lua index 05b6341..e68f22e 100644 --- a/worldeditadditions/utils/bit.lua +++ b/worldeditadditions/utils/bit.lua @@ -18,14 +18,15 @@ if minetest.global_exists("bit") then bit = bit else bit = {} + + bit.bits = 32 + bit.powtab = { 1 } + + for b = 1, bit.bits - 1 do + bit.powtab[#bit.powtab + 1] = math.pow(2, b) + end end -bit.bits = 32 -bit.powtab = { 1 } - -for b = 1, bit.bits - 1 do - bit.powtab[#bit.powtab + 1] = math.pow(2, b) -end -- Functions -- bit.band From 22c404b320c0ba6d4445ec4d695e4d9cb43b5a11 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 21 Jul 2021 02:29:05 +0100 Subject: [PATCH 3/4] build.sh: only do ci tasks on main branch --- build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.sh b/build.sh index ea083f7..3c6be47 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash set -e; +current_branch="$(git rev-parse --abbrev-ref HEAD)"; + +if [[ "${1}" == "ci" ]] && [[ "${current_branch}" != "main" ]]; then + echo "Skipping build, because we are currently on the branch '${current_branch}', and we only deploy on the 'main' branch."; +fi + # ██████ ██ ██████ ██ ██ ██ ██ ██████ # ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ # ██ ██ ██████ ██ ██ ██ ██ ██ ██ From 19404484a067ed394f38d0f09915316872db3bc9 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Wed, 21 Jul 2021 12:37:52 -0700 Subject: [PATCH 4/4] Preserve Air During Schematic Load --- Cookbook.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cookbook.md b/Cookbook.md index da0595f..824e7c9 100644 --- a/Cookbook.md +++ b/Cookbook.md @@ -35,6 +35,13 @@ The following brushes together can make large-scale terrain sculpting easy: //brush cubeapply 50 layers dirt_with_grass dirt 3 stone 10 ``` +## Preserve Air During Schematic Load +`//load` only writes non-air blocks in a saved WorldEdit schematic. To get around this the `//allocate` command was created so that users could set the target area to air before the new nodes were written. The following command applies this work flow (replace `` with the name of your schematic before using the command): + +``` +//multi //allocate //set air //load +``` + ## En-mass Foliage clearing Clearing large amounts of foliage is easy!