Fix cryostorage identifying unknown characters as captain (#26927)
Fixed cryostorage getting captain's record for unknown jobs. Also localized Unknown job string.
This commit is contained in:
@@ -225,13 +225,16 @@ public sealed class CryostorageSystem : SharedCryostorageSystem
|
||||
if (!TryComp<StationRecordsComponent>(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<GeneralStationRecord>(key, out var entry, stationRecords))
|
||||
jobName = entry.JobTitle;
|
||||
|
||||
if (_stationRecords.TryGetRecord<GeneralStationRecord>(key, out var entry, stationRecords))
|
||||
jobName = entry.JobTitle;
|
||||
|
||||
_stationRecords.RemoveRecord(key, stationRecords);
|
||||
_stationRecords.RemoveRecord(key, stationRecords);
|
||||
}
|
||||
|
||||
_chatSystem.DispatchStationAnnouncement(station.Value,
|
||||
Loc.GetString(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
### Announcement
|
||||
|
||||
earlyleave-cryo-job-unknown = Unknown
|
||||
earlyleave-cryo-announcement = {$character} ({$job}) has entered cryogenic storage!
|
||||
earlyleave-cryo-sender = Station
|
||||
|
||||
Reference in New Issue
Block a user