Move Access to ECS (#4826)
* Moved access to ecs * Fixed tests * Moved test to integration * Better IoC * Moved preset ID card * Moved id card to ECS * Moved access component to ECS * Fixed pda access * Final touches Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,8 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Content.Server.Access.Components;
|
||||
using Content.Server.Access.Systems;
|
||||
using Content.Server.CharacterAppearance.Components;
|
||||
using Content.Server.Ghost.Components;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Server.Inventory.Components;
|
||||
@@ -19,6 +21,7 @@ using Content.Shared.Preferences;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Random;
|
||||
@@ -32,6 +35,8 @@ namespace Content.Server.GameTicking
|
||||
private const string PlayerPrototypeName = "MobHuman";
|
||||
private const string ObserverPrototypeName = "MobObserver";
|
||||
|
||||
[Dependency] private readonly IdCardSystem _cardSystem = default!;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
private EntityCoordinates _spawnPoint;
|
||||
|
||||
@@ -228,8 +233,8 @@ namespace Content.Server.GameTicking
|
||||
return;
|
||||
|
||||
var card = pdaComponent.ContainedID;
|
||||
card.FullName = characterName;
|
||||
card.JobTitle = jobPrototype.Name;
|
||||
_cardSystem.TryChangeFullName(card.Owner.Uid, characterName, card);
|
||||
_cardSystem.TryChangeJobTitle(card.Owner.Uid, jobPrototype.Name, card);
|
||||
|
||||
var access = card.Owner.GetComponent<AccessComponent>();
|
||||
var accessTags = access.Tags;
|
||||
|
||||
Reference in New Issue
Block a user