Skip to content

Commit 3eaa3c7

Browse files
authored
Avoid error if battery holder exists but technic not installed (#107)
1 parent cd3a42c commit 3eaa3c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nodes/node_battery_holder.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ minetest.register_node("digtron:battery_holder", {
6767
-- Allow all items with energy storage to be placed in the inventory
6868
allow_metadata_inventory_put = function(_, listname, _, stack)
6969
if listname == "batteries" then
70+
if not minetest.global_exists("technic") then
71+
return 0
72+
end
73+
7074
local node_name = stack:get_name()
7175

7276
-- Allow all items with energy storage from technic mod

0 commit comments

Comments
 (0)