Skip to content

Commit

Permalink
Fix doors programming
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr0maks committed Aug 9, 2023
1 parent 5ddc3cc commit d37e6dd
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Content.Server/Access/Systems/AccessReaderBoardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ public override void Initialize()

private void OnUseInHand(EntityUid uid, AccessStorageComponent component, UseInHandEvent args)
{
string[] access = { "" };
List<string> accessList = new List<string>();

if (component.AccessLists.Count > 0)
access = component.AccessLists[0].ToArray<string>();

AccessStorageBoundUserInterfaceState newState = new(access, component.DenyTags.ToArray());
{
foreach (HashSet<string> hashSet in component.AccessLists)
{
foreach (string hash in hashSet.ToArray())
{
accessList.Add(hash);
}
}
}
AccessStorageBoundUserInterfaceState newState = new(accessList.ToArray(), component.DenyTags.ToArray());
_userInterfaceSystem.TrySetUiState(uid, AccessStorageUiKey.Key, newState);
}
}

0 comments on commit d37e6dd

Please sign in to comment.