sx, sy, sz = GetInt("size", 100, 30, 100)
roofx, roofy, roofz = GetFloat("roofColor", 0.4, 0.4, 0.4)
outside = GetString("outside", "", "brush vox")
inside = GetString("inside", "", "brush vox")
outsideOffset = GetInt("outsideOffset", 1)
insideOffset = GetInt("insideOffset", 1)
useBeams = GetInt("useBeams", 1)

e0, e1, e2, e3 = GetInt("extension", 4, 4, 4, 4)
height = {}

function init()
	local roof = CreateMaterial("plaster", roofx, roofy, roofz)
	local lakt = CreateMaterial("wood", .4, .3, .2)

	for x=0, sx do
		local q = x / (sx*0.5)
		height[x] = math.floor(q*sy)
	end
	for x=sx/2, sx do
		local q = 1.0 - (x-(sx*0.5)) / (sx*0.5)
		height[x] = math.floor(q*sy)
	end

	Vox(0,0,0)
	
	Material(roof)

	--Main
	for x=0, sx do
		local y = height[x]
		Box(x, y, -e0, x+1, y+2, sz+e1)
	end
	--Utskjut
	Box(-e2, -1, -e0, 0, 1, sz+e1)
	Box(sx, -1, -e0, sx+e3, 1, sz+e1)

	--Lakt
	Material(lakt)
	for x=0, sx,6 do
		local y = height[x]
		Box(x, y-1, -e0+1, x+1, y, sz+e1-1)
	end
end

