summaryrefslogtreecommitdiff
path: root/fire.lua
blob: 786c67b0837efd0c07f4b74670139133e39e9ccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if minetest.get_modpath("fire") and rawget(_G, "fire") then
	landrush.default_flame_should_extinguish = fire.flame_should_extinguish

	function fire.flame_should_extinguish(pos)
		corner0 = landrush.can_interact({x=pos.x-1,y=pos.y-1,z=pos.z-1},"-!-")
		corner1 = landrush.can_interact({x=pos.x-1,y=pos.y-1,z=pos.z+1},"-!-")
		corner2 = landrush.can_interact({x=pos.x-1,y=pos.y+1,z=pos.z-1},"-!-")
		corner3 = landrush.can_interact({x=pos.x-1,y=pos.y+1,z=pos.z+1},"-!-")
		corner4 = landrush.can_interact({x=pos.x+1,y=pos.y-1,z=pos.z-1},"-!-")
		corner5 = landrush.can_interact({x=pos.x+1,y=pos.y-1,z=pos.z+1},"-!-")
		corner6 = landrush.can_interact({x=pos.x+1,y=pos.y+1,z=pos.z-1},"-!-")
		corner7 = landrush.can_interact({x=pos.x+1,y=pos.y+1,z=pos.z+1},"-!-")
		if corner0 and corner1 then
			return landrush.default_flame_should_extinguish(pos)
		else
			return true
		end
	end
end