Skip to content

Commit

Permalink
Add data field for id card microwave behaviour (space-wizards#28087)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSmugleaf authored May 17, 2024
1 parent fd8b195 commit de7e1b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Content.Server/Access/Systems/IdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public override void Initialize()

private void OnMicrowaved(EntityUid uid, IdCardComponent component, BeingMicrowavedEvent args)
{
if (!component.CanMicrowave)
return;

if (TryComp<AccessComponent>(uid, out var access))
{
float randomPick = _random.NextFloat();
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Access/Components/IdCardComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ public sealed partial class IdCardComponent : Component

[DataField]
public LocId FullNameLocId = "access-id-card-component-owner-full-name-job-title-text";

[DataField]
public bool CanMicrowave = true;
}

0 comments on commit de7e1b3

Please sign in to comment.