NÁHODNÝ VÝBĚR SPRITESETU PODLE BARVY:
random_switch (FEAT_TRAINS, SELF, random_railcom4_pass){
1: return spriteset_railcom4_black_pass;
1: return spriteset_railcom4_gray_pass;
1: return spriteset_railcom4_white_pass;
1: return spriteset_railcom4_ltblue_pass;
1: return spriteset_railcom4_blue_pass;
1: return spriteset_railcom4_darkblue_pass;
1: return spriteset_railcom4_mauve_pass;
1: return spriteset_railcom4_purple_pass;
1: return spriteset_railcom4_pink_pass;
1: return spriteset_railcom4_brown_pass;
1: return spriteset_railcom4_red_pass;
1: return spriteset_railcom4_orange_pass;
1: return spriteset_railcom4_yellow_pass;
1: return spriteset_railcom4_green_pass;
1: return spriteset_railcom4_palegreen_pass;
1: return spriteset_railcom4_darkgreen_pass;
}
zvolení barvy podle toho, jaký sybtype je refitovaný:´
switch(FEAT_TRAINS, SELF, switch_subtypes_railcom4_pass, cargo_subtype){
0: return spriteset_railcom4_CC_pass <--- specifický spriteset
1: return random_railcom4_pass <-------- NÁHODNÝ VÝBĚR BARVY nahoře
2: return spriteset_railcom4_black_pass; <--- specifický spriteset
3: return spriteset_railcom4_gray_pass; <--- specifický spriteset
4: return spriteset_railcom4_white_pass; <--- specifický spriteset
5: return spriteset_railcom4_ltblue_pass;
6: return spriteset_railcom4_blue_pass;
7: return spriteset_railcom4_darkblue_pass;
8: return spriteset_railcom4_mauve_pass;
9: return spriteset_railcom4_purple_pass;
10: return spriteset_railcom4_pink_pass;
11: return spriteset_railcom4_brown_pass;
12: return spriteset_railcom4_red_pass;
13: return spriteset_railcom4_orange_pass;
14: return spriteset_railcom4_yellow_pass;
15: return spriteset_railcom4_green_pass;
16: return spriteset_railcom4_palegreen_pass;
17: return spriteset_railcom4_darkgreen_pass;
return spriteset_railcom4_CC_pass; <--- specifický spriteset
}
ROZLIŠENÍ TYPU NÁKLADU:
switch(FEAT_TRAINS, SELF, switch_railcom4_x, cargo_type_in_veh){
PASS: switch_subtypes_railcom4_pass;
MAIL: switch_subtypes_railcom4_mail;
GOLD: switch_subtypes_railcom4_gold;
VALU: switch_subtypes_railcom4_gold;
DIAM: switch_subtypes_railcom4_gold;
return switch_subtypes_railcom4_pass;
} //taky nevím na co je - nějaké rozřazení nákladů?
ZJIŠTĚNÍ, JESTLI JE VAGON NA KONCI VLAKU:
switch(FEAT_TRAINS, SELF, switch_railcom4_rear, position_in_consist_from_end){
0: switch_railcom4_x;
return switch_subtypes_railcom4_inner_x;
}
ZJIŠTĚNÍ, JESTLI JE VAGON NA ZAČÁTKU VLAKU:
switch(FEAT_TRAINS, SELF, switch_railcom4_front, position_in_consist){
0: switch_railcom4_x;
return switch_railcom4_rear;
}