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 SpawnAndDeleteAllEntities #932

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Content.Server/Silicon/IPC/InternalEncryptionKeySpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
using Content.Shared.Radio.Components;
using Content.Shared.Containers;
using Robust.Shared.Containers;
using Content.Server.Cargo.Components;

namespace Content.Server.Silicon.IPC;
public sealed partial class InternalEncryptionKeySpawner : EntitySystem
{
[Dependency] private readonly SharedContainerSystem _container = default!;
public void TryInsertEncryptionKey(EntityUid target, StartingGearPrototype startingGear, IEntityManager entityManager)
{
if (!TryComp<EncryptionKeyHolderComponent>(target, out var keyHolderComp)
#pragma warning disable CS8073
if (target == null // target can be null during race conditions intentionally created by awful tests.
#pragma warning restore CS8073
|| !TryComp<EncryptionKeyHolderComponent>(target, out var keyHolderComp)
|| keyHolderComp is null
|| !startingGear.Equipment.TryGetValue("ears", out var earEquipString)
|| string.IsNullOrEmpty(earEquipString))
return;
Expand Down
Loading