Skip to content

Possible bug with processDecay function #9

@christopherverch

Description

@christopherverch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions