Skip to content

Commit

Permalink
set_charge/get_charge from other Technic mod
Browse files Browse the repository at this point in the history
  • Loading branch information
S-S-X authored Jan 3, 2025
1 parent b3ec18f commit 2003c22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions technic/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ function technic.set_RE_charge(stack, charge)
end
end

technic.set_charge = technic.set_RE_charge

function technic.get_RE_charge(stack)
local max_charge = technic.power_tools[stack:get_name()]
if max_charge then
Expand All @@ -96,6 +98,8 @@ function technic.get_RE_charge(stack)
return 0, 0
end

technic.get_charge = technic.get_RE_charge

function technic.use_RE_charge(stack, amount)
if technic.creative_mode or amount <= 0 then
-- Do not check charge in creative mode or when trying to use zero amount
Expand Down

0 comments on commit 2003c22

Please sign in to comment.