From 0b84d478d750e39f29b1ab726cd4a9b02028866e Mon Sep 17 00:00:00 2001 From: Eternal-Study <165338259+Eternal-Study@users.noreply.github.com> Date: Sat, 29 Jun 2024 19:55:00 -0400 Subject: [PATCH] Add or minetest.registered_nodes[name] to Silo powder check. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This pull request adds “or minetest.registered_nodes[name]” to the Silo powder check in line 131, permitting items in the powder group registered as nodes to be stored in the Silo. This improves interoperability with other mods by expanding the scope of items that can be stored, while still limiting it to the powder group. It should be noted the powder check in lines 31-33 are noted affected by this pull request. I release this code under the terms of AGPL v3, and transfer copyright to Joachim Stolberg. --- liquids/silo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liquids/silo.lua b/liquids/silo.lua index 254b246..b18c367 100644 --- a/liquids/silo.lua +++ b/liquids/silo.lua @@ -3,7 +3,7 @@ TechAge ======= - Copyright (C) 2019-2022 Joachim Stolberg + Copyright (C) 2019-2024 Joachim Stolberg AGPL v3 See LICENSE.txt for more information @@ -128,7 +128,7 @@ local tLiquid = { put = function(pos, indir, name, amount) -- check if it is powder local nvm = techage.get_nvm(pos) - local ndef = minetest.registered_craftitems[name] or {} + local ndef = minetest.registered_craftitems[name] or minetest.registered_nodes[name] or {} if ndef.groups and ndef.groups.powder == 1 then local inv = M(pos):get_inventory() local stack = ItemStack(name.." "..amount)