1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Merge various fire's bug fixs and doors textures

This commit is contained in:
LeMagnesium 2014-12-14 22:33:57 +01:00
parent a0987886e7
commit 57b2df5054
9 changed files with 5 additions and 13 deletions

View File

@ -138,8 +138,8 @@ minetest.register_craftitem(":bucket:bucket_empty", {
return
end
-- Check if pointing to a liquid source.
node = minetest.get_node(pointed_thing.under)
liquiddef = bucket.liquids[node.name]
local node = minetest.get_node(pointed_thing.under)
local liquiddef = bucket.liquids[node.name]
if liquiddef ~= nil and liquiddef.itemname ~= nil and
(node.name == liquiddef.source or
(node.name == liquiddef.flowing and

View File

@ -405,7 +405,7 @@ minetest.register_abm({
end
if not do_preserve then
-- 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
if minetest.get_item_group(n0.name, "leafdecay_drop") ~= 0
or itemname ~= n0.name then

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 565 B

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 539 B

View File

@ -15,16 +15,15 @@ minetest.register_node("fire:basic_flame", {
buildable_to = true,
damage_per_second = 4,
after_place_node = function(pos, placer)
on_construct = function(pos, placer)
fire.on_flame_add_at(pos)
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
on_destruct = function(pos, oldnode, oldmetadata, digger)
fire.on_flame_remove_at(pos)
end,
})
fire = {}
fire.D = 6
-- key: position hash of low corner of area
-- value: {handle=sound handle, name=sound name}
@ -81,12 +80,10 @@ function fire.update_sounds_around(pos)
end
function fire.on_flame_add_at(pos)
--print("flame added at "..minetest.pos_to_string(pos))
fire.update_sounds_around(pos)
end
function fire.on_flame_remove_at(pos)
--print("flame removed at "..minetest.pos_to_string(pos))
fire.update_sounds_around(pos)
end
@ -117,7 +114,6 @@ minetest.register_abm({
local p = fire.find_pos_for_flame_around(p0)
if p then
minetest.set_node(p, {name="fire:basic_flame"})
fire.on_flame_add_at(p)
end
end,
})
@ -143,7 +139,6 @@ minetest.register_abm({
local p2 = fire.find_pos_for_flame_around(p)
if p2 then
minetest.set_node(p2, {name="fire:basic_flame"})
fire.on_flame_add_at(p2)
end
end
end,
@ -158,7 +153,6 @@ minetest.register_abm({
-- If there is water or stuff like that around flame, remove flame
if fire.flame_should_extinguish(p0) then
minetest.remove_node(p0)
fire.on_flame_remove_at(p0)
return
end
-- Make the following things rarer
@ -168,7 +162,6 @@ minetest.register_abm({
-- If there are no flammable nodes around flame, remove flame
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
minetest.remove_node(p0)
fire.on_flame_remove_at(p0)
return
end
if math.random(1,4) == 1 then
@ -185,7 +178,6 @@ minetest.register_abm({
else
-- remove flame
minetest.remove_node(p0)
fire.on_flame_remove_at(p0)
end
end,
})