Skip to content

Commit

Permalink
Fix presetidcard extended access throwing (space-wizards#26195) (#833)
Browse files Browse the repository at this point in the history
Co-authored-by: metalgearsloth <[email protected]>
  • Loading branch information
Werzet and metalgearsloth authored Mar 24, 2024
1 parent 9171f3a commit 0e18efb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Content.Server/Access/Systems/PresetIdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ private void OnMapInit(EntityUid uid, PresetIdCardComponent id, MapInitEvent arg

var station = _stationSystem.GetOwningStation(uid);
var extended = false;
if (station != null)
extended = Comp<StationJobsComponent>(station.Value).ExtendedAccess;

// Station not guaranteed to have jobs (e.g. nukie outpost).
if (TryComp(station, out StationJobsComponent? stationJobs))
extended = stationJobs.ExtendedAccess;

SetupIdAccess(uid, id, extended);
SetupIdName(uid, id);
Expand Down

0 comments on commit 0e18efb

Please sign in to comment.