Skip to content

Commit

Permalink
Fix Loadouts Breaking when You Spend All Your Points (Simple-Station#506
Browse files Browse the repository at this point in the history
)

<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->

# Description
<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

Self explanatory

P.S. i genuinely dont know what the fuck i did, who wrote this?

# TODO

<!--
A list of everything you have to do before this PR is "complete"
You probably won't have to complete everything before merging but it's
good to leave future references
-->

- [X] Fix shit

# Media

https://youtu.be/hbJbd5SgZ54

# Changelog

<!--
You can add an author after the `:cl:` to change the name that appears
in the changelog (ex: `:cl: Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->

:cl:
- fix: Fixed loadouts becoming uneditable after spending all your points
  • Loading branch information
WarMechanic authored Jul 2, 2024
1 parent 7b89ce1 commit 606a28d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ void AddSelector(LoadoutPreferenceSelector selector, int points, string id)
selector.PreferenceChanged += preference =>
{
// Make sure they have enough loadout points
preference = preference ? CheckPoints(points, preference) : CheckPoints(-points, preference);
preference = preference ? CheckPoints(-points, preference) : CheckPoints(points, preference);

// Update Preferences
Profile = Profile?.WithLoadoutPreference(id, preference);
Expand Down

0 comments on commit 606a28d

Please sign in to comment.