diff --git a/mods/lord/Core/fuel_device/src/fuel_device/Device.lua b/mods/lord/Core/fuel_device/src/fuel_device/Device.lua index 8c36d0f0b..efd1d73ed 100644 --- a/mods/lord/Core/fuel_device/src/fuel_device/Device.lua +++ b/mods/lord/Core/fuel_device/src/fuel_device/Device.lua @@ -89,7 +89,11 @@ end --- @public --- @return NodeMetaRef function Device:get_meta() - return self.meta or get_initiated_meta(self.position) + if not self.meta then + self.meta = get_initiated_meta(self.position) + end + + return self.meta end --- Sets Node into active device with new hint. diff --git a/mods/lord/Core/fuel_device/src/fuel_device/Processor.lua b/mods/lord/Core/fuel_device/src/fuel_device/Processor.lua index 1eb1ed1a1..1f91b7813 100644 --- a/mods/lord/Core/fuel_device/src/fuel_device/Processor.lua +++ b/mods/lord/Core/fuel_device/src/fuel_device/Processor.lua @@ -10,12 +10,12 @@ local S = minetest.get_mod_translator() --- @param inv InvRef --- @param meta NodeMetaRef --- @param method string ---- @return boolean, RecipeOutput|nil, RecipeInput|nil, RecipeOutput|nil, RecipeInput|nil +--- @return boolean, RecipeOutput, RecipeInput, RecipeOutput, RecipeInput local function process_possible(inv, meta, method) local result_source, remaining_source = minetest.get_craft_result({ method = method, type = 'cooking', - width = 1, + width = inv:get_size('src'), items = inv:get_list('src'), }) if not result_source or result_source.time == 0 then @@ -24,8 +24,8 @@ local function process_possible(inv, meta, method) local result_fuel, remaining_fuel = minetest.get_craft_result({ method = 'fuel', - width = 1, - items = inv:get_list('fuel') + width = inv:get_size('fuel'), + items = inv:get_list('fuel'), }) local possible = diff --git a/mods/lord/Core/fuel_device/src/fuel_device/node.lua b/mods/lord/Core/fuel_device/src/fuel_device/node.lua index bb6ae997e..01f055889 100644 --- a/mods/lord/Core/fuel_device/src/fuel_device/node.lua +++ b/mods/lord/Core/fuel_device/src/fuel_device/node.lua @@ -53,6 +53,7 @@ end --- @param size_of {fuel:number,src:number,dst:number} sizes of corresponding inventories. --- @param DeviceClass GenericDevice|nil your own device, if you want something extend/change. --- @param ProcessorClass GenericProcessor|nil your own processor, if you want something extend/change. +--- @return GenericDevice, GenericProcessor local function register_nodes(device_name, craft_method, nodes_definitions, form, size_of, DeviceClass, ProcessorClass) local node_name = { inactive = nodes_definitions.inactive.node_name:replace('^:', ''), @@ -90,6 +91,8 @@ local function register_nodes(device_name, craft_method, nodes_definitions, form nodes_definitions.active.node_name, table.overwrite(active_node, nodes_definitions.active.definition) ) + + return DeviceClass, ProcessorClass end