fire: remove fire abm's, make fire nodes last 20-30 seconds
This commit is contained in:
parent
f235e74220
commit
2e47e09a9e
@ -31,18 +31,18 @@ minetest.register_node("fire:basic_flame", {
|
||||
damage_per_second = 4,
|
||||
groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
on_timer = function(pos)
|
||||
local f = minetest.find_node_near(pos, 1, {"group:flammable"})
|
||||
if not f then
|
||||
--local f = minetest.find_node_near(pos, 1, {"group:flammable"})
|
||||
--if not f then
|
||||
minetest.remove_node(pos)
|
||||
return
|
||||
end
|
||||
-- return
|
||||
--end
|
||||
-- Restart timer
|
||||
return true
|
||||
return false
|
||||
end,
|
||||
drop = "",
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(30, 60))
|
||||
minetest.get_node_timer(pos):start(math.random(20, 30))
|
||||
end,
|
||||
})
|
||||
|
||||
@ -289,7 +289,7 @@ minetest.register_abm({
|
||||
|
||||
|
||||
-- Enable the following ABMs according to 'enable fire' setting
|
||||
|
||||
--[[
|
||||
local fire_enabled = minetest.settings:get_bool("enable_fire")
|
||||
if fire_enabled == nil then
|
||||
-- enable_fire setting not specified, check for disable_fire
|
||||
@ -362,4 +362,4 @@ else -- Fire enabled
|
||||
end,
|
||||
})
|
||||
|
||||
end
|
||||
end]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user