Skip to content

Commit

Permalink
Avoid error if battery holder exists but technic not installed (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emojigit authored Jul 14, 2024
1 parent cd3a42c commit 3eaa3c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nodes/node_battery_holder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3eaa3c7

Please sign in to comment.