We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be49b92 commit 51e7359Copy full SHA for 51e7359
nodes/node_battery_holder.lua
@@ -75,14 +75,9 @@ local def = {
75
76
-- Allow all items with energy storage from technic mod
77
if technic.power_tools[node_name] ~= nil then
78
- local meta = stack:get_metadata()
79
- local md = minetest.deserialize(meta)
80
-- And specifically if they hold any charge
81
-- Disregard empty batteries, the player should know better
82
- if md and md.charge > 0 then
83
- if digtron.check_protected_and_record(pos, player) then
84
- return 0
85
- end
+ if stack:get_meta():get_int("technic:charge") > 0 then
86
return stack:get_count()
87
else
88
return 0
0 commit comments