Skip to content

Commit

Permalink
optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kanopus952 committed Jan 4, 2025
1 parent 21692cd commit df217e1
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 41 deletions.
16 changes: 2 additions & 14 deletions Content.Shared/Access/AccessLevelPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Robust.Shared.Prototypes;
using Content.Shared._Sunrise.AlertAccess;

namespace Content.Shared.Access
{
Expand All @@ -19,20 +18,9 @@ public sealed partial class AccessLevelPrototype : IPrototype
[DataField("name")]
public string? Name { get; set; }

[DataField]
public string CurrentAlertLevel;
[DataField("alertAccesses")]
public Dictionary<string, ProtoId<AccessGroupPrototype>> AlertAccesses = new();

[DataField("redAlertAccesses")]
public ProtoId<AlertAccessesPrototype> RedAlertAccesses;

[DataField("yellowAlertAccesses")]
public ProtoId<AlertAccessesPrototype> YellowAlertAccesses;

[DataField("gammaAlertAccesses")]
public ProtoId<AlertAccessesPrototype> GammaAlertAccesses;

[DataField("blueAlertAccesses")]
public ProtoId<AlertAccessesPrototype> BlueAlertAccesses;
public string GetAccessLevelName()
{
if (Name is { } name)
Expand Down

This file was deleted.

8 changes: 7 additions & 1 deletion Resources/Prototypes/Access/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
- type: accessLevel
id: Security
name: id-card-access-level-security
redAlertAccesses: SecurityRedAlertAccesses
alertAccesses:
red:
access: SecurityRedAlertAccesses
blue:
access: SecurityBlueAlertAccesses
gamma:
access: SecurityGammaAlertAccesses

- type: accessLevel
id: Armory
Expand Down
24 changes: 24 additions & 0 deletions Resources/Prototypes/_Sunrise/Access/AccessGroup/access_group.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- type: accessGroup
id: SecurityRedAlertAccesses
tags:
- Engineer
- Command
- Maintance

- type: accessGroup
id: SecurityBlueAlertAccesses
tags:
- Maintance

- type: accessGroup
id: SecurityGammaAlertAccesses
tags:
- Command
- Captain
- HeadOfPersonnel
- Cryogenics
- BlueShield
- Ntrep

# Потом дополню доступы

This file was deleted.

0 comments on commit df217e1

Please sign in to comment.