From 00f61dfb81100094b64de06ca4e1ef73ef8bcd47 Mon Sep 17 00:00:00 2001 From: Tim <t4im@users.noreply.github.com> Date: Fri, 30 Jan 2015 05:09:20 +0100 Subject: [PATCH] rewrite extractor dye recipes, adding a few dyes and making it work better with the dye mod also preventing any issues if it is being run in a game without it --- technic/machines/LV/coal_alloy_furnace.lua | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/technic/machines/LV/coal_alloy_furnace.lua b/technic/machines/LV/coal_alloy_furnace.lua index d1b7fae..91450d8 100644 --- a/technic/machines/LV/coal_alloy_furnace.lua +++ b/technic/machines/LV/coal_alloy_furnace.lua @@ -32,7 +32,7 @@ legacy_facedir_simple = true, sounds = default.node_sound_stone_defaults(), on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) meta:set_string("formspec", formspec) meta:set_string("infotext", machine_name) local inv = meta:get_inventory() @@ -142,10 +142,11 @@ -- Next take a hard look at the fuel situation local fuel = nil + local afterfuel local fuellist = inv:get_list("fuel") if fuellist then - fuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) + fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) end if fuel.time <= 0 then @@ -158,9 +159,7 @@ meta:set_string("fuel_totaltime", fuel.time) meta:set_string("fuel_time", 0) - local stack = inv:get_stack("fuel", 1) - stack:take_item() - inv:set_stack("fuel", 1, stack) + inv:set_stack("fuel", 1, afterfuel.items[1]) end, }) -- Gitblit v1.8.0