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

Fix HealthContest Crash #954

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

VMSolidus
Copy link
Member

@VMSolidus VMSolidus commented Sep 22, 2024

Description

Apparently _mobThreshold.TryGetThresholdForState() fucking crashes if you hand it a mob that doesn't have a MobStateComponent, even though it optionally accepts no MobStateComponent at all as one of its inputs. Easy solution for this is to just pre-emptively TryComp for the MobStateComponent and then pass it in explicitly, but I also hate this because TryGetThresholdForState shouldn't be crashing if you hand it a mob without a MobStateComponent... I hate Resolve() so much for this behavior.

Changelog

🆑

  • fix: Fix a crash related to Luminous Entities.

@github-actions github-actions bot added the Changes: C# Changes any cs files label Sep 22, 2024
@DEATHB4DEFEAT
Copy link
Member

Apparently _mobThreshold.TryGetThresholdForState() fucking crashes if you hand it a mob that doesn't have a MobStateComponent, even though it optionally accepts no MobStateComponent at all as one of its inputs

Resolve is used to get a component something is expected to have or use the provided one, the function's field is optional because it's more convenient to not get the component for the function if you don't already have it.

@github-actions github-actions bot added the Status: Needs Review Someone please review this label Sep 23, 2024
@FoxxoTrystan FoxxoTrystan added Priority: 2-High Needs to be resolved as soon as possible Size: 5-Very Small For especially small issues/PRs labels Sep 23, 2024
@FoxxoTrystan FoxxoTrystan requested review from a team and Pspritechologist and removed request for a team September 25, 2024 22:30
@FoxxoTrystan FoxxoTrystan requested review from a team, Peptide90 and OldDanceJacket and removed request for a team September 25, 2024 22:31
@DEATHB4DEFEAT DEATHB4DEFEAT merged commit b969542 into Simple-Station:master Sep 28, 2024
19 checks passed
SimpleStation14 added a commit that referenced this pull request Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Priority: 2-High Needs to be resolved as soon as possible Size: 5-Very Small For especially small issues/PRs Status: Needs Review Someone please review this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants