фиксы тестов

This commit is contained in:
Remuchi
2024-01-29 01:02:37 +07:00
parent 6e198dc038
commit b4dd3b0555
139 changed files with 1129 additions and 3837 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server.IdentityManagement;
using Content.Server.PDA;
using Content.Server.Roles;
using Content.Shared.Access.Components;
using Content.Shared.Humanoid;
using Content.Shared.Inventory;
using Content.Shared.Mind.Components;
using Content.Shared.NukeOps;
@@ -31,9 +32,14 @@ public sealed class RandomHumanSystem : EntitySystem
private void OnInit(EntityUid uid, RandomHumanComponent component, ComponentInit args)
{
if (!TryComp(uid, out HumanoidAppearanceComponent? humanoidAppearanceComponent))
{
return;
}
var newProfile = HumanoidCharacterProfile.RandomWithSpecies();
_humanoid.LoadProfile(uid, newProfile);
_humanoid.LoadProfile(uid, newProfile, humanoidAppearanceComponent);
if (HasComp<NukeOperativeComponent>(uid))
return;
@@ -43,7 +49,8 @@ public sealed class RandomHumanSystem : EntitySystem
if (!_inventorySystem.TryGetSlotEntity(uid, "id", out var idUid))
return;
if (!EntityManager.TryGetComponent(idUid, out PdaComponent? pdaComponent) || !TryComp<IdCardComponent>(pdaComponent.ContainedId, out var card))
if (!EntityManager.TryGetComponent(idUid, out PdaComponent? pdaComponent) ||
!TryComp<IdCardComponent>(pdaComponent.ContainedId, out var card))
return;
var cardId = pdaComponent.ContainedId.Value;