internal static LineIconSpriteNames GetLineIcon(ushort num, TLMCW.ConfigIndex transportType, ref TransportSystemDefinition tsdRef) { if (num > 0 && TLMCW.GetCurrentConfigInt(transportType | TLMCW.ConfigIndex.PREFIX) != (int)ModoNomenclatura.Nenhum) { uint prefix = num / 1000u; ITLMTransportTypeExtension ext = tsdRef.GetTransportExtension(); LineIconSpriteNames format = ext.GetCustomFormat(prefix); if (format != default) { return(format); } } return(TLMCW.getBgIconForIndex(transportType)); }
internal static LineIconSpriteNames GetLineIcon(ushort num, TransportSystemDefinition tsdRef) { var config = tsdRef.GetConfig(); if (num > 0 && config.Prefix != NamingMode.None) { uint prefix = num / 1000u; ITLMTransportTypeExtension ext = tsdRef.GetTransportExtension(); LineIconSpriteNames format = ext.GetCustomFormat(prefix); if (format != default) { return(format); } } return(tsdRef.GetBgIcon()); }
public void SetCustomFormat(uint prefix, LineIconSpriteNames icon) { SafeGet(prefix).CustomIcon = icon; TLMFacade.Instance?.OnLineSymbolParameterChanged(); }
public static string GetNameForTLM(this LineIconSpriteNames icon) => Locale.Get("K45_TLM_LINE_ICON_ENUM", icon.ToString());
public void SetCustomFormat(uint prefix, LineIconSpriteNames icon) => SafeGet(prefix).CustomIcon = icon;