Move Access & AccessReader to shared. (#5798)

* git mv

* Move Access Component & system.

- Name space changes
- Rename AccessReader to AccessReaderComponent
- Also need an abstract TryGetSlot function for SharedInventoryComponent

* better TryGetSlot

* Ah yes, tests exist.
This commit is contained in:
Leon Friedrich
2021-12-26 17:07:28 +13:00
committed by GitHub
parent 32d752bfa6
commit b675bdb789
27 changed files with 90 additions and 81 deletions

View File

@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Server.Access.Components;
using Content.Server.Access.Systems;
using Content.Server.Popups;
using Content.Server.Power.Components;
using Content.Server.UserInterface;
using Content.Server.WireHacking;
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.Acts;
using Content.Shared.Interaction;
using Content.Shared.Sound;
@@ -191,7 +191,7 @@ namespace Content.Server.VendingMachines
private void TryEject(string id, EntityUid? sender)
{
if (_entMan.TryGetComponent<AccessReader?>(Owner, out var accessReader))
if (_entMan.TryGetComponent<AccessReaderComponent?>(Owner, out var accessReader))
{
var accessSystem = EntitySystem.Get<AccessReaderSystem>();
if (sender == null || !accessSystem.IsAllowed(accessReader, sender.Value))