Merge pull request #41 from Thomas--S/coalburner-flame-protection
Coalburner: Quickfix for protection bug
This commit is contained in:
commit
7aa4a595b7
@ -97,6 +97,7 @@ end
|
|||||||
|
|
||||||
local function flame(pos, height, heat, first_time)
|
local function flame(pos, height, heat, first_time)
|
||||||
local idx
|
local idx
|
||||||
|
local playername = minetest.get_meta(pos):get_string("playername")
|
||||||
pos = {x=pos.x, y=pos.y+height, z=pos.z}
|
pos = {x=pos.x, y=pos.y+height, z=pos.z}
|
||||||
for idx=heat,1,-1 do
|
for idx=heat,1,-1 do
|
||||||
pos = {x=pos.x, y=pos.y+1, z=pos.z}
|
pos = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
@ -113,6 +114,9 @@ local function flame(pos, height, heat, first_time)
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if minetest.is_protected(pos, playername) then
|
||||||
|
return
|
||||||
|
end
|
||||||
minetest.add_node(pos, {name = "techage:flame"..math.min(idx,7)})
|
minetest.add_node(pos, {name = "techage:flame"..math.min(idx,7)})
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_int("heat", idx)
|
meta:set_int("heat", idx)
|
||||||
|
Loading…
Reference in New Issue
Block a user