Merge various fire's bug fixs and doors textures
@ -138,8 +138,8 @@ minetest.register_craftitem(":bucket:bucket_empty", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Check if pointing to a liquid source.
|
-- Check if pointing to a liquid source.
|
||||||
node = minetest.get_node(pointed_thing.under)
|
local node = minetest.get_node(pointed_thing.under)
|
||||||
liquiddef = bucket.liquids[node.name]
|
local liquiddef = bucket.liquids[node.name]
|
||||||
if liquiddef ~= nil and liquiddef.itemname ~= nil and
|
if liquiddef ~= nil and liquiddef.itemname ~= nil and
|
||||||
(node.name == liquiddef.source or
|
(node.name == liquiddef.source or
|
||||||
(node.name == liquiddef.flowing and
|
(node.name == liquiddef.flowing and
|
||||||
|
@ -405,7 +405,7 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
if not do_preserve then
|
if not do_preserve then
|
||||||
-- Drop stuff other than the node itself:
|
-- Drop stuff other than the node itself:
|
||||||
itemstacks = minetest.get_node_drops(n0.name)
|
local itemstacks = minetest.get_node_drops(n0.name)
|
||||||
for _, itemname in ipairs(itemstacks) do
|
for _, itemname in ipairs(itemstacks) do
|
||||||
if minetest.get_item_group(n0.name, "leafdecay_drop") ~= 0
|
if minetest.get_item_group(n0.name, "leafdecay_drop") ~= 0
|
||||||
or itemname ~= n0.name then
|
or itemname ~= n0.name then
|
||||||
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 461 B |
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 539 B |
@ -15,16 +15,15 @@ minetest.register_node("fire:basic_flame", {
|
|||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
damage_per_second = 4,
|
damage_per_second = 4,
|
||||||
|
|
||||||
after_place_node = function(pos, placer)
|
on_construct = function(pos, placer)
|
||||||
fire.on_flame_add_at(pos)
|
fire.on_flame_add_at(pos)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
on_destruct = function(pos, oldnode, oldmetadata, digger)
|
||||||
fire.on_flame_remove_at(pos)
|
fire.on_flame_remove_at(pos)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
fire = {}
|
|
||||||
fire.D = 6
|
fire.D = 6
|
||||||
-- key: position hash of low corner of area
|
-- key: position hash of low corner of area
|
||||||
-- value: {handle=sound handle, name=sound name}
|
-- value: {handle=sound handle, name=sound name}
|
||||||
@ -81,12 +80,10 @@ function fire.update_sounds_around(pos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function fire.on_flame_add_at(pos)
|
function fire.on_flame_add_at(pos)
|
||||||
--print("flame added at "..minetest.pos_to_string(pos))
|
|
||||||
fire.update_sounds_around(pos)
|
fire.update_sounds_around(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
function fire.on_flame_remove_at(pos)
|
function fire.on_flame_remove_at(pos)
|
||||||
--print("flame removed at "..minetest.pos_to_string(pos))
|
|
||||||
fire.update_sounds_around(pos)
|
fire.update_sounds_around(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -117,7 +114,6 @@ minetest.register_abm({
|
|||||||
local p = fire.find_pos_for_flame_around(p0)
|
local p = fire.find_pos_for_flame_around(p0)
|
||||||
if p then
|
if p then
|
||||||
minetest.set_node(p, {name="fire:basic_flame"})
|
minetest.set_node(p, {name="fire:basic_flame"})
|
||||||
fire.on_flame_add_at(p)
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -143,7 +139,6 @@ minetest.register_abm({
|
|||||||
local p2 = fire.find_pos_for_flame_around(p)
|
local p2 = fire.find_pos_for_flame_around(p)
|
||||||
if p2 then
|
if p2 then
|
||||||
minetest.set_node(p2, {name="fire:basic_flame"})
|
minetest.set_node(p2, {name="fire:basic_flame"})
|
||||||
fire.on_flame_add_at(p2)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@ -158,7 +153,6 @@ minetest.register_abm({
|
|||||||
-- If there is water or stuff like that around flame, remove flame
|
-- If there is water or stuff like that around flame, remove flame
|
||||||
if fire.flame_should_extinguish(p0) then
|
if fire.flame_should_extinguish(p0) then
|
||||||
minetest.remove_node(p0)
|
minetest.remove_node(p0)
|
||||||
fire.on_flame_remove_at(p0)
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Make the following things rarer
|
-- Make the following things rarer
|
||||||
@ -168,7 +162,6 @@ minetest.register_abm({
|
|||||||
-- If there are no flammable nodes around flame, remove flame
|
-- If there are no flammable nodes around flame, remove flame
|
||||||
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
|
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
|
||||||
minetest.remove_node(p0)
|
minetest.remove_node(p0)
|
||||||
fire.on_flame_remove_at(p0)
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if math.random(1,4) == 1 then
|
if math.random(1,4) == 1 then
|
||||||
@ -185,7 +178,6 @@ minetest.register_abm({
|
|||||||
else
|
else
|
||||||
-- remove flame
|
-- remove flame
|
||||||
minetest.remove_node(p0)
|
minetest.remove_node(p0)
|
||||||
fire.on_flame_remove_at(p0)
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|