From ee06c5e1761a7e3c96ccfa021455d6eb7670141f Mon Sep 17 00:00:00 2001 From: Chris N Date: Thu, 8 Jan 2015 16:23:26 -1000 Subject: [PATCH] Fix giant mushrooms not spawning, more Moontest Unintentional function overwrite disabled giant mushrooms... Optimization for Moontest that causes stalagmites, etc. not to consider vacuum as "solid ground". --- functions.lua | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/functions.lua b/functions.lua index 3b3e38f..1504bec 100644 --- a/functions.lua +++ b/functions.lua @@ -9,8 +9,16 @@ local H_CLAC = caverealms.config.h_clac --13 --max height of glow crystal stalac function caverealms:above_solid(x,y,z,area,data) local c_air = minetest.get_content_id("air") + + local c_vac + if (minetest.get_modpath("moontest")) then + c_vac = minetest.get_content_id("moontest:vacuum") + else + c_vac = minetest.get_content_id("air") + end + local ai = area:index(x,y+1,z-3) - if data[ai] == c_air then + if data[ai] == c_air or data[ai] == c_vac then return false else return true @@ -18,8 +26,16 @@ function caverealms:above_solid(x,y,z,area,data) end function caverealms:below_solid(x,y,z,area,data) local c_air = minetest.get_content_id("air") + + local c_vac + if (minetest.get_modpath("moontest")) then + c_vac = minetest.get_content_id("moontest:vacuum") + else + c_vac = minetest.get_content_id("air") + end + local ai = area:index(x,y-1,z-3) - if data[ai] == c_air then + if data[ai] == c_air or data[ai] == c_vac then return false else return true @@ -443,7 +459,7 @@ end -- Experimental and very geometric function to create giant octagonal crystals in a variety of random directions -- Uses calculations for points on a sphere, lines in geometric space -- CURRENTLY USELESS, NOT LIKELY TO BE IMPLEMENTED SOON -function caverealms:giant_shroom(x, y, z, area, data) +function caverealms:octagon(x, y, z, area, data) --Grab content id's... diamond is a placeholder local c_crys = minetest.get_content_id("default:diamondblock")