Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug with processDecay function #9

Open
christopherverch opened this issue Oct 16, 2023 · 0 comments
Open

Possible bug with processDecay function #9

christopherverch opened this issue Oct 16, 2023 · 0 comments

Comments

@christopherverch
Copy link

In this function, timepassed is set

local worldHour = WorldInstance.data.time.hour
local timePassed = worldHour

and not changed until

while oldDay < daysPassed do
    timePassed = timePassed + 24
    oldDay = oldDay + 1
end

it is then added to each skill's decay

skillsTable[skill].decay = skillsTable[skill].decay + timePassed

Basically, worldhour is getting added on to every skill's decay every time this function is called (which is every time onplayerskill is called). Tried setting the time to 23:00 and punched a guard, and every punch gave +23 to decay on all skills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant