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".
This commit is contained in:
Chris N 2015-01-08 16:23:26 -10:00
parent 112c18a011
commit ee06c5e176

View File

@ -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) function caverealms:above_solid(x,y,z,area,data)
local c_air = minetest.get_content_id("air") 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) 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 return false
else else
return true return true
@ -18,8 +26,16 @@ function caverealms:above_solid(x,y,z,area,data)
end end
function caverealms:below_solid(x,y,z,area,data) function caverealms:below_solid(x,y,z,area,data)
local c_air = minetest.get_content_id("air") 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) 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 return false
else else
return true return true
@ -443,7 +459,7 @@ end
-- Experimental and very geometric function to create giant octagonal crystals in a variety of random directions -- 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 -- Uses calculations for points on a sphere, lines in geometric space
-- CURRENTLY USELESS, NOT LIKELY TO BE IMPLEMENTED SOON -- 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 --Grab content id's... diamond is a placeholder
local c_crys = minetest.get_content_id("default:diamondblock") local c_crys = minetest.get_content_id("default:diamondblock")