diff options
author | Brandon Bohannon <brandon@bremaweb.com> | 2013-02-16 00:07:16 -0600 |
---|---|---|
committer | Brandon Bohannon <brandon@bremaweb.com> | 2013-02-16 00:07:16 -0600 |
commit | e83f5144665edafd80b5f99435cf12f66e37432d (patch) | |
tree | 1ff7d9dd7537d99980f4c57cbfe1a22900efea14 /fire.lua | |
parent | 6537ff75ae31a13b5f9160127c484911477c0e6b (diff) |
initial commit
Diffstat (limited to 'fire.lua')
-rw-r--r-- | fire.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fire.lua b/fire.lua new file mode 100644 index 0000000..a03376c --- /dev/null +++ b/fire.lua @@ -0,0 +1,20 @@ +if minetest.get_modpath("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 + |