Fix ta4 chest and ta3 firebox issues
This commit is contained in:
parent
5e307bf5a7
commit
73c4b95051
@ -304,7 +304,9 @@ techage.register_node({"techage:chest_ta4"}, {
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local mem = techage.get_mem(pos)
|
||||
mem.filter = mem.filter or mConf.item_filter(pos, 50)
|
||||
if not mem.filter or not mem.filter["unconfigured"] then
|
||||
mem.filter = mConf.item_filter(pos, 50)
|
||||
end
|
||||
mem.chest_configured = mem.chest_configured or #mem.filter["unconfigured"] < 50
|
||||
|
||||
if inv:is_empty("main") then
|
||||
@ -335,7 +337,9 @@ techage.register_node({"techage:chest_ta4"}, {
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local mem = techage.get_mem(pos)
|
||||
mem.filter = mem.filter or mConf.item_filter(pos, 50)
|
||||
if not mem.filter or not mem.filter["unconfigured"] then
|
||||
mem.filter = mConf.item_filter(pos, 50)
|
||||
end
|
||||
mem.chest_configured = mem.chest_configured or #mem.filter["unconfigured"] < 50
|
||||
|
||||
if mem.chest_configured then
|
||||
@ -350,7 +354,9 @@ techage.register_node({"techage:chest_ta4"}, {
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local mem = techage.get_mem(pos)
|
||||
mem.filter = mem.filter or mConf.item_filter(pos, 50)
|
||||
if not mem.filter or not mem.filter["unconfigured"] then
|
||||
mem.filter = mConf.item_filter(pos, 50)
|
||||
end
|
||||
mem.chest_configured = mem.chest_configured or #mem.filter["unconfigured"] < 50
|
||||
|
||||
if mem.chest_configured then
|
||||
|
@ -16,7 +16,6 @@ local S2P = minetest.string_to_pos
|
||||
local P2S = minetest.pos_to_string
|
||||
local M = minetest.get_meta
|
||||
local S = techage.S
|
||||
local LQD = function(pos) return (minetest.registered_nodes[techage.get_node_lvm(pos).name] or {}).liquid end
|
||||
local Pipe = techage.LiquidPipe
|
||||
local liquid = techage.liquid
|
||||
local ValidOilFuels = techage.firebox.ValidOilFuels
|
||||
@ -120,6 +119,8 @@ function techage.fuel.on_punch(pos, node, puncher, pointed_thing)
|
||||
|
||||
local ldef = liquid.get_liquid_def(wielded_item)
|
||||
if ldef and ValidOilFuels[ldef.inv_item] then
|
||||
local lqd = (minetest.registered_nodes[node.name] or {}).liquid
|
||||
if not lqd.fuel_cat or ValidOilFuels[ldef.inv_item] <= lqd.fuel_cat then
|
||||
local new_item = liquid.empty_on_punch(pos, nvm, wielded_item, item_count)
|
||||
if new_item then
|
||||
puncher:set_wielded_item(new_item)
|
||||
@ -127,6 +128,7 @@ function techage.fuel.on_punch(pos, node, puncher, pointed_thing)
|
||||
mem.blocking_time = techage.SystemTime + BLOCKING_TIME
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function techage.fuel.get_fuel(nvm)
|
||||
|
@ -131,9 +131,6 @@ minetest.register_node("techage:furnace_firebox", {
|
||||
|
||||
on_timer = node_timer,
|
||||
can_dig = fuel.can_dig,
|
||||
allow_metadata_inventory_take = fuel.allow_metadata_inventory_take,
|
||||
allow_metadata_inventory_put = fuel.allow_metadata_inventory_put,
|
||||
on_metadata_inventory_put = fuel.on_metadata_inventory_put,
|
||||
on_punch = fuel.on_punch,
|
||||
on_receive_fields = fuel.on_receive_fields,
|
||||
on_rightclick = fuel.on_rightclick,
|
||||
@ -185,21 +182,11 @@ minetest.register_node("techage:furnace_firebox_on", {
|
||||
|
||||
on_timer = node_timer,
|
||||
can_dig = fuel.can_dig,
|
||||
allow_metadata_inventory_put = fuel.allow_metadata_inventory_put,
|
||||
allow_metadata_inventory_take = fuel.allow_metadata_inventory_take,
|
||||
on_receive_fields = fuel.on_receive_fields,
|
||||
on_punch = fuel.on_punch,
|
||||
on_rightclick = fuel.on_rightclick,
|
||||
liquid = _liquid,
|
||||
networks = _networks,
|
||||
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
nvm.liquid = nvm.liquid or {}
|
||||
nvm.liquid.amount = nvm.liquid.amount or 0
|
||||
start_firebox(pos, nvm)
|
||||
fuel.on_metadata_inventory_put(pos, listname, index, stack, player)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
Loading…
Reference in New Issue
Block a user