Skip to content

Player stats don't differ based on selected character #8

@SlimeCubed

Description

@SlimeCubed

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 mismatched foodToHibernate values. It looks like the hook is supposed to take the foodToHibernate 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

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