v0.11.0.10

This commit is contained in:
Joonas Rikkonen
2020-12-16 15:15:58 +02:00
parent f433a7ba10
commit e47f0850a5
19 changed files with 181 additions and 93 deletions
@@ -185,15 +185,19 @@ namespace Barotrauma
private void GetDisguisedSprites(IdCard idCard)
{
if (idCard.Item.Tags == string.Empty) return;
if (idCard.StoredJobPrefab == null || idCard.StoredPortrait == null)
{
string[] readTags = idCard.Item.Tags.Split(',');
if (readTags.Length == 0) return;
if (idCard.StoredJobPrefab == null)
{
string jobIdTag = readTags.First(s => s.StartsWith("jobid:"));
string jobIdTag = readTags.FirstOrDefault(s => s.StartsWith("jobid:"));
if (jobIdTag != string.Empty && jobIdTag.Length > 6)
if (jobIdTag != null && jobIdTag.Length > 6)
{
string jobId = jobIdTag.Substring(6);
if (jobId != string.Empty)