Skip to content
Snippets Groups Projects
Commit efc265af authored by Ryan Yappert's avatar Ryan Yappert
Browse files

WIP regenResourcesFast change.

parent dabf7032
No related branches found
No related tags found
1 merge request!692Resource-ification project for Life, Feedback, etc.
......@@ -215,7 +215,8 @@ function _M:recomputeRegenResources()
for i = 1, #_M.resources_def do
r = _M.resources_def[i]
if r.regen_prop and (not r.talent or self:knowTalent(r.talent)) then
fstr = fstr..("self.%s = util.bound(self.%s + self.%s, self.%s, self.%s) "):format(r.short_name, r.short_name, r.regen_prop, r.minname, r.maxname)
--fstr = fstr..("self.%s = util.bound(self.%s + self.%s, self.%s, self.%s) "):format(r.short_name, r.short_name, r.regen_prop, r.minname, r.maxname)
fstr = fstr..("self[%s](self)"):format(r.regenFunction)
end
end
......@@ -226,7 +227,7 @@ end
--- Regen resources, should be called in your actor's act() method
function _M:regenResources()
--if self.regenResourcesFast then return self:regenResourcesFast() end
if self.regenResourcesFast then return self:regenResourcesFast() end
local r
for i = 1, #_M.resources_def do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment