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! 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 + # ██████ ██ ██████ ██ ██ ██ ██ ██████ # ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ # ██ ██ ██████ ██ ██ ██ ██ ██ ██ diff --git a/worldeditadditions/utils/bit.lua b/worldeditadditions/utils/bit.lua index ca5b33f..e68f22e 100644 --- a/worldeditadditions/utils/bit.lua +++ b/worldeditadditions/utils/bit.lua @@ -12,15 +12,22 @@ -- Docs: http://bitop.luajit.org/api.html -- module: bit -local bit = bit or {} -bit.bits = 32 -bit.powtab = { 1 } - -for b = 1, bit.bits - 1 do - bit.powtab[#bit.powtab + 1] = math.pow(2, b) +local bit +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 + -- Functions -- bit.band if not bit.band then