Default: Prevent placing sapling if grown tree intersects protection
authorparamat <mat.gregory@virginmedia.com>
Tue, 19 Jul 2016 00:01:59 +0000 (01:01 +0100)
committerparamat <mat.gregory@virginmedia.com>
Wed, 27 Jul 2016 20:39:22 +0000 (21:39 +0100)
commit0ac096991c51d664007ebb53b8117baca0271459
treefcbedaa558e8ed96a2ca6d425db03bac9c671ffb
parent2df7ce20dd8290b677cc32c4b4a1bde3654c137f
Default: Prevent placing sapling if grown tree intersects protection

Add a global 'intersects protection' function to functions.lua for
checking if a specified volume intersects with a protected volume.
A 3D lattice of points are checked with an adjustable interval.
Add a global 'sapling on place' function to avoid duplicated code in
nodes.lua.
mods/default/functions.lua
mods/default/nodes.lua
mods/default/trees.lua