From 10486271015d6c3270fab3f5082dd76fd16e2197 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Tue, 21 Jul 2020 14:16:57 +0200 Subject: [PATCH] bug fixes for redstone and legacy items --- basis/liquid_lib.lua | 12 +++++++++--- items/redstone.lua | 1 - 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/basis/liquid_lib.lua b/basis/liquid_lib.lua index 0cd37a3..1300857 100644 --- a/basis/liquid_lib.lua +++ b/basis/liquid_lib.lua @@ -176,13 +176,19 @@ local function fill_on_punch(nvm, empty_container, item_count, puncher) end end +local function legacy_items(full_container, item_count) + if full_container == "techage:hydrogen" then + return {container = "", size = item_count, inv_item = full_container} + elseif full_container == "techage:oil_source" then + return {container = "", size = item_count, inv_item = full_container} + end +end - --- check of the wielded full container can be emptied into the tank +-- check if the wielded full container can be emptied into the tank local function empty_on_punch(pos, nvm, full_container, item_count) nvm.liquid = nvm.liquid or {} nvm.liquid.amount = nvm.liquid.amount or 0 - local lqd_def = get_liquid_def(full_container) + local lqd_def = get_liquid_def(full_container) or legacy_items(full_container, item_count) local ndef_lqd = LQD(pos) if lqd_def and ndef_lqd then local tank_size = ndef_lqd.capa or 0 diff --git a/items/redstone.lua b/items/redstone.lua index 733fdd1..9b6f913 100644 --- a/items/redstone.lua +++ b/items/redstone.lua @@ -19,7 +19,6 @@ minetest.register_node("techage:red_stone", { description = S("Red Stone"), tiles = {"default_stone.png^[colorize:#ff4538:110"}, groups = {cracky = 3, stone = 1}, - drop = 'techage:basalt_cobble', sounds = default.node_sound_stone_defaults(), })