Advertisement
Guest User

ep2_bipolar_nml

a guest
May 22nd, 2017
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.45 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2014 Transportman
  3. * This file is part of the 2cc Trains In NML and is based on The Dutch Trainset 2.0 by Jasper Vries
  4. * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
  5. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  6. * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  7. */
  8.  
  9.  
  10. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  11. // PURCHASE SPRITE
  12. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  13.  
  14. spriteset(spriteset_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_purchase, "gfx/Electric/ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR.png") {
  15. template_purchase(1, 128)
  16. }
  17.  
  18. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  19. // VEHICLE SPRITE(S)
  20. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  21. // This vehicle uses the template for length 10.
  22. // The vehicle is built with 3 pieces of length 3+4+3
  23. // The middle part gets the graphics, the other parts are left blank
  24. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  25.  
  26. //Engine
  27. spriteset(spriteset_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_engine, "gfx/Electric/ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR.png") {
  28. template_2cc_L12(1, 1)
  29. }
  30.  
  31.  
  32. switch(FEAT_TRAINS, SELF, switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_position, position_in_vehid_chain % 2) {
  33. 0: spriteset_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_engine;
  34. EMPTY_SPRITESET
  35. }
  36.  
  37. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  38. // VISUAL EFFECT
  39. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  40.  
  41. switch(FEAT_TRAINS, SELF, switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_visual_effect, position_in_vehid_chain % 2) {
  42. 0: return visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, -3, DISABLE_WAGON_POWER);
  43. return visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER);
  44. }
  45.  
  46. switch(FEAT_TRAINS, SELF, switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_length, position_in_vehid_chain % 2) {
  47. 0: 8;
  48. 2;
  49. }
  50.  
  51. switch(FEAT_TRAINS, SELF, switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_articulated, extra_callback_info1) {
  52. 1: return item_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR;
  53. return CB_RESULT_NO_MORE_ARTICULATED_PARTS;
  54. }
  55.  
  56. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  57. // ITEM CODE
  58. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  59.  
  60. item(FEAT_TRAINS, item_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR) {
  61. property {
  62. name: string(STR_NAME_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR);
  63.  
  64. climates_available: ALL_CLIMATES;
  65. engine_class: ENGINE_CLASS_ELECTRIC;
  66. running_cost_base: RUNNING_COST_DIESEL;
  67.  
  68. introduction_date: date(1919,1,1);
  69. model_life: 35;
  70. vehicle_life: 40;
  71.  
  72. cost_factor: 25;
  73. running_cost_factor: 195;
  74.  
  75. speed: 145 km/h;
  76. power: 4440 hp;
  77. cargo_capacity: 0;
  78. weight: 240000kg;
  79. tractive_effort_coefficient: 0.17;
  80. air_drag_coefficient: 0;
  81.  
  82. reliability_decay: 20;
  83. CARGODEF_NONE
  84. cargo_age_period: 185;
  85. misc_flags: bitmask(TRAIN_FLAG_2CC);
  86. refit_cost: 0;
  87. track_type: ELRL;
  88. ai_special_flag: AI_FLAG_PASSENGER;
  89. visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); //Set from graphics file
  90.  
  91. sprite_id: SPRITE_ID_NEW_TRAIN;
  92. dual_headed: 0;
  93. length: 8;
  94. extra_power_per_wagon: 0;
  95. bitmask_vehicle_info: 0;
  96. }
  97.  
  98. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  99. // GRAPHICS AND SWITCHES
  100. // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  101.  
  102. graphics {
  103. purchase: spriteset_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_purchase;
  104. additional_text: string(STR_TEXT_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR);
  105. visual_effect_and_powered: switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_visual_effect;
  106. length: switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_length;
  107. articulated_part: switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_articulated;
  108. switch_ELECTRIC_MILWAUKEE_ROAD_EP_2_BIPOLAR_position;
  109. }
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement