Skip to content

Commit

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

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

[DataField]
public string CurrentAlertLevel;

[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
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Robust.Shared.Prototypes;
using Content.Shared.Access;

namespace Content.Shared._Sunrise.AlertAccess
{
/// <summary>
/// Defines a single access level that can be stored on ID cards and checked for.
/// </summary>
[Prototype("alertAccessesPrototype")]
public sealed partial class AlertAccessesPrototype : IPrototype
{
[ViewVariables]
[IdDataField]
public string ID { get; private set; } = default!;

[DataField("access")]
public List<ProtoId<AccessLevelPrototype>> Access = new();

}
}
1 change: 1 addition & 0 deletions Resources/Prototypes/Access/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- type: accessLevel
id: Security
name: id-card-access-level-security
redAlertAccesses: SecurityRedAlertAccesses

- type: accessLevel
id: Armory
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- type: alertAccesses
id: SecurityRedAlertAccesses
access:
- Engineer
- Command
- Maintance

0 comments on commit 21692cd

Please sign in to comment.