mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 05:42:33 +01:00
battery_box.lua: Make "srcstack" local (#525)
Fixes warning: Assignment to undeclared global "srcstack" inside a function at battery_box.lua:454
This commit is contained in:
parent
7696546d47
commit
e90b28895c
@ -452,7 +452,7 @@ function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
|||||||
if inv:is_empty("dst") then
|
if inv:is_empty("dst") then
|
||||||
return batt_charge, false
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
srcstack = inv:get_stack("dst", 1)
|
local srcstack = inv:get_stack("dst", 1)
|
||||||
local toolname = srcstack:get_name()
|
local toolname = srcstack:get_name()
|
||||||
if technic.power_tools[toolname] == nil then
|
if technic.power_tools[toolname] == nil then
|
||||||
return batt_charge, false
|
return batt_charge, false
|
||||||
|
Loading…
Reference in New Issue
Block a user