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 UninitializedSaveTest prototypes #16144

Merged
merged 12 commits into from
May 6, 2023

Conversation

ElectroJr
Copy link
Member

Fixes #15940 and re-adds a check for whether uninitialized entities are writing references to other entities while serializing.

Note that I haven't actually tested most of these changes in game, I just changed the prototypes until the test was happy, but AFAIK this shouldn't cause any issues seeing as the entities were being modified on spawn anyways.

Comment on lines 38 to -40
private void OnCollide(EntityUid uid, LightningComponent component, ref StartCollideEvent args)
{
if (!TryComp<BeamComponent>(uid, out var lightningBeam) || !TryComp<BeamComponent>(lightningBeam.VirtualBeamController, out var beamController))
Copy link
Member Author

@ElectroJr ElectroJr May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this function around while making ArcTarget nullable.

I'm not entirely sure what the function was meant to be doing, but AFAICT there was a chance it would enter an infinite loop if Arc failed to find a target? So now it no longer does a while loop, which might change some behaviour if it fails to find a target during the first attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Several entity prototypes fail UninitializedSaveTest and need to be fixed
2 participants