Loading

NARS_ADDON_SET.nml

  1. # 1 "NARS_ADDON_SET.pnml"
  2. # 1 "<built-in>"
  3. # 1 "<command-line>"
  4. # 1 "NARS_ADDON_SET.pnml"
  5. /*
  6.  * NARS_ADDON_SET.pnml
  7.  * NARS ADDON SET
  8.  *
  9.  * This is the main file for this NewGRF project.
  10.  * When there are new vehicles added to the set,
  11.  * add the corresponding pnml file to the list below.
  12.  */
  13.  
  14. # 1 "src/header.pnml" 1
  15. /*
  16.  
  17.  * header.pnml
  18.  
  19.  * NARS ADDON
  20.  
  21.  *
  22.  
  23.  * This is the main file for this NewGRF project.
  24.  
  25.  * When there are new vehicles added to the set,
  26.  
  27.  * add the corresponding pnml file to the list below.
  28.  
  29.  */
  30. # 10 "src/header.pnml"
  31. grf {
  32.     grfid: "NM\09\27";
  33.     name: string(STR_GRF_NAME);
  34.     desc: string(STR_GRF_DESC);
  35.  url: string(STR_GRF_URL);
  36.     version: 22;
  37.     min_compatible_version: 0;
  38.     param {
  39.  
  40.         param_purchase_cost {
  41.             type: int;
  42.             name: string(STR_PARAM_PURCHASE_COST);
  43.             desc: string(STR_PARAM_PURCHASE_COST_DESC);
  44.             min_value: 0;
  45.             max_value: 8;
  46.             def_value: 4;
  47.             names: {
  48.                         0: string(STR_PARAM_DIV_16);
  49.                         1: string(STR_PARAM_DIV_8);
  50.                         2: string(STR_PARAM_DIV_4);
  51.                         3: string(STR_PARAM_DIV_2);
  52.                         4: string(STR_PARAM_NORMAL);
  53.                         5: string(STR_PARAM_MULT_2);
  54.                         6: string(STR_PARAM_MULT_4);
  55.                         7: string(STR_PARAM_MULT_8);
  56.                         8: string(STR_PARAM_MULT_16);
  57.             };
  58.         }
  59.     }
  60.     param {
  61.         param_running_cost {
  62.             type: int;
  63.             name: string(STR_PARAM_RUNNING_COST);
  64.             desc: string(STR_PARAM_RUNNING_COST_DESC);
  65.             min_value: 0;
  66.             max_value: 8;
  67.             def_value: 4;
  68.             names: {
  69.                        0: string(STR_PARAM_DIV_16);
  70.                         1: string(STR_PARAM_DIV_8);
  71.                         2: string(STR_PARAM_DIV_4);
  72.                         3: string(STR_PARAM_DIV_2);
  73.                         4: string(STR_PARAM_NORMAL);
  74.                         5: string(STR_PARAM_MULT_2);
  75.                         6: string(STR_PARAM_MULT_4);
  76.                         7: string(STR_PARAM_MULT_8);
  77.                         8: string(STR_PARAM_MULT_16);
  78.             };
  79.         }
  80.     }
  81.  
  82. }
  83.  
  84. //set base cost multiplier for this set
  85. basecost {
  86.  PR_BUILD_VEHICLE_TRAIN: 1 + param_purchase_cost - 4;
  87.  PR_BUILD_VEHICLE_WAGON: 3 + param_purchase_cost - 4;
  88.  PR_RUNNING_TRAIN_STEAM: 3 + param_running_cost - 4; //Engine running costs
  89.  PR_RUNNING_TRAIN_DIESEL: 1 + param_running_cost - 4; //Wagon running costs
  90.  //Electric running costs are not used
  91. }
  92.  
  93. //set depot vehicle width to 32px to avoid overlap
  94. train_width_32_px = 1;
  95. //align train properly in depot window
  96. traininfo_y_offset = 2;
  97. # 11 "NARS_ADDON_SET.pnml" 2
  98. # 1 "src/railtypetable.pnml" 1
  99. //Railtype translation table
  100. //This set uses the default labels and adds Metro-vehicles.
  101.  
  102. railtypetable {
  103.     RAIL,
  104.  ELRL,
  105.  MONO,
  106.  MGLV
  107. }
  108. # 12 "NARS_ADDON_SET.pnml" 2
  109. # 1 "src/templates.pnml" 1
  110. /*
  111.  * templates.pnml
  112.  * NARS ADDON
  113.  *
  114.  * This file defines commonly used spriteset templates.
  115.  */
  116.  
  117. // Purchase view
  118. // ================================================================================================
  119.  
  120. template template_purchase_L8(x, y) {
  121. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  122.  
  123.     [ 2, 163, 46, 28, -18, -22] // PURCHASE
  124.  
  125. }
  126.  
  127. template template_purchase_L7(x, y) {
  128. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  129.  
  130.     [ 2, 163, 42, 28, -14, -22] // PURCHASE
  131.  
  132. }
  133.  
  134. template template_purchase_L6(x, y) {
  135. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  136.  
  137.     [ 2, 163, 38, 28, -10, -22] // PURCHASE
  138.  
  139. }
  140.  
  141. // Depot view
  142. // ================================================================================================
  143.  
  144. template template_depot_L8(x, y) {
  145. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  146.  [ 2, 2, 10, 28, -4, -13] // na
  147.     [ 16, 2, 26, 28, -16, -18] // na
  148.     [ 190, 163, 36, 28, -19, -22] // East   ==>
  149.     [ 86, 2, 26, 28, -10, -19] // na
  150.     [ 116, 2, 10, 28, -4, -13] // na
  151.     [ 130, 2, 26, 28, -16, -18] // na
  152.     [ 150, 163, 36, 28, -18, -22] // West   <==
  153.     [ 200, 2, 26, 28, -8, -18] // na
  154. }
  155.  
  156. template template_depot_L7(x, y) {
  157. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  158.  [ 2, 2, 10, 28, -4, -13] // na
  159.     [ 16, 2, 26, 28, -16, -18] // na
  160.     [ 190, 163, 36, 28, -19, -22] // East   ==>
  161.     [ 86, 2, 26, 28, -8, -18] // na
  162.     [ 116, 2, 10, 28, -4, -13] // na
  163.     [ 130, 2, 26, 28, -16, -18] // na
  164.     [ 150, 163, 36, 28, -18, -22] // West   <==
  165.     [ 200, 2, 26, 28, -8, -18] // na
  166. }
  167.  
  168. template template_depot_L6(x, y) {
  169. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  170.  [ 2, 2, 10, 28, -4, -13] // North  ^
  171.     [ 16, 2, 26, 28, -16, -18] // North-East -16 -18
  172.     [ 46, 2, 36, 28, -23, -22] // East  ==>
  173.     [ 86, 2, 26, 28, -8, -18] // South-East
  174.     [ 116, 2, 10, 28, -4, -13] // South v
  175.     [ 130, 2, 26, 28, -16, -18] // South-West
  176.     [ 160, 2, 36, 28, -22, -22] // West     <==
  177.     [ 200, 2, 26, 28, -8, -18] // North-West
  178.  
  179. }
  180.  
  181. // Vehicle Templates (FIRST / A-UNIT)
  182. // ================================================================================================
  183.  
  184. template template_depot_L8(x, y) {
  185. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  186.  [ 2, 2, 10, 28, -4, -13] // North  ^
  187.     [ 16, 2, 26, 28, -16, -18] // North-East
  188.     [ 46, 2, 36, 28, -19, -22] // East  ==>
  189.     [ 86, 2, 26, 28, -10, -19] // South-East
  190.     [ 116, 2, 10, 28, -4, -13] // South v
  191.     [ 130, 2, 26, 28, -16, -18] // South-West
  192.     [ 160, 2, 36, 28, -18, -22] // West     <==
  193.     [ 200, 2, 26, 28, -8, -18] // North-West
  194. }
  195.  
  196. template template_L7A(x, y) {
  197. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  198.  [ 2, 2, 10, 28, -4, -13] // North  ^
  199.     [ 16, 2, 26, 28, -16, -18] // North-East -16 -18
  200.     [ 46, 2, 36, 28, -19, -22] // East  ==>
  201.     [ 86, 2, 26, 28, -8, -18] // South-East
  202.     [ 116, 2, 10, 28, -4, -13] // South v
  203.     [ 130, 2, 26, 28, -16, -18] // South-West
  204.     [ 160, 2, 36, 28, -18, -22] // West     <==
  205.     [ 200, 2, 26, 28, -8, -18] // North-West
  206. }
  207.  
  208. template template_L6A(x, y) {
  209. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  210.  [ 2, 2, 10, 28, -4, -13] // North  ^
  211.     [ 16, 2, 26, 28, -16, -18] // North-East -16 -18
  212.     [ 46, 2, 36, 28, -23, -22] // East  ==>
  213.     [ 86, 2, 26, 28, -8, -18] // South-East
  214.     [ 116, 2, 10, 28, -4, -13] // South v
  215.     [ 130, 2, 26, 28, -16, -18] // South-West
  216.     [ 160, 2, 36, 28, -22, -22] // West     <==
  217.     [ 200, 2, 26, 28, -8, -18] // North-West
  218. }
  219.  
  220. // Vehicle Templates (SECOND / B-UNIT
  221. // ================================================================================================
  222.  
  223. template template_L8B (x, y) {
  224. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  225.  [ 2, 32, 10, 28, -4, -13] // North ^
  226.     [ 16, 32, 26, 28, -16, -18] // North-East
  227.     [ 46, 32, 36, 28, -19, -22] // East     ==>
  228.     [ 86, 32, 26, 28, -10, -19] // South-East
  229.     [ 116, 32, 10, 28, -4, -13] // South v
  230.     [ 130, 32, 26, 28, -16, -18] // South-West
  231.     [ 160, 32, 36, 28, -18, -22] // West    <==
  232.     [ 200, 32, 26, 28, -8, -18] // North-West
  233. }
  234.  
  235. template template_L7B(x, y) {
  236. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  237.  [ 2, 32, 10, 28, -4, -13] // North ^
  238.     [ 16, 32, 26, 28, -16, -18] // North-East -16 -18
  239.     [ 46, 32, 36, 28, -19, -22] // East     ==>
  240.     [ 86, 32, 26, 28, -8, -18] // South-East
  241.     [ 116, 32, 10, 28, -4, -13] // South v
  242.     [ 130, 32, 26, 28, -16, -18] // South-West
  243.     [ 160, 32, 36, 28, -18, -22] // West    <==
  244.     [ 200, 32, 26, 28, -8, -18] // North-West
  245. }
  246.  
  247. template template_L6B(x, y) {
  248. //  [left_x,    upper_y,    width,     height,     offset_x,     offset_y]
  249.  [ 2, 2, 10, 28, -4, -13] // North  ^
  250.     [ 16, 2, 26, 28, -16, -18] // North-East -16 -18
  251.     [ 46, 2, 36, 28, -23, -22] // East  ==>
  252.     [ 86, 2, 26, 28, -8, -18] // South-East
  253.     [ 116, 2, 10, 28, -4, -13] // South v
  254.     [ 130, 2, 26, 28, -16, -18] // South-West
  255.     [ 160, 2, 36, 28, -22, -22] // West     <==
  256.     [ 200, 2, 26, 28, -8, -18] // North-West
  257. # 13 "NARS_ADDON_SET.pnml" 2
  258. # 1 "src/vehicleID.pnml" 1
  259. // Steam (1000)
  260. // ============================================================================
  261.  
  262. // Diesel (2000)
  263. // ============================================================================
  264.  
  265. item(FEAT_TRAINS, item_EMD_E7, 2001) {} // 1945
  266. item(FEAT_TRAINS, item_EMD_E8, 2002) {} // 1949
  267. item(FEAT_TRAINS, item_EMD_E9, 2003) {} // 1954
  268. item(FEAT_TRAINS, item_EMD_FP45, 2004) {} // 1967
  269. item(FEAT_TRAINS, item_EMD_F40C, 2005) {} // 1973
  270. item(FEAT_TRAINS, item_EMD_F40PH2D, 2006) {} // 2007
  271. item(FEAT_TRAINS, item_EMD_GP402P, 2007) {} // 1974
  272.  
  273. item(FEAT_TRAINS, item_FM_ERIEBUILT, 2008) {} // 1945
  274.  
  275. item(FEAT_TRAINS, item_GE_U30CG, 2009) {} // 1967
  276.  
  277. item(FEAT_TRAINS, item_MLW_FPA4, 2010) {} // 1958
  278.  
  279. // ...
  280.  
  281. item(FEAT_TRAINS, item_EMD_F3, 2501) {} // 1945
  282. item(FEAT_TRAINS, item_EMD_F7, 2502) {} // 1949
  283. item(FEAT_TRAINS, item_EMD_F9, 2503) {} // 1953
  284. item(FEAT_TRAINS, item_EMD_F45, 2504) {} // 1968
  285. item(FEAT_TRAINS, item_EMD_GP9U, 2505) {} // 1990
  286. item(FEAT_TRAINS, item_EMD_GP30, 2506) {} // 1961
  287. item(FEAT_TRAINS, item_EMD_GP35, 2507) {} // 1963
  288. item(FEAT_TRAINS, item_EMD_GP40, 2508) {} // 1965
  289. item(FEAT_TRAINS, item_EMD_GP402, 2509) {} // 1972
  290. item(FEAT_TRAINS, item_EMD_SD452, 2510) {} // 1972
  291.  
  292. item(FEAT_TRAINS, item_MLW_RS18, 2511) {} // 1956
  293.  
  294. // Turbine (3000)
  295. // ============================================================================
  296.  
  297. // Electric (4000)
  298. // ============================================================================
  299.  
  300. item(FEAT_TRAINS, item_CNR_Z1A, 4001) {} // 1916
  301. # 14 "NARS_ADDON_SET.pnml" 2
  302.  
  303. // STEAM
  304. // =============================================================================
  305.  
  306. // DIESEL
  307. // =============================================================================
  308.  
  309. // ... passenger ...
  310.  
  311. //alco
  312.  
  313. // emd
  314. # 1 "src/DIESEL/EMD_E7.PNML" 1
  315. //graphics definition
  316.  
  317. spriteset(spriteset_EMD_E7, "gfx/diesel/EMD_E7.png") {
  318.     template_L8A(0,0)
  319. }
  320.  
  321. spriteset(spriteset_EMD_E7_purchase, "gfx/diesel/EMD_E7.png") {
  322.     template_purchase_L8(0,0)
  323. }
  324.  
  325. spriteset(spriteset_EMD_E7_depot, "gfx/diesel/EMD_E7.png") {
  326.     template_depot_L8()
  327. }
  328.  
  329. //B-unit
  330. spriteset(spriteset_EMD_E7b, "gfx/diesel/EMD_E7.png") {
  331.  template_L8B(0,0)
  332. }
  333.  
  334. //Switch for B-unit
  335. switch(FEAT_TRAINS, SELF, switch_EMD_E7_position, position_in_vehid_chain % 2) {
  336.  1: spriteset_EMD_E7b;
  337.   spriteset_EMD_E7;
  338. }
  339.  
  340. // item
  341. item(FEAT_TRAINS, item_EMD_E7) {
  342.     property {
  343.         name: string(STR_NAME_EMD_E7);
  344.         climates_available: ALL_CLIMATES;
  345.   engine_class: ENGINE_CLASS_DIESEL;
  346.  
  347.         introduction_date: date(1945,01,01);
  348.         model_life: 40;
  349.         vehicle_life: 30;
  350.         retire_early: 0;
  351.  
  352.         track_type: RAIL;
  353.  
  354.         cost_factor: 13;
  355.   running_cost_factor: 106;
  356.   running_cost_base: RUNNING_COST_STEAM;
  357.         refit_cost: 0; // Refitting is free        
  358.  
  359.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  360.         length: 8;
  361.  
  362.   power: 2000 hp;
  363.   speed: 157 km/h;
  364.   weight: 154000 kg;
  365.   tractive_effort_coefficient: 0.135; //
  366.  
  367.   reliability_decay: 0;
  368.   cargo_age_period: 65535;
  369.  
  370.         cargo_capacity: 0;
  371.  
  372.   ai_special_flag: AI_FLAG_PASSENGER;
  373.  
  374.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  375.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  376.     }
  377.  
  378.     // define graphics and callbacks
  379.     graphics {
  380.         purchase: spriteset_EMD_E7_purchase;
  381.   additional_text: string(STR_TEXT_EMD_E7);
  382.  
  383.   switch_EMD_E7_position;
  384.     }
  385. }
  386. # 27 "NARS_ADDON_SET.pnml" 2
  387. # 1 "src/DIESEL/EMD_E8.PNML" 1
  388. //graphics definition
  389.  
  390. spriteset(spriteset_EMD_E8, "gfx/diesel/EMD_E8.png") {
  391.     template_L8A(0,0)
  392. }
  393.  
  394. spriteset(spriteset_EMD_E8_purchase, "gfx/diesel/EMD_E8.png") {
  395.     template_purchase_L8(0,0)
  396. }
  397.  
  398. spriteset(spriteset_EMD_E8_depot, "gfx/diesel/EMD_E8.png") {
  399.     template_depot_L8()
  400. }
  401.  
  402. //B-unit
  403. spriteset(spriteset_EMD_E8b, "gfx/diesel/EMD_E8.png") {
  404.  template_L8B(0,0)
  405. }
  406.  
  407. //Switch for B-unit
  408. switch(FEAT_TRAINS, SELF, switch_EMD_E8_position, position_in_vehid_chain % 2) {
  409.  1: spriteset_EMD_E8b;
  410.   spriteset_EMD_E8;
  411. }
  412.  
  413. // item
  414. item(FEAT_TRAINS, item_EMD_E8) {
  415.     property {
  416.         name: string(STR_NAME_EMD_E8);
  417.         climates_available: ALL_CLIMATES;
  418.   engine_class: ENGINE_CLASS_DIESEL;
  419.  
  420.         introduction_date: date(1949,01,01);
  421.         model_life: 40;
  422.         vehicle_life: 30;
  423.         retire_early: 0;
  424.  
  425.         track_type: RAIL;
  426.  
  427.         cost_factor: 14;
  428.   running_cost_factor: 110;
  429.   running_cost_base: RUNNING_COST_STEAM;
  430.         refit_cost: 0; // Refitting is free        
  431.  
  432.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  433.         length: 8;
  434.  
  435.   power: 2250 hp;
  436.   speed: 157 km/h;
  437.   weight: 154000 kg;
  438.   tractive_effort_coefficient: 0.140; //
  439.  
  440.   reliability_decay: 0;
  441.   cargo_age_period: 65535;
  442.  
  443.         cargo_capacity: 0;
  444.  
  445.   ai_special_flag: AI_FLAG_PASSENGER;
  446.  
  447.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  448.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  449.     }
  450.  
  451.     // define graphics and callbacks
  452.     graphics {
  453.         purchase: spriteset_EMD_E8_purchase;
  454.   additional_text: string(STR_TEXT_EMD_E8);
  455.  
  456.   switch_EMD_E8_position;
  457.     }
  458. }
  459. # 28 "NARS_ADDON_SET.pnml" 2
  460. # 1 "src/DIESEL/EMD_E9.PNML" 1
  461. //graphics definition (Locomotive with Booster B Unit)
  462.  
  463. spriteset(spriteset_EMD_E9, "gfx/diesel/EMD_E9.png") {
  464.     template_L8A(0,0)
  465. }
  466.  
  467. spriteset(spriteset_EMD_E9_purchase, "gfx/diesel/EMD_E9.png") {
  468.     template_purchase_L8(0,0)
  469. }
  470.  
  471. spriteset(spriteset_EMD_E9_depot, "gfx/diesel/EMD_E9.png") {
  472.     template_depot_L8()
  473. }
  474.  
  475. //B-unit
  476. spriteset(spriteset_EMD_E9b, "gfx/diesel/EMD_E9.png") {
  477.  template_L8B(0,0)
  478. }
  479.  
  480. //Switch for B-unit
  481. switch(FEAT_TRAINS, SELF, switch_EMD_E9_position, position_in_vehid_chain % 2) {
  482.  1: spriteset_EMD_E9b;
  483.   spriteset_EMD_E9;
  484. }
  485.  
  486. // item
  487. item(FEAT_TRAINS, item_EMD_E9) {
  488.     property {
  489.         name: string(STR_NAME_EMD_E9);
  490.         climates_available: ALL_CLIMATES;
  491.   engine_class: ENGINE_CLASS_DIESEL;
  492.  
  493.         introduction_date: date(1954,01,01);
  494.         model_life: 40;
  495.         vehicle_life: 30;
  496.         retire_early: 0;
  497.  
  498.         track_type: RAIL;
  499.  
  500.         cost_factor: 15;
  501.   running_cost_factor: 116;
  502.   running_cost_base: RUNNING_COST_STEAM;
  503.         refit_cost: 0; // Refitting is free        
  504.  
  505.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  506.         length: 8;
  507.  
  508.   power: 2400 hp;
  509.   speed: 157 km/h;
  510.   weight: 154000 kg;
  511.   tractive_effort_coefficient: 0.145; //
  512.  
  513.   reliability_decay: 0;
  514.   cargo_age_period: 65535;
  515.  
  516.         cargo_capacity: 0;
  517.  
  518.   ai_special_flag: AI_FLAG_PASSENGER;
  519.  
  520.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  521.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  522.     }
  523.  
  524.     // define graphics and callbacks
  525.     graphics {
  526.         purchase: spriteset_EMD_E9_purchase;
  527.   additional_text: string(STR_TEXT_EMD_E9);
  528.  
  529.   switch_EMD_E9_position;
  530.     }
  531. }
  532. # 29 "NARS_ADDON_SET.pnml" 2
  533. # 1 "src/DIESEL/EMD_FP45.PNML" 1
  534. //graphics definition
  535. spriteset(spriteset_EMD_FP45, "gfx/diesel/EMD_FP45.png") {
  536.     template_L8A(0,0)
  537. }
  538. spriteset(spriteset_EMD_FP45_depot, "gfx/diesel/EMD_FP45.png") {
  539.     template_depot_L8(0,0)
  540. }
  541. spriteset(spriteset_EMD_FP45_purchase, "gfx/diesel/EMD_FP45.png") {
  542.     template_purchase_L8(0,0)
  543. }
  544.  
  545. switch(FEAT_TRAINS, SELF, spriteset_EMD_FP45_default, getbits(extra_callback_info1, 0, 8)) {
  546.     0x10: spriteset_EMD_FP45_depot; // Depot view
  547.     0x12: spriteset_EMD_FP45_depot; // Vehicle List view
  548.     spriteset_EMD_FP45; // Default
  549. }
  550.  
  551. // item
  552. item(FEAT_TRAINS, item_EMD_FP45) {
  553.     property {
  554.         name: string(STR_NAME_EMD_FP45);
  555.         climates_available: ALL_CLIMATES;
  556.   engine_class: ENGINE_CLASS_DIESEL;
  557.  
  558.         introduction_date: date(1967,01,01);
  559.         model_life: 40;
  560.         vehicle_life: 30;
  561.         retire_early: 0;
  562.  
  563.         track_type: RAIL;
  564.  
  565.         cost_factor: 22;
  566.   running_cost_factor: 154;
  567.   running_cost_base: RUNNING_COST_STEAM;
  568.         refit_cost: 0; // Refitting is free        
  569.  
  570.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  571.         length: 8;
  572.  
  573.   power: 3000 hp;
  574.   speed: 152 km/h;
  575.   weight: 180000 kg;
  576.   tractive_effort_coefficient: 0.171; // 365 kN OpenTTD 1.6.1
  577.  
  578.   reliability_decay: 0;
  579.   cargo_age_period: 65535;
  580.  
  581.         cargo_capacity: 0;
  582.  
  583.   ai_special_flag: AI_FLAG_PASSENGER;
  584.  
  585.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  586.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  587.     }
  588.  
  589.     // define graphics and callbacks
  590.     graphics {
  591.         default: spriteset_EMD_FP45_default;
  592.         purchase: spriteset_EMD_FP45_purchase;
  593.   additional_text: string(STR_TEXT_EMD_FP45);
  594.     }
  595. }
  596. # 30 "NARS_ADDON_SET.pnml" 2
  597. # 1 "src/DIESEL/EMD_F40C.PNML" 1
  598. //graphics definition
  599. spriteset(spriteset_EMD_F40C, "gfx/diesel/EMD_F40C.png") {
  600.     template_L8A(0,0)
  601. }
  602. spriteset(spriteset_EMD_F40C_depot, "gfx/diesel/EMD_F40C.png") {
  603.     template_depot_L8(0,0)
  604. }
  605. spriteset(spriteset_EMD_F40C_purchase, "gfx/diesel/EMD_F40C.png") {
  606.     template_purchase_L8(0,0)
  607. }
  608.  
  609. switch(FEAT_TRAINS, SELF, spriteset_EMD_F40C_default, getbits(extra_callback_info1, 0, 8)) {
  610.     0x10: spriteset_EMD_F40C_depot; // Depot view
  611.     0x12: spriteset_EMD_F40C_depot; // Vehicle List view
  612.     spriteset_EMD_F40C; // Default
  613. }
  614.  
  615. // item
  616. item(FEAT_TRAINS, item_EMD_F40C) {
  617.     property {
  618.         name: string(STR_NAME_EMD_F40C);
  619.         climates_available: ALL_CLIMATES;
  620.   engine_class: ENGINE_CLASS_DIESEL;
  621.  
  622.         introduction_date: date(1973,01,01);
  623.         model_life: 40;
  624.         vehicle_life: 30;
  625.         retire_early: 0;
  626.  
  627.         track_type: RAIL;
  628.  
  629.         cost_factor: 21;
  630.   running_cost_factor: 148;
  631.   running_cost_base: RUNNING_COST_STEAM;
  632.         refit_cost: 0; // Refitting is free        
  633.  
  634.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  635.         length: 8;
  636.  
  637.   power: 3200 hp;
  638.   speed: 152 km/h;
  639.   weight: 167000 kg;
  640.   tractive_effort_coefficient: 0.160; //
  641.  
  642.   reliability_decay: 0;
  643.   cargo_age_period: 65535;
  644.  
  645.         cargo_capacity: 0;
  646.  
  647.   ai_special_flag: AI_FLAG_PASSENGER;
  648.  
  649.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  650.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  651.     }
  652.  
  653.     // define graphics and callbacks
  654.     graphics {
  655.         default: spriteset_EMD_F40C_default;
  656.         purchase: spriteset_EMD_F40C_purchase;
  657.   additional_text: string(STR_TEXT_EMD_F40C);
  658.     }
  659. }
  660. # 31 "NARS_ADDON_SET.pnml" 2
  661. # 1 "src/DIESEL/EMD_F40PH2D.PNML" 1
  662. //graphics definition
  663. spriteset(spriteset_EMD_F40PH2D, "gfx/diesel/EMD_F40PH2D.png") {
  664.     template_L7A(0,0)
  665. }
  666. spriteset(spriteset_EMD_F40PH2D_depot, "gfx/diesel/EMD_F40PH2D.png") {
  667.     template_depot_L7(0,0)
  668. }
  669. spriteset(spriteset_EMD_F40PH2D_purchase, "gfx/diesel/EMD_F40PH2D.png") {
  670.     template_purchase_L7(0,0)
  671. }
  672.  
  673. switch(FEAT_TRAINS, SELF, spriteset_EMD_F40PH2D_default, getbits(extra_callback_info1, 0, 8)) {
  674.     0x10: spriteset_EMD_F40PH2D_depot; // Depot view
  675.     0x12: spriteset_EMD_F40PH2D_depot; // Vehicle List view
  676.     spriteset_EMD_F40PH2D; // Default
  677. }
  678.  
  679. // item
  680. item(FEAT_TRAINS, item_EMD_F40PH2D) {
  681.     property {
  682.         name: string(STR_NAME_EMD_F40PH2D);
  683.         climates_available: ALL_CLIMATES;
  684.   engine_class: ENGINE_CLASS_DIESEL;
  685.  
  686.         introduction_date: date(2007,01,01);
  687.         model_life: 40;
  688.         vehicle_life: 30;
  689.         retire_early: 0;
  690.  
  691.         track_type: RAIL;
  692.  
  693.         cost_factor: 18;
  694.   running_cost_factor: 126;
  695.   running_cost_base: RUNNING_COST_STEAM;
  696.         refit_cost: 0; // Refitting is free        
  697.  
  698.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  699.         length: 7;
  700.  
  701.   power: 3000 hp;
  702.   speed: 160 km/h;
  703.   weight: 118000 kg;
  704.   tractive_effort_coefficient: 0.195; //
  705.  
  706.   reliability_decay: 0;
  707.   cargo_age_period: 65535;
  708.  
  709.         cargo_capacity: 0;
  710.  
  711.   ai_special_flag: AI_FLAG_PASSENGER;
  712.  
  713.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  714.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  715.     }
  716.  
  717.     // define graphics and callbacks
  718.     graphics {
  719.         default: spriteset_EMD_F40PH2D_default;
  720.         purchase: spriteset_EMD_F40PH2D_purchase;
  721.   additional_text: string(STR_TEXT_EMD_F40PH2D);
  722.     }
  723. }
  724. # 32 "NARS_ADDON_SET.pnml" 2
  725. # 1 "src/DIESEL/EMD_GP402P.PNML" 1
  726. //graphics definition
  727. spriteset(spriteset_EMD_GP402P, "gfx/diesel/EMD_GP402P.png") {
  728.     template_L7A(0,0)
  729. }
  730. spriteset(spriteset_EMD_GP402P_depot, "gfx/diesel/EMD_GP402P.png") {
  731.     template_depot_L7(0,0)
  732. }
  733. spriteset(spriteset_EMD_GP402P_purchase, "gfx/diesel/EMD_GP402P.png") {
  734.     template_purchase_L7(0,0)
  735. }
  736.  
  737. switch(FEAT_TRAINS, SELF, spriteset_EMD_GP402P_default, getbits(extra_callback_info1, 0, 8)) {
  738.     0x10: spriteset_EMD_GP402P_depot; // Depot view
  739.     0x12: spriteset_EMD_GP402P_depot; // Vehicle List view
  740.     spriteset_EMD_GP402P; // Default
  741. }
  742.  
  743. // item
  744. item(FEAT_TRAINS, item_EMD_GP402P) {
  745.     property {
  746.         name: string(STR_NAME_EMD_GP402P);
  747.         climates_available: ALL_CLIMATES;
  748.   engine_class: ENGINE_CLASS_DIESEL;
  749.  
  750.         introduction_date: date(1972,01,01);
  751.         model_life: 40;
  752.         vehicle_life: 30;
  753.         retire_early: 0;
  754.  
  755.         track_type: RAIL;
  756.  
  757.         cost_factor: 18;
  758.   running_cost_factor: 120;
  759.   running_cost_base: RUNNING_COST_STEAM;
  760.         refit_cost: 0; // Refitting is free        
  761.  
  762.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  763.         length: 7;
  764.  
  765.   power: 3000 hp;
  766.   speed: 128 km/h;
  767.   weight: 119000 kg;
  768.   tractive_effort_coefficient: 0.205; // 365 kN OpenTTD 1.6.1
  769.  
  770.   reliability_decay: 0;
  771.   cargo_age_period: 65535;
  772.  
  773.         cargo_capacity: 0;
  774.  
  775.   ai_special_flag: AI_FLAG_PASSENGER;
  776.  
  777.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  778.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  779.     }
  780.  
  781.     // define graphics and callbacks
  782.     graphics {
  783.         default: spriteset_EMD_GP402P_default;
  784.         purchase: spriteset_EMD_GP402P_purchase;
  785.   additional_text: string(STR_TEXT_EMD_GP402P);
  786.     }
  787. }
  788. # 33 "NARS_ADDON_SET.pnml" 2
  789.  
  790. // fairbanks morse
  791.  
  792. # 1 "src/DIESEL/FM_ERIEBUILT.PNML" 1
  793. //graphics definition
  794.  
  795. spriteset(spriteset_FM_ERIEBUILT, "gfx/diesel/FM_ERIEBUILT.png") {
  796.     template_L8A(0,0)
  797. }
  798.  
  799. spriteset(spriteset_FM_ERIEBUILT_purchase, "gfx/diesel/FM_ERIEBUILT.png") {
  800.     template_purchase_L8(0,0)
  801. }
  802.  
  803. spriteset(spriteset_FM_ERIEBUILT_depot, "gfx/diesel/FM_ERIEBUILT.png") {
  804.     template_depot_L8()
  805. }
  806.  
  807. //B-unit
  808. spriteset(spriteset_FM_ERIEBUILTb, "gfx/diesel/FM_ERIEBUILT.png") {
  809.  template_L8B(0,0)
  810. }
  811.  
  812. //Switch for B-unit
  813. switch(FEAT_TRAINS, SELF, switch_FM_ERIEBUILT_position, position_in_vehid_chain % 2) {
  814.  1: spriteset_FM_ERIEBUILTb;
  815.   spriteset_FM_ERIEBUILT;
  816. }
  817.  
  818. // item
  819. item(FEAT_TRAINS, item_FM_ERIEBUILT) {
  820.     property {
  821.         name: string(STR_NAME_FM_ERIEBUILT);
  822.         climates_available: ALL_CLIMATES;
  823.   engine_class: ENGINE_CLASS_DIESEL;
  824.  
  825.         introduction_date: date(1945,01,01);
  826.         model_life: 40;
  827.         vehicle_life: 30;
  828.         retire_early: 0;
  829.  
  830.         track_type: RAIL;
  831.  
  832.   cost_factor: 14;
  833.   running_cost_factor: 108;
  834.   running_cost_base: RUNNING_COST_STEAM;
  835.         refit_cost: 0; // Refitting is free        
  836.  
  837.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  838.         length: 8;
  839.  
  840.   power: 2000 hp;
  841.   speed: 165 km/h;
  842.   weight: 130000 kg;
  843.   tractive_effort_coefficient: 0.140; // 365 kN OpenTTD 1.6.1
  844.  
  845.   reliability_decay: 0;
  846.   cargo_age_period: 65535;
  847.  
  848.         cargo_capacity: 0;
  849.  
  850.   ai_special_flag: AI_FLAG_PASSENGER;
  851.  
  852.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  853.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  854.     }
  855.  
  856.     // define graphics and callbacks
  857.     graphics {
  858.         purchase: spriteset_FM_ERIEBUILT_purchase;
  859.   additional_text: string(STR_TEXT_FM_ERIEBUILT);
  860.  
  861.   switch_FM_ERIEBUILT_position;
  862.     }
  863. }
  864. # 37 "NARS_ADDON_SET.pnml" 2
  865.  
  866. // ge
  867. # 1 "src/DIESEL/GE_U30CG.PNML" 1
  868. //graphics definition
  869. spriteset(spriteset_GE_U30CG, "gfx/diesel/GE_U30CG.png") {
  870.     template_L8A(0,0)
  871. }
  872. spriteset(spriteset_GE_U30CG_depot, "gfx/diesel/GE_U30CG.png") {
  873.     template_depot_L8(0,0)
  874. }
  875. spriteset(spriteset_GE_U30CG_purchase, "gfx/diesel/GE_U30CG.png") {
  876.     template_purchase_L8(0,0)
  877. }
  878.  
  879. switch(FEAT_TRAINS, SELF, spriteset_GE_U30CG_default, getbits(extra_callback_info1, 0, 8)) {
  880.     0x10: spriteset_GE_U30CG_depot; // Depot view
  881.     0x12: spriteset_GE_U30CG_depot; // Vehicle List view
  882.     spriteset_GE_U30CG; // Default
  883. }
  884.  
  885. // item
  886. item(FEAT_TRAINS, item_GE_U30CG) {
  887.     property {
  888.         name: string(STR_NAME_GE_U30CG);
  889.         climates_available: ALL_CLIMATES;
  890.   engine_class: ENGINE_CLASS_DIESEL;
  891.  
  892.         introduction_date: date(1967,01,01);
  893.         model_life: 40;
  894.         vehicle_life: 30;
  895.         retire_early: 0;
  896.  
  897.         track_type: RAIL;
  898.  
  899.         cost_factor: 18;
  900.   running_cost_factor: 145;
  901.   running_cost_base: RUNNING_COST_STEAM;
  902.         refit_cost: 0; // Refitting is free        
  903.  
  904.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  905.         length: 8;
  906.  
  907.   power: 3000 hp;
  908.   speed: 128 km/h;
  909.   weight: 175000 kg;
  910.   tractive_effort_coefficient: 0.170; //
  911.  
  912.   reliability_decay: 0;
  913.   cargo_age_period: 65535;
  914.  
  915.         cargo_capacity: 0;
  916.  
  917.   ai_special_flag: AI_FLAG_PASSENGER;
  918.  
  919.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  920.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  921.     }
  922.  
  923.     // define graphics and callbacks
  924.     graphics {
  925.         default: spriteset_GE_U30CG_default;
  926.         purchase: spriteset_GE_U30CG_purchase;
  927.   additional_text: string(STR_TEXT_GE_U30CG);
  928.     }
  929. }
  930. # 40 "NARS_ADDON_SET.pnml" 2
  931.  
  932. //mlw
  933. # 1 "src/DIESEL/MLW_FPA4.PNML" 1
  934. //graphics definition
  935.  
  936. spriteset(spriteset_MLW_FPA4, "gfx/diesel/MLW_FPA4.png") {
  937.     template_L7A(0,0)
  938. }
  939.  
  940. spriteset(spriteset_MLW_FPA4_purchase, "gfx/diesel/MLW_FPA4.png") {
  941.     template_purchase_L7(0,0)
  942. }
  943.  
  944. spriteset(spriteset_MLW_FPA4_depot, "gfx/diesel/MLW_FPA4.png") {
  945.     template_depot_L7()
  946. }
  947.  
  948. //B-unit
  949. spriteset(spriteset_MLW_FPA4b, "gfx/diesel/MLW_FPA4.png") {
  950.  template_L7B(0,0)
  951. }
  952.  
  953. //Switch for B-unit
  954. switch(FEAT_TRAINS, SELF, switch_MLW_FPA4_position, position_in_vehid_chain % 2) {
  955.  1: spriteset_MLW_FPA4b;
  956.   spriteset_MLW_FPA4;
  957. }
  958.  
  959. // item
  960. item(FEAT_TRAINS, item_MLW_FPA4) {
  961.     property {
  962.         name: string(STR_NAME_MLW_FPA4);
  963.         climates_available: ALL_CLIMATES;
  964.   engine_class: ENGINE_CLASS_DIESEL;
  965.  
  966.         introduction_date: date(1958,01,01);
  967.         model_life: 40;
  968.         vehicle_life: 30;
  969.         retire_early: 0;
  970.  
  971.         track_type: RAIL;
  972.  
  973.         cost_factor: 12;
  974.   running_cost_factor: 96;
  975.   running_cost_base: RUNNING_COST_STEAM;
  976.         refit_cost: 0; // Refitting is free        
  977.  
  978.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  979.         length: 7;
  980.  
  981.   power: 1800 hp;
  982.   speed: 148 km/h;
  983.   weight: 107000 kg;
  984.   tractive_effort_coefficient: 0.225; //
  985.  
  986.   reliability_decay: 0;
  987.   cargo_age_period: 65535;
  988.  
  989.         cargo_capacity: 0;
  990.  
  991.   ai_special_flag: AI_FLAG_CARGO;
  992.  
  993.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  994.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  995.     }
  996.  
  997.     // define graphics and callbacks
  998.     graphics {
  999.         purchase: spriteset_MLW_FPA4_purchase;
  1000.   additional_text: string(STR_TEXT_MLW_FPA4);
  1001.  
  1002.   switch_MLW_FPA4_position;
  1003.     }
  1004. }
  1005. # 43 "NARS_ADDON_SET.pnml" 2
  1006.  
  1007. //... cargo ...
  1008.  
  1009. // emd
  1010. # 1 "src/DIESEL/EMD_F3.PNML" 1
  1011. //graphics definition
  1012.  
  1013. spriteset(spriteset_EMD_F3, "gfx/diesel/EMD_F3.png") {
  1014.     template_L7A(0,0)
  1015. }
  1016.  
  1017. spriteset(spriteset_EMD_F3_purchase, "gfx/diesel/EMD_F3.png") {
  1018.     template_purchase_L7(0,0)
  1019. }
  1020.  
  1021. spriteset(spriteset_EMD_F3_depot, "gfx/diesel/EMD_F3.png") {
  1022.     template_depot_L7()
  1023. }
  1024.  
  1025. //B-unit
  1026. spriteset(spriteset_EMD_F3b, "gfx/diesel/EMD_F3.png") {
  1027.  template_L7B(0,0)
  1028. }
  1029.  
  1030. //Switch for B-unit
  1031. switch(FEAT_TRAINS, SELF, switch_EMD_F3_position, position_in_vehid_chain % 2) {
  1032.  1: spriteset_EMD_F3b;
  1033.   spriteset_EMD_F3;
  1034. }
  1035.  
  1036. // item
  1037. item(FEAT_TRAINS, item_EMD_F3) {
  1038.     property {
  1039.         name: string(STR_NAME_EMD_F3);
  1040.         climates_available: ALL_CLIMATES;
  1041.   engine_class: ENGINE_CLASS_DIESEL;
  1042.  
  1043.         introduction_date: date(1945,01,01);
  1044.         model_life: 40;
  1045.         vehicle_life: 30;
  1046.         retire_early: 0;
  1047.  
  1048.         track_type: RAIL;
  1049.  
  1050.         cost_factor: 10;
  1051.   running_cost_factor: 78;
  1052.   running_cost_base: RUNNING_COST_STEAM;
  1053.         refit_cost: 0; // Refitting is free        
  1054.  
  1055.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1056.         length: 7;
  1057.  
  1058.   power: 1500 hp;
  1059.   speed: 120 km/h;
  1060.   weight: 105000 kg;
  1061.   tractive_effort_coefficient: 0.185; //
  1062.  
  1063.   reliability_decay: 0;
  1064.   cargo_age_period: 65535;
  1065.  
  1066.         cargo_capacity: 0;
  1067.  
  1068.   ai_special_flag: AI_FLAG_CARGO;
  1069.  
  1070.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1071.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1072.     }
  1073.  
  1074.     // define graphics and callbacks
  1075.     graphics {
  1076.         purchase: spriteset_EMD_F3_purchase;
  1077.   additional_text: string(STR_TEXT_EMD_F3);
  1078.  
  1079.   switch_EMD_F3_position;
  1080.     }
  1081. }
  1082. # 48 "NARS_ADDON_SET.pnml" 2
  1083. # 1 "src/DIESEL/EMD_F7.PNML" 1
  1084. //graphics definition
  1085.  
  1086. spriteset(spriteset_EMD_F7, "gfx/diesel/EMD_F7.png") {
  1087.     template_L7A(0,0)
  1088. }
  1089.  
  1090. spriteset(spriteset_EMD_F7_purchase, "gfx/diesel/EMD_F7.png") {
  1091.     template_purchase_L7(0,0)
  1092. }
  1093.  
  1094. spriteset(spriteset_EMD_F7_depot, "gfx/diesel/EMD_F7.png") {
  1095.     template_depot_L7()
  1096. }
  1097.  
  1098. //B-unit
  1099. spriteset(spriteset_EMD_F7b, "gfx/diesel/EMD_F7.png") {
  1100.  template_L7B(0,0)
  1101. }
  1102.  
  1103. //Switch for B-unit
  1104. switch(FEAT_TRAINS, SELF, switch_EMD_F7_position, position_in_vehid_chain % 2) {
  1105.  1: spriteset_EMD_F7b;
  1106.   spriteset_EMD_F7;
  1107. }
  1108.  
  1109. // item
  1110. item(FEAT_TRAINS, item_EMD_F7) {
  1111.     property {
  1112.         name: string(STR_NAME_EMD_F7);
  1113.         climates_available: ALL_CLIMATES;
  1114.   engine_class: ENGINE_CLASS_DIESEL;
  1115.  
  1116.         introduction_date: date(1949,01,01);
  1117.         model_life: 40;
  1118.         vehicle_life: 30;
  1119.         retire_early: 0;
  1120.  
  1121.         track_type: RAIL;
  1122.  
  1123.         cost_factor: 11;
  1124.   running_cost_factor: 81;
  1125.   running_cost_base: RUNNING_COST_STEAM;
  1126.         refit_cost: 0; // Refitting is free        
  1127.  
  1128.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1129.         length: 7;
  1130.  
  1131.   power: 1500 hp;
  1132.   speed: 120 km/h;
  1133.   weight: 105000 kg;
  1134.   tractive_effort_coefficient: 0.190; //
  1135.  
  1136.   reliability_decay: 0;
  1137.   cargo_age_period: 65535;
  1138.  
  1139.         cargo_capacity: 0;
  1140.  
  1141.   ai_special_flag: AI_FLAG_CARGO;
  1142.  
  1143.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1144.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1145.     }
  1146.  
  1147.     // define graphics and callbacks
  1148.     graphics {
  1149.         purchase: spriteset_EMD_F7_purchase;
  1150.   additional_text: string(STR_TEXT_EMD_F7);
  1151.  
  1152.   switch_EMD_F7_position;
  1153.     }
  1154. }
  1155. # 49 "NARS_ADDON_SET.pnml" 2
  1156. # 1 "src/DIESEL/EMD_F9.PNML" 1
  1157. //graphics definition
  1158.  
  1159. spriteset(spriteset_EMD_F9, "gfx/diesel/EMD_F9.png") {
  1160.     template_L7A(0,0)
  1161. }
  1162.  
  1163. spriteset(spriteset_EMD_F9_purchase, "gfx/diesel/EMD_F9.png") {
  1164.     template_purchase_L7(0,0)
  1165. }
  1166.  
  1167. spriteset(spriteset_EMD_F9_depot, "gfx/diesel/EMD_F9.png") {
  1168.     template_depot_L7()
  1169. }
  1170.  
  1171. //B-unit
  1172. spriteset(spriteset_EMD_F9b, "gfx/diesel/EMD_F9.png") {
  1173.  template_L7B(0,0)
  1174. }
  1175.  
  1176. //Switch for B-unit
  1177. switch(FEAT_TRAINS, SELF, switch_EMD_F9_position, position_in_vehid_chain % 2) {
  1178.  1: spriteset_EMD_F9b;
  1179.   spriteset_EMD_F9;
  1180. }
  1181.  
  1182. // item
  1183. item(FEAT_TRAINS, item_EMD_F9) {
  1184.     property {
  1185.         name: string(STR_NAME_EMD_F9);
  1186.         climates_available: ALL_CLIMATES;
  1187.   engine_class: ENGINE_CLASS_DIESEL;
  1188.  
  1189.         introduction_date: date(1953,01,01);
  1190.         model_life: 40;
  1191.         vehicle_life: 30;
  1192.         retire_early: 0;
  1193.  
  1194.         track_type: RAIL;
  1195.  
  1196.         cost_factor: 12;
  1197.   running_cost_factor: 83;
  1198.   running_cost_base: RUNNING_COST_STEAM;
  1199.         refit_cost: 0; // Refitting is free        
  1200.  
  1201.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1202.         length: 7;
  1203.  
  1204.   power: 1750 hp;
  1205.   speed: 120 km/h;
  1206.   weight: 105000 kg;
  1207.   tractive_effort_coefficient: 0.195; //
  1208.  
  1209.   reliability_decay: 0;
  1210.   cargo_age_period: 65535;
  1211.  
  1212.         cargo_capacity: 0;
  1213.  
  1214.   ai_special_flag: AI_FLAG_CARGO;
  1215.  
  1216.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1217.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1218.     }
  1219.  
  1220.     // define graphics and callbacks
  1221.     graphics {
  1222.         purchase: spriteset_EMD_F9_purchase;
  1223.   additional_text: string(STR_TEXT_EMD_F9);
  1224.  
  1225.   switch_EMD_F9_position;
  1226.     }
  1227. }
  1228. # 50 "NARS_ADDON_SET.pnml" 2
  1229. # 1 "src/DIESEL/EMD_F45.PNML" 1
  1230. //graphics definition
  1231. spriteset(spriteset_EMD_F45, "gfx/diesel/EMD_F45.png") {
  1232.     template_L8A(0,0)
  1233. }
  1234. spriteset(spriteset_EMD_F45_depot, "gfx/diesel/EMD_F45.png") {
  1235.     template_depot_L8(0,0)
  1236. }
  1237. spriteset(spriteset_EMD_F45_purchase, "gfx/diesel/EMD_F45.png") {
  1238.     template_purchase_L8(0,0)
  1239. }
  1240.  
  1241. switch(FEAT_TRAINS, SELF, spriteset_EMD_F45_default, getbits(extra_callback_info1, 0, 8)) {
  1242.     0x10: spriteset_EMD_F45_depot; // Depot view
  1243.     0x12: spriteset_EMD_F45_depot; // Vehicle List view
  1244.     spriteset_EMD_F45; // Default
  1245. }
  1246.  
  1247. // item
  1248. item(FEAT_TRAINS, item_EMD_F45) {
  1249.     property {
  1250.         name: string(STR_NAME_EMD_F45);
  1251.         climates_available: ALL_CLIMATES;
  1252.   engine_class: ENGINE_CLASS_DIESEL;
  1253.  
  1254.         introduction_date: date(1968,01,01);
  1255.         model_life: 40;
  1256.         vehicle_life: 30;
  1257.         retire_early: 0;
  1258.  
  1259.         track_type: RAIL;
  1260.  
  1261.         cost_factor: 21;
  1262.   running_cost_factor: 148;
  1263.   running_cost_base: RUNNING_COST_STEAM;
  1264.         refit_cost: 0; // Refitting is free        
  1265.  
  1266.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1267.         length: 8;
  1268.  
  1269.   power: 3000 hp;
  1270.   speed: 128 km/h;
  1271.   weight: 178000 kg;
  1272.   tractive_effort_coefficient: 0.195; // 365 kN OpenTTD 1.6.1
  1273.  
  1274.   reliability_decay: 0;
  1275.   cargo_age_period: 65535;
  1276.  
  1277.         cargo_capacity: 0;
  1278.  
  1279.   ai_special_flag: AI_FLAG_CARGO;
  1280.  
  1281.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1282.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1283.     }
  1284.  
  1285.     // define graphics and callbacks
  1286.     graphics {
  1287.         default: spriteset_EMD_F45_default;
  1288.         purchase: spriteset_EMD_F45_purchase;
  1289.   additional_text: string(STR_TEXT_EMD_F45);
  1290.     }
  1291. }
  1292. # 51 "NARS_ADDON_SET.pnml" 2
  1293. # 1 "src/DIESEL/EMD_GP9U.PNML" 1
  1294. //graphics definition
  1295. spriteset(spriteset_EMD_GP9U, "gfx/diesel/EMD_GP9U.png") {
  1296.     template_L7A(0,0)
  1297. }
  1298. spriteset(spriteset_EMD_GP9U_depot, "gfx/diesel/EMD_GP9U.png") {
  1299.     template_depot_L7(0,0)
  1300. }
  1301. spriteset(spriteset_EMD_GP9U_purchase, "gfx/diesel/EMD_GP9U.png") {
  1302.     template_purchase_L7(0,0)
  1303. }
  1304.  
  1305. switch(FEAT_TRAINS, SELF, spriteset_EMD_GP9U_default, getbits(extra_callback_info1, 0, 8)) {
  1306.     0x10: spriteset_EMD_GP9U_depot; // Depot view
  1307.     0x12: spriteset_EMD_GP9U_depot; // Vehicle List view
  1308.     spriteset_EMD_GP9U; // Default
  1309. }
  1310.  
  1311. // item
  1312. item(FEAT_TRAINS, item_EMD_GP9U) {
  1313.     property {
  1314.         name: string(STR_NAME_EMD_GP9U);
  1315.         climates_available: ALL_CLIMATES;
  1316.   engine_class: ENGINE_CLASS_DIESEL;
  1317.  
  1318.         introduction_date: date(1990,01,01);
  1319.         model_life: 40;
  1320.         vehicle_life: 30;
  1321.         retire_early: 0;
  1322.  
  1323.         track_type: RAIL;
  1324.  
  1325.         cost_factor: 11;
  1326.   running_cost_factor: 88;
  1327.   running_cost_base: RUNNING_COST_STEAM;
  1328.         refit_cost: 0; // Refitting is free        
  1329.  
  1330.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1331.         length: 7;
  1332.  
  1333.   power: 1900 hp;
  1334.   speed: 120 km/h;
  1335.   weight: 108000 kg;
  1336.   tractive_effort_coefficient: 0.205; // 365 kN OpenTTD 1.6.1
  1337.  
  1338.   reliability_decay: 0;
  1339.   cargo_age_period: 65535;
  1340.  
  1341.         cargo_capacity: 0;
  1342.  
  1343.   ai_special_flag: AI_FLAG_CARGO;
  1344.  
  1345.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1346.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1347.     }
  1348.  
  1349.     // define graphics and callbacks
  1350.     graphics {
  1351.         default: spriteset_EMD_GP9U_default;
  1352.         purchase: spriteset_EMD_GP9U_purchase;
  1353.   additional_text: string(STR_TEXT_EMD_GP9U);
  1354.     }
  1355. }
  1356. # 52 "NARS_ADDON_SET.pnml" 2
  1357. # 1 "src/DIESEL/EMD_GP30.PNML" 1
  1358. //graphics definition
  1359. spriteset(spriteset_EMD_GP30, "gfx/diesel/EMD_GP30.png") {
  1360.     template_L7A(0,0)
  1361. }
  1362. spriteset(spriteset_EMD_GP30_depot, "gfx/diesel/EMD_GP30.png") {
  1363.     template_depot_L7(0,0)
  1364. }
  1365. spriteset(spriteset_EMD_GP30_purchase, "gfx/diesel/EMD_GP30.png") {
  1366.     template_purchase_L7(0,0)
  1367. }
  1368.  
  1369. switch(FEAT_TRAINS, SELF, spriteset_EMD_GP30_default, getbits(extra_callback_info1, 0, 8)) {
  1370.     0x10: spriteset_EMD_GP30_depot; // Depot view
  1371.     0x12: spriteset_EMD_GP30_depot; // Vehicle List view
  1372.     spriteset_EMD_GP30; // Default
  1373. }
  1374.  
  1375. // item
  1376. item(FEAT_TRAINS, item_EMD_GP30) {
  1377.     property {
  1378.         name: string(STR_NAME_EMD_GP30);
  1379.         climates_available: ALL_CLIMATES;
  1380.   engine_class: ENGINE_CLASS_DIESEL;
  1381.  
  1382.         introduction_date: date(1961,01,01);
  1383.         model_life: 40;
  1384.         vehicle_life: 30;
  1385.         retire_early: 0;
  1386.  
  1387.         track_type: RAIL;
  1388.  
  1389.         cost_factor: 12;
  1390.   running_cost_factor: 108;
  1391.   running_cost_base: RUNNING_COST_STEAM;
  1392.         refit_cost: 0; // Refitting is free        
  1393.  
  1394.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1395.         length: 7;
  1396.  
  1397.   power: 2250 hp;
  1398.   speed: 112 km/h;
  1399.   weight: 117000 kg;
  1400.   tractive_effort_coefficient: 0.200; // 365 kN OpenTTD 1.6.1
  1401.  
  1402.   reliability_decay: 0;
  1403.   cargo_age_period: 65535;
  1404.  
  1405.         cargo_capacity: 0;
  1406.  
  1407.   ai_special_flag: AI_FLAG_CARGO;
  1408.  
  1409.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1410.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1411.     }
  1412.  
  1413.     // define graphics and callbacks
  1414.     graphics {
  1415.         default: spriteset_EMD_GP30_default;
  1416.         purchase: spriteset_EMD_GP30_purchase;
  1417.   additional_text: string(STR_TEXT_EMD_GP30);
  1418.     }
  1419. }
  1420. # 53 "NARS_ADDON_SET.pnml" 2
  1421. # 1 "src/DIESEL/EMD_GP35.PNML" 1
  1422. //graphics definition
  1423. spriteset(spriteset_EMD_GP35, "gfx/diesel/EMD_GP35.png") {
  1424.     template_L7A(0,0)
  1425. }
  1426. spriteset(spriteset_EMD_GP35_depot, "gfx/diesel/EMD_GP35.png") {
  1427.     template_depot_L7(0,0)
  1428. }
  1429. spriteset(spriteset_EMD_GP35_purchase, "gfx/diesel/EMD_GP35.png") {
  1430.     template_purchase_L7(0,0)
  1431. }
  1432.  
  1433. switch(FEAT_TRAINS, SELF, spriteset_EMD_GP35_default, getbits(extra_callback_info1, 0, 8)) {
  1434.     0x10: spriteset_EMD_GP35_depot; // Depot view
  1435.     0x12: spriteset_EMD_GP35_depot; // Vehicle List view
  1436.     spriteset_EMD_GP35; // Default
  1437. }
  1438.  
  1439. // item
  1440. item(FEAT_TRAINS, item_EMD_GP35) {
  1441.     property {
  1442.         name: string(STR_NAME_EMD_GP35);
  1443.         climates_available: ALL_CLIMATES;
  1444.   engine_class: ENGINE_CLASS_DIESEL;
  1445.  
  1446.         introduction_date: date(1963,01,01);
  1447.         model_life: 40;
  1448.         vehicle_life: 30;
  1449.         retire_early: 0;
  1450.  
  1451.         track_type: RAIL;
  1452.  
  1453.         cost_factor: 14;
  1454.   running_cost_factor: 112;
  1455.   running_cost_base: RUNNING_COST_STEAM;
  1456.         refit_cost: 0; // Refitting is free        
  1457.  
  1458.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1459.         length: 7;
  1460.  
  1461.   power: 2500 hp;
  1462.   speed: 112 km/h;
  1463.   weight: 117000 kg;
  1464.   tractive_effort_coefficient: 0.205; // 365 kN OpenTTD 1.6.1
  1465.  
  1466.   reliability_decay: 0;
  1467.   cargo_age_period: 65535;
  1468.  
  1469.         cargo_capacity: 0;
  1470.  
  1471.   ai_special_flag: AI_FLAG_CARGO;
  1472.  
  1473.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1474.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1475.     }
  1476.  
  1477.     // define graphics and callbacks
  1478.     graphics {
  1479.         default: spriteset_EMD_GP35_default;
  1480.         purchase: spriteset_EMD_GP35_purchase;
  1481.   additional_text: string(STR_TEXT_EMD_GP35);
  1482.     }
  1483. }
  1484. # 54 "NARS_ADDON_SET.pnml" 2
  1485. # 1 "src/DIESEL/EMD_GP40.PNML" 1
  1486. //graphics definition
  1487. spriteset(spriteset_EMD_GP40, "gfx/diesel/EMD_GP40.png") {
  1488.     template_L7A(0,0)
  1489. }
  1490. spriteset(spriteset_EMD_GP40_depot, "gfx/diesel/EMD_GP40.png") {
  1491.     template_depot_L7(0,0)
  1492. }
  1493. spriteset(spriteset_EMD_GP40_purchase, "gfx/diesel/EMD_GP40.png") {
  1494.     template_purchase_L7(0,0)
  1495. }
  1496.  
  1497. switch(FEAT_TRAINS, SELF, spriteset_EMD_GP40_default, getbits(extra_callback_info1, 0, 8)) {
  1498.     0x10: spriteset_EMD_GP40_depot; // Depot view
  1499.     0x12: spriteset_EMD_GP40_depot; // Vehicle List view
  1500.     spriteset_EMD_GP40; // Default
  1501. }
  1502.  
  1503. // item
  1504. item(FEAT_TRAINS, item_EMD_GP40) {
  1505.     property {
  1506.         name: string(STR_NAME_EMD_GP40);
  1507.         climates_available: ALL_CLIMATES;
  1508.   engine_class: ENGINE_CLASS_DIESEL;
  1509.  
  1510.         introduction_date: date(1965,01,01);
  1511.         model_life: 40;
  1512.         vehicle_life: 30;
  1513.         retire_early: 0;
  1514.  
  1515.         track_type: RAIL;
  1516.  
  1517.         cost_factor: 15;
  1518.   running_cost_factor: 118;
  1519.   running_cost_base: RUNNING_COST_STEAM;
  1520.         refit_cost: 0; // Refitting is free        
  1521.  
  1522.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1523.         length: 7;
  1524.  
  1525.   power: 3000 hp;
  1526.   speed: 120 km/h;
  1527.   weight: 118000 kg;
  1528.   tractive_effort_coefficient: 0.2100; // 365 kN OpenTTD 1.6.1
  1529.  
  1530.   reliability_decay: 0;
  1531.   cargo_age_period: 65535;
  1532.  
  1533.         cargo_capacity: 0;
  1534.  
  1535.   ai_special_flag: AI_FLAG_CARGO;
  1536.  
  1537.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1538.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1539.     }
  1540.  
  1541.     // define graphics and callbacks
  1542.     graphics {
  1543.         default: spriteset_EMD_GP40_default;
  1544.         purchase: spriteset_EMD_GP40_purchase;
  1545.   additional_text: string(STR_TEXT_EMD_GP40);
  1546.     }
  1547. }
  1548. # 55 "NARS_ADDON_SET.pnml" 2
  1549. # 1 "src/DIESEL/EMD_GP402.PNML" 1
  1550. //graphics definition
  1551. spriteset(spriteset_EMD_GP402, "gfx/diesel/EMD_GP402.png") {
  1552.     template_L7A(0,0)
  1553. }
  1554. spriteset(spriteset_EMD_GP402_depot, "gfx/diesel/EMD_GP402.png") {
  1555.     template_depot_L7(0,0)
  1556. }
  1557. spriteset(spriteset_EMD_GP402_purchase, "gfx/diesel/EMD_GP402.png") {
  1558.     template_purchase_L7(0,0)
  1559. }
  1560.  
  1561. switch(FEAT_TRAINS, SELF, spriteset_EMD_GP402_default, getbits(extra_callback_info1, 0, 8)) {
  1562.     0x10: spriteset_EMD_GP402_depot; // Depot view
  1563.     0x12: spriteset_EMD_GP402_depot; // Vehicle List view
  1564.     spriteset_EMD_GP402; // Default
  1565. }
  1566.  
  1567. // item
  1568. item(FEAT_TRAINS, item_EMD_GP402) {
  1569.     property {
  1570.         name: string(STR_NAME_EMD_GP402);
  1571.         climates_available: ALL_CLIMATES;
  1572.   engine_class: ENGINE_CLASS_DIESEL;
  1573.  
  1574.         introduction_date: date(1972,01,01);
  1575.         model_life: 40;
  1576.         vehicle_life: 30;
  1577.         retire_early: 0;
  1578.  
  1579.         track_type: RAIL;
  1580.  
  1581.         cost_factor: 16;
  1582.   running_cost_factor: 114;
  1583.   running_cost_base: RUNNING_COST_STEAM;
  1584.         refit_cost: 0; // Refitting is free        
  1585.  
  1586.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1587.         length: 7;
  1588.  
  1589.   power: 3000 hp;
  1590.   speed: 120 km/h;
  1591.   weight: 117000 kg;
  1592.   tractive_effort_coefficient: 0.2307; // 365 kN OpenTTD 1.6.1
  1593.  
  1594.   reliability_decay: 0;
  1595.   cargo_age_period: 65535;
  1596.  
  1597.         cargo_capacity: 0;
  1598.  
  1599.   ai_special_flag: AI_FLAG_CARGO;
  1600.  
  1601.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1602.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1603.     }
  1604.  
  1605.     // define graphics and callbacks
  1606.     graphics {
  1607.         default: spriteset_EMD_GP402_default;
  1608.         purchase: spriteset_EMD_GP402_purchase;
  1609.   additional_text: string(STR_TEXT_EMD_GP402);
  1610.     }
  1611. }
  1612. # 56 "NARS_ADDON_SET.pnml" 2
  1613. # 1 "src/DIESEL/EMD_SD452.PNML" 1
  1614. //graphics definition
  1615. spriteset(spriteset_EMD_SD452, "gfx/diesel/EMD_SD452.png") {
  1616.     template_L8A(0,0)
  1617. }
  1618. spriteset(spriteset_EMD_SD452_depot, "gfx/diesel/EMD_SD452.png") {
  1619.     template_depot_L8(0,0)
  1620. }
  1621. spriteset(spriteset_EMD_SD452_purchase, "gfx/diesel/EMD_SD452.png") {
  1622.     template_purchase_L8(0,0)
  1623. }
  1624.  
  1625. switch(FEAT_TRAINS, SELF, spriteset_EMD_SD452_default, getbits(extra_callback_info1, 0, 8)) {
  1626.     0x10: spriteset_EMD_SD452_depot; // Depot view
  1627.     0x12: spriteset_EMD_SD452_depot; // Vehicle List view
  1628.     spriteset_EMD_SD452; // Default
  1629. }
  1630.  
  1631. // item
  1632. item(FEAT_TRAINS, item_EMD_SD452) {
  1633.     property {
  1634.         name: string(STR_NAME_EMD_SD452);
  1635.         climates_available: ALL_CLIMATES;
  1636.   engine_class: ENGINE_CLASS_DIESEL;
  1637.  
  1638.         introduction_date: date(1972,01,01);
  1639.         model_life: 40;
  1640.         vehicle_life: 30;
  1641.         retire_early: 0;
  1642.  
  1643.         track_type: RAIL;
  1644.  
  1645.         cost_factor: 20;
  1646.   running_cost_factor: 139;
  1647.   running_cost_base: RUNNING_COST_STEAM;
  1648.         refit_cost: 0; // Refitting is free        
  1649.  
  1650.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1651.         length: 8;
  1652.  
  1653.   power: 3000 hp;
  1654.   speed: 112 km/h;
  1655.   weight: 172000 kg;
  1656.   tractive_effort_coefficient: 0.225; // 365 kN OpenTTD 1.6.1
  1657.  
  1658.   reliability_decay: 0;
  1659.   cargo_age_period: 65535;
  1660.  
  1661.         cargo_capacity: 0;
  1662.  
  1663.   ai_special_flag: AI_FLAG_CARGO;
  1664.  
  1665.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1666.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1667.     }
  1668.  
  1669.     // define graphics and callbacks
  1670.     graphics {
  1671.         default: spriteset_EMD_SD452_default;
  1672.         purchase: spriteset_EMD_SD452_purchase;
  1673.   additional_text: string(STR_TEXT_EMD_SD452);
  1674.     }
  1675. }
  1676. # 57 "NARS_ADDON_SET.pnml" 2
  1677.  
  1678. // mlw
  1679. # 1 "src/DIESEL/MLW_RS18.PNML" 1
  1680. //graphics definition
  1681. spriteset(spriteset_MLW_RS18, "gfx/diesel/MLW_RS18.png") {
  1682.     template_L7A(0,0)
  1683. }
  1684. spriteset(spriteset_MLW_RS18_depot, "gfx/diesel/MLW_RS18.png") {
  1685.     template_depot_L7(0,0)
  1686. }
  1687. spriteset(spriteset_MLW_RS18_purchase, "gfx/diesel/MLW_RS18.png") {
  1688.     template_purchase_L7(0,0)
  1689. }
  1690.  
  1691. switch(FEAT_TRAINS, SELF, spriteset_MLW_RS18_default, getbits(extra_callback_info1, 0, 8)) {
  1692.     0x10: spriteset_MLW_RS18_depot; // Depot view
  1693.     0x12: spriteset_MLW_RS18_depot; // Vehicle List view
  1694.     spriteset_MLW_RS18; // Default
  1695. }
  1696.  
  1697. // item
  1698. item(FEAT_TRAINS, item_MLW_RS18) {
  1699.     property {
  1700.         name: string(STR_NAME_MLW_RS18);
  1701.         climates_available: ALL_CLIMATES;
  1702.   engine_class: ENGINE_CLASS_DIESEL;
  1703.  
  1704.         introduction_date: date(1972,01,01);
  1705.         model_life: 40;
  1706.         vehicle_life: 30;
  1707.         retire_early: 0;
  1708.  
  1709.         track_type: RAIL;
  1710.  
  1711.         cost_factor: 12;
  1712.   running_cost_factor: 86;
  1713.   running_cost_base: RUNNING_COST_STEAM;
  1714.         refit_cost: 0; // Refitting is free        
  1715.  
  1716.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1717.         length: 7;
  1718.  
  1719.   power: 1800 hp;
  1720.   speed: 120 km/h;
  1721.   weight: 113000 kg;
  1722.   tractive_effort_coefficient: 0.200; // 365 kN OpenTTD 1.6.1
  1723.  
  1724.   reliability_decay: 0;
  1725.   cargo_age_period: 65535;
  1726.  
  1727.         cargo_capacity: 0;
  1728.  
  1729.   ai_special_flag: AI_FLAG_PASSENGER;
  1730.  
  1731.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1732.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
  1733.     }
  1734.  
  1735.     // define graphics and callbacks
  1736.     graphics {
  1737.         default: spriteset_MLW_RS18_default;
  1738.         purchase: spriteset_MLW_RS18_purchase;
  1739.   additional_text: string(STR_TEXT_MLW_RS18);
  1740.     }
  1741. }
  1742. # 60 "NARS_ADDON_SET.pnml" 2
  1743.  
  1744. // TURBINE
  1745. // =============================================================================
  1746.  
  1747.  
  1748.  
  1749. // ELECTRIC
  1750. // =============================================================================
  1751.  
  1752. # 1 "src/ELECTRIC/CNR_Z1A.PNML" 1
  1753. //graphics definition
  1754. spriteset(spriteset_CNR_Z1A, "gfx/electric/CNR_Z1A.png") {
  1755.     template_L6A(0,0)
  1756. }
  1757. spriteset(spriteset_CNR_Z1A_depot, "gfx/electric/CNR_Z1A.png") {
  1758.     template_depot_L6(0,0)
  1759. }
  1760. spriteset(spriteset_CNR_Z1A_purchase, "gfx/electric/CNR_Z1A.png") {
  1761.     template_purchase_L6(0,0)
  1762. }
  1763.  
  1764. switch(FEAT_TRAINS, SELF, spriteset_CNR_Z1A_default, getbits(extra_callback_info1, 0, 8)) {
  1765.     0x10: spriteset_CNR_Z1A_depot; // Depot view
  1766.     0x12: spriteset_CNR_Z1A_depot; // Vehicle List view
  1767.     spriteset_CNR_Z1A; // Default
  1768. }
  1769.  
  1770. // item
  1771. item(FEAT_TRAINS, item_CNR_Z1A) {
  1772.     property {
  1773.         name: string(STR_NAME_CNR_Z1A);
  1774.         climates_available: ALL_CLIMATES;
  1775.   engine_class: ENGINE_CLASS_ELECTRIC;
  1776.  
  1777.         introduction_date: date(1916,01,01);
  1778.         model_life: 40;
  1779.         vehicle_life: 75;
  1780.         retire_early: 0;
  1781.  
  1782.         track_type: ELRL;
  1783.  
  1784.         cost_factor: 12;
  1785.   running_cost_factor: 86;
  1786.   running_cost_base: RUNNING_COST_STEAM;
  1787.         refit_cost: 0; // Refitting is free        
  1788.  
  1789.         sprite_id: SPRITE_ID_NEW_TRAIN; //enable new graphics
  1790.         length: 7;
  1791.  
  1792.   power: 1100 hp;
  1793.   speed: 120 km/h;
  1794.   weight: 71000 kg;
  1795.   tractive_effort_coefficient: 0.150; // 365 kN OpenTTD 1.6.1
  1796.  
  1797.   reliability_decay: 0;
  1798.   cargo_age_period: 65535;
  1799.  
  1800.         cargo_capacity: 0;
  1801.  
  1802.   ai_special_flag: AI_FLAG_PASSENGER;
  1803.  
  1804.         misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_FLIP);
  1805.         visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
  1806.     }
  1807.  
  1808.     // define graphics and callbacks
  1809.     graphics {
  1810.         default: spriteset_CNR_Z1A_default;
  1811.         purchase: spriteset_CNR_Z1A_purchase;
  1812.   additional_text: string(STR_TEXT_CNR_Z1A);
  1813.     }
  1814. }
  1815. # 70 "NARS_ADDON_SET.pnml" 2
  1816.  
  1817. // =============================================================================
  1818. // =============================================================================
  1819.  
  1820. # 1 "src/vehicleSort.pnml" 1
  1821. // Steam
  1822. // =========================================================
  1823.  
  1824. // Diesel
  1825. // =========================================================
  1826.  
  1827. sort(FEAT_TRAINS, [item_EMD_E7]); // 1945
  1828. sort(FEAT_TRAINS, [item_EMD_E8]); // 1949
  1829. sort(FEAT_TRAINS, [item_EMD_E9]); // 1954
  1830. sort(FEAT_TRAINS, [item_EMD_FP45]); // 1967
  1831. sort(FEAT_TRAINS, [item_EMD_F40C]); // 1973
  1832. sort(FEAT_TRAINS, [item_EMD_F40PH2D]); // 2007
  1833. sort(FEAT_TRAINS, [item_EMD_GP402P]); // 1974
  1834.  
  1835. sort(FEAT_TRAINS, [item_FM_ERIEBUILT]); // 1945
  1836.  
  1837. sort(FEAT_TRAINS, [item_GE_U30CG]); // 1967
  1838.  
  1839. sort(FEAT_TRAINS, [item_MLW_FPA4]); // 1958
  1840.  
  1841. // ...
  1842.  
  1843. sort(FEAT_TRAINS, [item_EMD_F3]); // 1945
  1844. sort(FEAT_TRAINS, [item_EMD_F7]); // 1949
  1845. sort(FEAT_TRAINS, [item_EMD_F9]); // 1953
  1846. sort(FEAT_TRAINS, [item_EMD_F45]); // 1968
  1847. sort(FEAT_TRAINS, [item_EMD_GP9U]); // 1990
  1848. sort(FEAT_TRAINS, [item_EMD_GP30]); // 1961
  1849. sort(FEAT_TRAINS, [item_EMD_GP35]); // 1963
  1850. sort(FEAT_TRAINS, [item_EMD_GP40]); // 1965
  1851. sort(FEAT_TRAINS, [item_EMD_GP402]); // 1972
  1852. sort(FEAT_TRAINS, [item_EMD_SD452]); // 1972
  1853.  
  1854. sort(FEAT_TRAINS, [item_MLW_RS18]); // 1956
  1855.  
  1856. // TURBINE
  1857. // =========================================================
  1858.  
  1859. // ELECTRIC
  1860. // =========================================================
  1861.  
  1862. sort(FEAT_TRAINS, [item_CNR_Z1A]); // 1916
  1863. # 74 "NARS_ADDON_SET.pnml" 2

Comments