Avoid error if battery holder exists but technic not installed (#107)

This commit is contained in:
1F616EMO~nya 2024-07-14 17:49:07 +08:00 committed by GitHub
parent cd3a42cfd7
commit 3eaa3c7bfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -67,6 +67,10 @@ minetest.register_node("digtron:battery_holder", {
-- Allow all items with energy storage to be placed in the inventory
allow_metadata_inventory_put = function(_, listname, _, stack)
if listname == "batteries" then
if not minetest.global_exists("technic") then
return 0
end
local node_name = stack:get_name()
-- Allow all items with energy storage from technic mod