Advertisement
Guest User

Untitled

a guest
Aug 19th, 2011
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1. /*************************************************************
  2. * Train based on Ghost of Mars passenger train.
  3. *************************************************************/
  4. // (x,y, offx,offy, offux,offuy, offurx,offury, offrx,offry, offdrx,offdry, offdx,offdy, offdlx,offdly, offlx,offly, offulx,offuly)
  5. // + right, down
  6. // - left, up
  7. spriteset (set_train_giger_engine, "src/gfx/giger.png") { tmpl_vehicle_basic(0,0,
  8. 0,0, // ALL
  9. 1,-4, // U Set
  10. -1,-1, // UR Set
  11. 0,-2, // R Set
  12. 7,1, // DR Set
  13. 1,-4, // D Set
  14. -4,0, // DL Set
  15. 0,-2, // L Set
  16. 5,0 // UL Set
  17. ) }
  18. spriteset (set_train_giger_purchase, "src/gfx/giger.png") { tmpl_vehicle_purchase(0,0, 0,0) }
  19.  
  20. /*
  21. switch(FEAT_TRAINS, SELF, sw_giger_can_attach_wagon, vehicle_type_id) {
  22. train_giger: return CB_RESULT_ATTACH_ALLOW;
  23. return string(STR_TRAIN_giger_CANNOT_ATTACH_OTHER);
  24. }
  25. */
  26.  
  27. item(FEAT_TRAINS, train_giger) {
  28. /* Define properties first, make sure to set all of them */
  29. property {
  30. name: string(STR_TRAIN_GIGER_NAME);
  31. climates_available: bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL); // not available in toyland
  32. introduction_date: date(1979, 5, 25);
  33. model_life: VEHICLE_NEVER_EXPIRES;
  34. vehicle_life: 30;
  35. reliability_decay: 20;
  36. refittable_cargo_classes: bitmask();
  37. non_refittable_cargo_classes: bitmask();
  38. refittable_cargo_types: bitmask(); // refitting is done via cargo classes only, no cargoes need explicit enabling/disabling
  39. loading_speed: 6; // It's an intercity train, loading is relatively slow
  40. cost_factor: 90; // About $234K
  41. running_cost_factor: 100; // Changed by callback
  42. // cargo_age_period: 185; // default value
  43. sprite_id: SPRITE_ID_NEW_TRAIN;
  44. speed: 176 km/h;
  45. misc_flags: bitmask(TRAIN_FLAG_2CC);
  46. refit_cost: 0;
  47. // callback flags are not set manually
  48. track_type: RAIL; // from rail type table
  49. ai_special_flag: AI_FLAG_CARGO;
  50. power: 10400 hp; // Changed by CB
  51. running_cost_base: RUNNING_COST_DIESEL;
  52. dual_headed: 0;
  53. cargo_capacity: 0;
  54. weight: 67 ton; // Total weight, changed by callback
  55. ai_engine_rank: 0; // not intended to be used by the ai
  56. engine_class: ENGINE_CLASS_DIESEL;
  57. extra_power_per_wagon: 0 kW;
  58. tractive_effort_coefficient: 0.1; // Changed by callback
  59. air_drag_coefficient: 0.05;
  60. shorten_vehicle: SHORTEN_TO_8_8;
  61. /* Overridden by callback to disable for non-powered wagons */
  62. visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_STEAM, 0, DISABLE_WAGON_POWER);
  63. extra_weight_per_wagon: 0 ton;
  64. bitmask_vehicle_info: 0;
  65. }
  66. /* Define graphics and callbacks
  67. * Setting all callbacks is not needed, only define what is used */
  68. graphics {
  69. default: set_train_giger_engine;
  70. purchase: set_train_giger_purchase;
  71. additional_text: return string(STR_TRAIN_GIGER_TEXT);
  72. // articulated_part: sw_giger_articulated_part;
  73. running_cost_factor: 100;
  74. // can_attach_wagon: sw_giger_can_attach_wagon;
  75. purchase_running_cost_factor: 100;
  76. /* Capacity is per part */
  77. cargo_capacity: return 0;
  78. purchase_cargo_capacity: return 0;
  79. visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_STEAM, 0, DISABLE_WAGON_POWER);
  80. shorten_vehicle: SHORTEN_TO_8_8;
  81. /* Only the front vehicle has power */
  82. purchase_power: return 10400;
  83. power: return 10400;
  84. /* Only the front vehicle has weight */
  85. purchase_weight: return 67; //tons
  86. weight: return 67;
  87. /* Only the front vehicle has TE */
  88. purchase_tractive_effort_coefficient: return int(0.3 * 255 / 4);
  89. tractive_effort_coefficient: return int(0.3 * 255 / 4);
  90.  
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement