-
Notifications
You must be signed in to change notification settings - Fork 18
/
ModTrackNames.cs
191 lines (171 loc) · 9.5 KB
/
ModTrackNames.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
namespace MetroOverhaul
{
public static class ModTrackNames
{
public const string TRAIN_TRACK = "Train Track";
public const string TRAIN_SINGLE_TRACK = "Train Single Track";
public const string TRAIN_SINGLE_TRACK_RAIL1L1W = "Rail1L1W";
public const string TRAIN_SINGLE_TRACK_RAIL1L2W = "Rail1L2W";
public const string TRAIN_STATION_TRACK_GROUND = "Train Station Track";
public const string TRAIN_STATION_TRACK_GROUND_C = "Train Station Track (C)";
public const string TRAIN_STATION_TRACK_GROUND_NP = "Train Station Track (NP)";
public const string TRAIN_STATION_TRACK_GROUND_CNP = "Train Station Track (CNP)";
public const string TRAIN_STATION_TRACK_GROUND_SMALL1 = "1731659180.GroundSingleTrackStationTrack_Data";
public const string TRAIN_STATION_TRACK_GROUND_SMALL2 = "Rail1LStation";
public const string TRAIN_STATION_TRACK_GROUND_ISLAND = "1194290640.Wide Train Station Track_Data";
public const string TRAIN_STATION_TRACK_GROUND_LARGE = "1577947171.Bypass Station Track_Ground_Data";
public const string TRAIN_STATION_TRACK_GROUND_LARGE_DUALISLAND = "1698282173.DualIslandStationTrack_Ground_Data";
//515489008
public const string TRAIN_STATION_TRACK_ELEVA = "Station Track Eleva";
public const string TRAIN_STATION_TRACK_ELEVATED_C = "Station Track Elevated (C)";
public const string TRAIN_STATION_TRACK_ELEVATED_NP = "Station Track Elevated (NP)";
public const string TRAIN_STATION_TRACK_ELEVATED_CNP = "Station Track Elevated (CNP)";
public const string TRAIN_STATION_TRACK_ELEVATED_NARROW = "Station Track Elevated Narrow";
public const string TRAIN_STATION_TRACK_ELEVATED_NARROW_C = "Station Track Elevated Narrow (C)";
public const string TRAIN_STATION_TRACK_ELEVATED_NARROW_NP = "Station Track Elevated Narrow (NP)";
public const string TRAIN_STATION_TRACK_ELEVATED_NARROW_CNP = "Station Track Elevated Narrow (CNP)";
public const string TRAIN_STATION_TRACK_ELEVATED_SMALL = "1731659180.ElevatedSingleTrackStationTrack_Data";
public const string TRAIN_STATION_TRACK_ELEVATED_ISLAND = "1194290640.ElevatedIslandPlatStationTrack_Data";
public const string TRAIN_STATION_TRACK_ELEVATED_LARGE = "1577947171.Bypass Station Track_Elevated_Data";
public const string TRAIN_STATION_TRACK_ELEVATED_LARGE_DUALISLAND = "1698282173.DualIslandStationTrack_Elevated_Data";
public const string TRAIN_STATION_TRACK_SUNKEN = "Station Track Sunken";
public const string MOM_TRACK = "Metro Track";
public const string MOM_TRACK_GROUND = "Metro Track Ground";
public const string MOM_TRACK_NOBAR = "Metro Track Ground NoBar";
public const string MOM_TRACK_TWOLANE_ONEWAY = "Metro Track Ground Two-Lane One-Way";
public const string MOM_TRACK_TWOLANE_ONEWAY_NOBAR = "Metro Track Ground Two-Lane One-Way NoBar";
public const string MOM_TRACK_LARGE = "Metro Track Ground Large";
public const string MOM_TRACK_LARGE_NOBAR = "Metro Track Ground Large NoBar";
public const string MOM_TRACK_SMALL = "Metro Track Ground Small";
public const string MOM_TRACK_SMALL_NOBAR = "Metro Track Ground Small NoBar";
public const string MOM_TRACK_SMALL_TWOWAY = "Metro Track Ground Small Two-Way";
public const string MOM_TRACK_SMALL_TWOWAY_NOBAR = "Metro Track Ground Small Two-Way NoBar";
public const string MOM_STATION_TRACK_GROUND = "Metro Station Track Ground";
public const string MOM_STATION_TRACK_GROUND_ISLAND = "Metro Station Track Ground Island";
public const string MOM_STATION_TRACK_GROUND_SMALL = "Metro Station Track Ground Small";
public const string MOM_STATION_TRACK_GROUND_LARGE = "Metro Station Track Ground Large";
public const string MOM_STATION_TRACK_GROUND_LARGE_DUALISLAND = "Metro Station Track Ground Large Dual Island";
public const string MOM_STATION_TRACK_ELEVATED = "Metro Station Track Elevated";
public const string MOM_STATION_TRACK_ELEVATED_ISLAND = "Metro Station Track Elevated Island";
public const string MOM_STATION_TRACK_ELEVATED_SMALL = "Metro Station Track Elevated Small";
public const string MOM_STATION_TRACK_ELEVATED_LARGE = "Metro Station Track Elevated Large";
public const string MOM_STATION_TRACK_ELEVATED_LARGE_DUALISLAND = "Metro Station Track Elevated Large Dual Island";
public const string MOM_STATION_TRACK_SUNKEN = "Metro Station Track Sunken";
public const string MOM_TRACK_STEEL = "Steel Metro Track Ground";
public const string MOM_TRACK_NOBAR_STEEL = "Steel Metro Track Ground NoBar";
public const string MOM_TRACK_TWOLANE_ONEWAY_STEEL = "Steel Metro Track Ground Two-Lane One-Way";
public const string MOM_TRACK_TWOLANE_ONEWAY_NOBAR_STEEL = "Steel Metro Track Ground Two-Lane One-Way NoBar";
public const string MOM_TRACK_SMALL_STEEL = "Steel Metro Track Ground Small";
public const string MOM_TRACK_SMALL_NOBAR_STEEL = "Steel Metro Track Ground Small NoBar";
public const string MOM_TRACK_SMALL_TWOWAY_STEEL = "Steel Metro Track Ground Small Two-Way";
public const string MOM_TRACK_SMALL_TWOWAY_NOBAR_STEEL = "Steel Metro Track Ground Small Two-Way NoBar";
public const string MOM_TRACK_LARGE_STEEL = "Steel Metro Track Ground Large";
public const string MOM_TRACK_LARGE_NOBAR_STEEL = "Steel Metro Track Ground Large NoBar";
public const string MOM_STATION_TRACK_GROUND_STEEL = "Steel Metro Station Track Ground";
public const string MOM_STATION_TRACK_GROUND_ISLAND_STEEL = "Steel Metro Station Track Ground Island";
public const string MOM_STATION_TRACK_GROUND_SMALL_STEEL = "Steel Metro Station Track Ground Small";
public const string MOM_STATION_TRACK_GROUND_LARGE_STEEL = "Steel Metro Station Track Ground Large";
public const string MOM_STATION_TRACK_GROUND_LARGE_DUALISLAND_STEEL = "Steel Metro Station Track Ground Large Dual Island";
public const string MOM_STATION_TRACK_ELEVATED_STEEL = "Steel Metro Station Track Elevated";
public const string MOM_STATION_TRACK_ELEVATED_ISLAND_STEEL = "Steel Metro Station Track Elevated Island";
public const string MOM_STATION_TRACK_ELEVATED_SMALL_STEEL = "Steel Metro Station Track Elevated Small";
public const string MOM_STATION_TRACK_ELEVATED_LARGE_STEEL = "Steel Metro Station Track Elevated Large";
public const string MOM_STATION_TRACK_ELEVATED_LARGE_DUALISLAND_STEEL = "Steel Metro Station Track Elevated Large Dual Island";
public const string ANALOG_PREFIX = "_XANALOGX_";
public static string GetTrackAnalogName(string trackName)
{
var retval = "";
UnityEngine.Debug.Log("TrackName to analog " + trackName);
if (trackName.IndexOf("Train") > -1 || trackName.IndexOf("Rail") > -1)
{
if (trackName == TRAIN_TRACK)
{
retval = MOM_TRACK_GROUND;
}
else if (trackName == TRAIN_SINGLE_TRACK || trackName == TRAIN_SINGLE_TRACK_RAIL1L1W || trackName == TRAIN_SINGLE_TRACK_RAIL1L2W)
{
retval = MOM_TRACK_SMALL;
}
else if (trackName.Contains(TRAIN_SINGLE_TRACK))
{
retval = trackName.Replace(TRAIN_SINGLE_TRACK, MOM_TRACK_SMALL);
}
else if (trackName.Contains(TRAIN_SINGLE_TRACK_RAIL1L1W))
{
retval = trackName.Replace(TRAIN_SINGLE_TRACK_RAIL1L1W, MOM_TRACK_SMALL);
}
else if (trackName.Contains(TRAIN_SINGLE_TRACK_RAIL1L2W))
{
retval = trackName.Replace(TRAIN_SINGLE_TRACK_RAIL1L2W, MOM_TRACK_SMALL);
}
else
{
retval = trackName.Replace(TRAIN_TRACK, MOM_TRACK);
}
UnityEngine.Debug.Log("Analogged TrackName " + retval);
return retval + " NoBar";
}
else if (trackName.IndexOf("Metro") > -1)
{
trackName = trackName.Replace(" NoBar", "");
if (trackName == MOM_TRACK_GROUND)
{
return TRAIN_TRACK;
}
else if (trackName == MOM_TRACK_SMALL)
{
return TRAIN_SINGLE_TRACK;
}
else if (trackName.Contains(MOM_TRACK_SMALL))
{
return trackName.Replace(MOM_TRACK_SMALL, TRAIN_SINGLE_TRACK);
}
else
{
return trackName.Replace(MOM_TRACK, TRAIN_TRACK);
}
}
return "";
}
}
public enum StationTrackType : byte
{
None = 0,
SidePlatform = 1,
IslandPlatform = 2,
SinglePlatform = 3,
ExpressSidePlatform = 4,
DualIslandPlatform = 5
//QuadSideIslandPlatform = 6
}
public enum TrackType
{
None,
TwowayTwoLane,
OnewayTwoLane,
TwowayOneLane,
OnewayOneLane,
Quad
}
public enum TrackVehicleType
{
Default,
Train,
Metro,
}
public enum TrackStyle
{
None,
Vanilla,
Modern,
Classic
}
public enum PillarType
{
None,
WideMedian,
Wide,
NarrowMedian,
Narrow
}
}