Resolve flammable itemstack regression.
Using a separate ABM for this. We may want the burn-up effect with containers later, but it may have to be handled differently in those cases as the container itself may have flammability characteristics to take into account. This SHOULD also resolve the problem with transient states of the stack node (i.e. wherein it was temporarily empty) burning up, which caused some things to burn up when they shouldn't. Particularly egregious was the destruction of hot lode prills when they dropped into forgefire.
This commit is contained in:
parent
1c8398a511
commit
70d9e7a320
@ -2,9 +2,6 @@
|
||||
ROADMAP (SHORT-TERM)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
- REGRESSIONS:
|
||||
- Stack node burn-up when inv is flammable
|
||||
- Maybe it makes sense to have another group for this?
|
||||
- Portable containers.
|
||||
- A bag that expands when placed, if room.
|
||||
- Inventory slots around central node each holds 1 stack.
|
||||
|
@ -1,2 +1,3 @@
|
||||
nc_api
|
||||
nc_api_craft
|
||||
nc_api_craft
|
||||
nc_fire?
|
@ -151,3 +151,23 @@ function minetest.item_place(itemstack, placer, pointed_thing, param2)
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
if nodecore.loaded_mods().nc_fire then
|
||||
nodecore.register_limited_abm({
|
||||
label = "Flammable ItemStacks Ignite",
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
nodenames = {modname .. ":stack"},
|
||||
neighbors = {"group:igniter"},
|
||||
action = function(pos, node)
|
||||
if nodecore.quenched(pos) then return end
|
||||
|
||||
local def = invdef(pos)
|
||||
local flam = def and def.groups and def.groups.flammable
|
||||
if not flam then return end
|
||||
|
||||
if math_random(1, flam) ~= 1 then return end
|
||||
nodecore.ignite(pos, node)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user