Skip to content

Commit f7426af

Browse files
committed
fix(battery): Fix battery holder accepting technic charges
1 parent be49b92 commit f7426af

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

nodes/node_battery_holder.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ local def = {
7575

7676
-- Allow all items with energy storage from technic mod
7777
if technic.power_tools[node_name] ~= nil then
78-
local meta = stack:get_metadata()
79-
local md = minetest.deserialize(meta)
8078
-- And specifically if they hold any charge
8179
-- Disregard empty batteries, the player should know better
82-
if md and md.charge > 0 then
80+
if stack:get_meta():get_int("technic:charge") > 0 then
8381
if digtron.check_protected_and_record(pos, player) then
8482
return 0
8583
end

0 commit comments

Comments
 (0)