Advertisement
Guest User

MP54 head engines graphics

a guest
Jul 4th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.28 KB | None | 0 0
  1.  
  2. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  3. // PURCHASE SPRITE
  4. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  5.  
  6. spriteset(spriteset_EMU_PRR_MP54_purchase, "gfx/EMU/EMU_PRR_MP54.png") {
  7. template_purchase_dualheaded(1, 192)
  8. }
  9.  
  10. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  11. // VEHICLE SPRITE(S)
  12. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  13.  
  14. //FRONT - PASSENGER
  15. spriteset(spriteset_EMU_PRR_MP54_pass_front, "gfx/EMU/EMU_PRR_MP54.png") {
  16. template_2cc_engines_general(1, 1)
  17. }
  18.  
  19. //BACK - PASSENGER
  20. spriteset(spriteset_EMU_PRR_MP54_pass_back, "gfx/EMU/EMU_PRR_MP54.png") {
  21. template_2cc_engines_general(1, 32)
  22. }
  23.  
  24. //FRONT - MAIL
  25. spriteset(spriteset_EMU_PRR_MP54_mail_front, "gfx/EMU/EMU_PRR_MP54.png") {
  26. template_2cc_engines_general(1, 1)
  27. }
  28.  
  29. //BACK - MAIL
  30. spriteset(spriteset_EMU_PRR_MP54_mail_back, "gfx/EMU/EMU_PRR_MP54.png") {
  31. template_2cc_engines_general(1, 32)
  32. }
  33.  
  34. //Middle - PAX-L1
  35. spriteset(spriteset_EMU_PRR_MP54_middlepass_L1, "gfx/EMU/EMU_PRR_MP54.png") {
  36. template_2cc_engines_general(1, 64)
  37. }
  38.  
  39. //Middle - MAIL-L1
  40. spriteset(spriteset_EMU_PRR_MP54_middlemail_L1, "gfx/EMU/EMU_PRR_MP54.png") {
  41. template_2cc_engines_general(1, 96)
  42. }
  43.  
  44. //Middle - PAX-L2
  45. spriteset(spriteset_EMU_PRR_MP54_middlepass_L2, "gfx/EMU/EMU_PRR_MP54.png") {
  46. template_2cc_engines_general(1, 128)
  47. }
  48.  
  49. //Middle - MAIL-L2
  50. spriteset(spriteset_EMU_PRR_MP54_middlemail_L2, "gfx/EMU/EMU_PRR_MP54.png") {
  51. template_2cc_engines_general(1, 160)
  52. }
  53.  
  54. //Dualheaded engines
  55. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_reversed, var[0xC8]) {
  56. 0xFF: spriteset_EMU_PRR_MP54_pass_back;
  57. spriteset_EMU_PRR_MP54_pass_front;
  58. }
  59.  
  60. //Visual effect, for EMU this is done on the part with the pantograph
  61. random_switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_visual_effect_and_powered) {
  62. 1: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER);
  63. 9: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, -3, DISABLE_WAGON_POWER);
  64. }
  65.  
  66. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_visual_effect_and_powered_position, [STORE_TEMP(-1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) {
  67. ID_RANGE_UNIT_WAGONS: switch_EMU_PRR_MP54_visual_effect_and_powered;
  68. visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, -3, DISABLE_WAGON_POWER);
  69. }
  70.  
  71. random_switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_middlepass_livery) {
  72. dependent: switch_EMU_PRR_MP54_visual_effect_and_powered;
  73. 9: spriteset_EMU_PRR_MP54_middlepass_L2;
  74. 1: spriteset_EMU_PRR_MP54_middlepass_L1;
  75. }
  76.  
  77. random_switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_middlemail_livery) {
  78. dependent: switch_EMU_PRR_MP54_visual_effect_and_powered;
  79. 9: spriteset_EMU_PRR_MP54_middlemail_L2;
  80. 1: spriteset_EMU_PRR_MP54_middlemail_L1;
  81. }
  82.  
  83. //Unpowered Passenger Car
  84. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_middlepass_position_L1, [STORE_TEMP(-1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) {
  85. ID_RANGE_UNIT_WAGONS: switch_EMU_PRR_MP54_middlepass_livery;
  86. spriteset_EMU_PRR_MP54_middlepass_L1;
  87. }
  88.  
  89. //Unpowered Mail/Cargo Cars
  90. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_middlemail_position_L1, [STORE_TEMP(-1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) {
  91. ID_RANGE_UNIT_WAGONS: switch_EMU_PRR_MP54_middlemail_livery;
  92. spriteset_EMU_PRR_MP54_middlemail_L1;
  93. }
  94.  
  95. //Powered Passenger Car
  96. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_middlepass_position_L2, [STORE_TEMP(-1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) {
  97. ID_RANGE_UNIT_WAGONS: switch_EMU_PRR_MP54_middlepass_livery;
  98. spriteset_EMU_PRR_MP54_middlepass_L2;
  99. }
  100.  
  101. //Powered Mail/Cargo Cars
  102. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_middlemail_position_L2, [STORE_TEMP(-1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) {
  103. ID_RANGE_UNIT_WAGONS: switch_EMU_PRR_MP54_middlemail_livery;
  104. spriteset_EMU_PRR_MP54_middlemail_L2;
  105. }
  106.  
  107. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  108. // CARGO CAPACITY
  109. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  110.  
  111. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_capacity, cargo_classes) {
  112. bitmask(CC_PASSENGERS): 72; // Passengers
  113. bitmask(CC_MAIL): 52; // Mail Cargo
  114. bitmask(CC_ARMOURED): 32; // Armored Cargos
  115. 32; // All other Cargos
  116. }
  117.  
  118. //CARGO GRAPHICS - FRONT ENGINE
  119. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_front_cargo_selection, cargo_classes){
  120. bitmask(CC_PASSENGERS): switch_EMU_PRR_MP54_pass_front;
  121. switch_EMU_PRR_MP54_mail_front;
  122. }
  123.  
  124. //CARGO GRAPHICS - BACK ENGINE
  125. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_back_cargo_selection, cargo_classes){
  126. bitmask(CC_PASSENGERS): switch_EMU_PRR_MP54_pass_back;
  127. switch_EMU_PRR_MP54_mail_back;
  128. }
  129.  
  130. //CARGO GRAPHICS - UNPOWERED CARS
  131. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_cargo_selection, cargo_classes){
  132. bitmask(CC_PASSENGERS): switch_EMU_PRR_MP54_middlepass_position_L1;
  133. switch_EMU_PRR_MP54_middlemail_position_L1;
  134. }
  135.  
  136. //CARGO GRAPHICS - POWERED CARS
  137. switch(FEAT_TRAINS, SELF, switch_EMU_PRR_MP54_cargo_selection_powered, cargo_classes){
  138. bitmask(CC_PASSENGERS): switch_EMU_PRR_MP54_middlepass_position_L2;
  139. switch_EMU_PRR_MP54_middlemail_position_L2;
  140. }
  141.  
  142. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  143. // ITEM CODE
  144. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  145.  
  146. item(FEAT_TRAINS, item_EMU_PRR_MP54) {
  147. property {
  148. name: string(STR_NAME_EMU_PRR_MP54);
  149.  
  150. introduction_date: date(1980,1,1);
  151.  
  152. climates_available: ALL_CLIMATES;
  153. running_cost_base: RUNNING_COST_ELECTRIC;
  154. engine_class: ENGINE_CLASS_ELECTRIC;
  155. track_type: ELRL;
  156.  
  157. // ### LIFE ###
  158. model_life: 25;
  159. vehicle_life: 25;
  160.  
  161. // ### COSTS ###
  162. cost_factor: 10; //46
  163. running_cost_factor: 255; //34.4
  164.  
  165. weight: 48000 kg;
  166. speed: 104 km/h;
  167. power: 900 hp;
  168. tractive_effort_coefficient: 0.255;
  169. air_drag_coefficient: 0;
  170. reliability_decay: 20;
  171.  
  172. LOADINGSPEEDDEF_COMMUTER
  173. CARGODEF_MU
  174. cargo_capacity: 72;
  175. cargo_age_period: 222;
  176. default_cargo_type: PASS;
  177.  
  178. refit_cost: 0;
  179.  
  180. ai_special_flag: AI_FLAG_PASSENGER;
  181. misc_flags: bitmask(TRAIN_FLAG_MU,TRAIN_FLAG_2CC);
  182. visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER);
  183.  
  184. sprite_id: SPRITE_ID_NEW_TRAIN;
  185. dual_headed: 1;
  186. length: 8;
  187. extra_power_per_wagon: 0;
  188. bitmask_vehicle_info: 0;
  189. }
  190.  
  191. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  192. // GRAPHICS AND SWITCHES
  193. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  194.  
  195. graphics {
  196. additional_text: string(STR_TEXT_EMU_PRR_MP54);
  197. purchase: spriteset_EMU_PRR_MP54_purchase;
  198. cargo_capacity: switch_EMU_PRR_MP54_capacity;
  199. switch_EMU_PRR_MP54_reversed;
  200. }
  201. livery_override (ITEM_SPECIAL_MU_CAR_UNPOWERED){
  202. LOADINGSPEEDDEF_COMMUTER
  203. running_cost_factor: 1;
  204. power: 0;
  205. weight: 35;
  206. cargo_capacity: switch_EMU_PRR_MP54_capacity;
  207. length: 8;
  208. visual_effect_and_powered: switch_EMU_PRR_MP54_visual_effect_and_powered_position;
  209. default: switch_EMU_PRR_MP54_cargo_selection;
  210. }
  211. livery_override (ITEM_SPECIAL_MU_CAR_POWERED){
  212. LOADINGSPEEDDEF_COMMUTER
  213. running_cost_factor: 15;
  214. power: 450;
  215. weight: 68;
  216. cargo_capacity: switch_EMU_PRR_MP54_capacity;
  217. tractive_effort_coefficient: 33;
  218. length: 8;
  219. visual_effect_and_powered: switch_EMU_PRR_MP54_visual_effect_and_powered_position;
  220. default: switch_EMU_PRR_MP54_cargo_selection_powered;
  221. }
  222. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement