mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-11-08 08:13:43 +01:00
Avoid error if battery holder exists but technic not installed (#107)
This commit is contained in:
parent
cd3a42cfd7
commit
3eaa3c7bfb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user