Skip to content

Commit aa46d6f

Browse files
committed
cargo object strings are calculated now
1 parent 799a30e commit aa46d6f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Dat/Objects/CargoObject.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ public bool Validate()
6262
&& CargoTransferTime != 0;
6363

6464
public bool TryGetImageName(int id, out string? value)
65-
=> ImageIdNameMap.TryGetValue(id, out value);
66-
67-
public static Dictionary<int, string> ImageIdNameMap = new()
6865
{
69-
{ 0, "kInlineSprite" },
70-
// There are NumPlatformVariations sprites after this one
71-
{ 1, "kStationPlatformBegin" },
72-
};
66+
value = id == 0
67+
? "kInlineSprite"
68+
: $"kStationPlatform{id}";
69+
70+
return true;
71+
}
7372
}
7473
}

0 commit comments

Comments
 (0)