Skip to content

Commit

Permalink
Update InternalEncryptionKeySpawner.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Sep 19, 2024
1 parent 4d4afb6 commit c5828f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Content.Server/Silicon/IPC/InternalEncryptionKeySpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
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)
if (target == null // For whatever ungodly reason, StationSpawningSystem **absolutely has to assert that a nullable Uid is not null**. This causes random test fails.
|| !TryComp<EncryptionKeyHolderComponent>(target, out var keyHolderComp)
|| keyHolderComp is null
|| !startingGear.Equipment.TryGetValue("ears", out var earEquipString)
|| string.IsNullOrEmpty(earEquipString))
return;
Expand Down

0 comments on commit c5828f5

Please sign in to comment.