Player stats don't differ based on selected character
SlimeCubed opened this issue · 0 comments
SlimeCubed commented
To recreate, select Monk as player 2 then start a Survivor game. Have Monk pick up a spear and stab Survivor. Survivor will die, even though Monk's spear damage is supposed to be lower.
This is because the hook to Player.get_slugcatStats
is immediately undone when it is disposed at the end of the using block.
This hides a few issues in JollyCoop.PlayerHK.get_SlugcatStatsHK
:
- Players set to playerCharacter 3 (currently impossible without other mods) will use player 1's stats. I'm not sure if this is an issue
- The resultant
SlugcatStats
instances will have mismatchedfoodToHibernate
values. It looks like the hook is supposed to take thefoodToHibernate
from player 1 and pass it to the rest, but currently it just discards the result for player 1 and set the others to 0 - Much like player character numbers,
JollyCoop.PlayerHK.stats
is never reset. This means that any players copying player 1's stats will lock into the first game you play and not change until you restart