Loading

random_switch and subtype

  1. NÁHODNÝ VÝBĚR SPRITESETU PODLE BARVY:
  2. random_switch (FEAT_TRAINS, SELF, random_railcom4_pass){
  3. 1: return spriteset_railcom4_black_pass;
  4. 1: return spriteset_railcom4_gray_pass;
  5. 1: return spriteset_railcom4_white_pass;
  6. 1: return spriteset_railcom4_ltblue_pass;
  7. 1: return spriteset_railcom4_blue_pass;
  8. 1: return spriteset_railcom4_darkblue_pass;
  9. 1: return spriteset_railcom4_mauve_pass;
  10. 1: return spriteset_railcom4_purple_pass;
  11. 1: return spriteset_railcom4_pink_pass;
  12. 1: return spriteset_railcom4_brown_pass;
  13. 1: return spriteset_railcom4_red_pass;
  14. 1: return spriteset_railcom4_orange_pass;
  15. 1: return spriteset_railcom4_yellow_pass;
  16. 1: return spriteset_railcom4_green_pass;
  17. 1: return spriteset_railcom4_palegreen_pass;
  18. 1: return spriteset_railcom4_darkgreen_pass;
  19. }
  20.  
  21.  
  22.  
  23. zvolení barvy podle toho, jaký sybtype je refitovaný:´
  24.  
  25. switch(FEAT_TRAINS, SELF, switch_subtypes_railcom4_pass, cargo_subtype){
  26. 0: return spriteset_railcom4_CC_pass <--- specifický spriteset
  27. 1: return random_railcom4_pass <-------- NÁHODNÝ VÝBĚR BARVY nahoře
  28. 2: return spriteset_railcom4_black_pass; <--- specifický spriteset
  29. 3: return spriteset_railcom4_gray_pass; <--- specifický spriteset
  30. 4: return spriteset_railcom4_white_pass; <--- specifický spriteset
  31. 5: return spriteset_railcom4_ltblue_pass;
  32. 6: return spriteset_railcom4_blue_pass;
  33. 7: return spriteset_railcom4_darkblue_pass;
  34. 8: return spriteset_railcom4_mauve_pass;
  35. 9: return spriteset_railcom4_purple_pass;
  36. 10: return spriteset_railcom4_pink_pass;
  37. 11: return spriteset_railcom4_brown_pass;
  38. 12: return spriteset_railcom4_red_pass;
  39. 13: return spriteset_railcom4_orange_pass;
  40. 14: return spriteset_railcom4_yellow_pass;
  41. 15: return spriteset_railcom4_green_pass;
  42. 16: return spriteset_railcom4_palegreen_pass;
  43. 17: return spriteset_railcom4_darkgreen_pass;
  44. return spriteset_railcom4_CC_pass; <--- specifický spriteset
  45. }
  46.  
  47.  
  48.  
  49. ROZLIŠENÍ TYPU NÁKLADU:
  50.  
  51. switch(FEAT_TRAINS, SELF, switch_railcom4_x, cargo_type_in_veh){
  52. PASS: switch_subtypes_railcom4_pass;
  53. MAIL: switch_subtypes_railcom4_mail;
  54. GOLD: switch_subtypes_railcom4_gold;
  55. VALU: switch_subtypes_railcom4_gold;
  56. DIAM: switch_subtypes_railcom4_gold;
  57. return switch_subtypes_railcom4_pass;
  58. } //taky nevím na co je - nějaké rozřazení nákladů?
  59.  
  60.  
  61. ZJIŠTĚNÍ, JESTLI JE VAGON NA KONCI VLAKU:
  62.  
  63. switch(FEAT_TRAINS, SELF, switch_railcom4_rear, position_in_consist_from_end){
  64. 0: switch_railcom4_x;
  65. return switch_subtypes_railcom4_inner_x;
  66. }
  67.  
  68.  
  69.  
  70. ZJIŠTĚNÍ, JESTLI JE VAGON NA ZAČÁTKU VLAKU:
  71.  
  72. switch(FEAT_TRAINS, SELF, switch_railcom4_front, position_in_consist){
  73. 0: switch_railcom4_x;
  74. return switch_railcom4_rear;
  75. }

Comments