diff --git a/Content.Server/Bed/Cryostorage/CryostorageSystem.cs b/Content.Server/Bed/Cryostorage/CryostorageSystem.cs index bb2ab4099d..2e7f8c4235 100644 --- a/Content.Server/Bed/Cryostorage/CryostorageSystem.cs +++ b/Content.Server/Bed/Cryostorage/CryostorageSystem.cs @@ -225,13 +225,16 @@ public sealed class CryostorageSystem : SharedCryostorageSystem if (!TryComp(station, out var stationRecords)) return; - var key = new StationRecordKey(_stationRecords.GetRecordByName(station.Value, name) ?? default(uint), station.Value); - var jobName = "Unknown"; + var jobName = Loc.GetString("earlyleave-cryo-job-unknown"); + var recordId = _stationRecords.GetRecordByName(station.Value, name); + if (recordId != null) + { + var key = new StationRecordKey(recordId.Value, station.Value); + if (_stationRecords.TryGetRecord(key, out var entry, stationRecords)) + jobName = entry.JobTitle; - if (_stationRecords.TryGetRecord(key, out var entry, stationRecords)) - jobName = entry.JobTitle; - - _stationRecords.RemoveRecord(key, stationRecords); + _stationRecords.RemoveRecord(key, stationRecords); + } _chatSystem.DispatchStationAnnouncement(station.Value, Loc.GetString( diff --git a/Resources/Locale/en-US/bed/cryostorage/cryogenic-storage.ftl b/Resources/Locale/en-US/bed/cryostorage/cryogenic-storage.ftl index 8de5f9019b..500a530562 100644 --- a/Resources/Locale/en-US/bed/cryostorage/cryogenic-storage.ftl +++ b/Resources/Locale/en-US/bed/cryostorage/cryogenic-storage.ftl @@ -1,5 +1,6 @@  ### Announcement +earlyleave-cryo-job-unknown = Unknown earlyleave-cryo-announcement = {$character} ({$job}) has entered cryogenic storage! earlyleave-cryo-sender = Station