Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*************************************************************
- * Train based on Ghost of Mars passenger train.
- *************************************************************/
- // (x,y, offx,offy, offux,offuy, offurx,offury, offrx,offry, offdrx,offdry, offdx,offdy, offdlx,offdly, offlx,offly, offulx,offuly)
- // + right, down
- // - left, up
- spriteset (set_train_giger_engine, "src/gfx/giger.png") { tmpl_vehicle_basic(0,0,
- 0,0, // ALL
- 1,-4, // U Set
- -1,-1, // UR Set
- 0,-2, // R Set
- 7,1, // DR Set
- 1,-4, // D Set
- -4,0, // DL Set
- 0,-2, // L Set
- 5,0 // UL Set
- ) }
- spriteset (set_train_giger_purchase, "src/gfx/giger.png") { tmpl_vehicle_purchase(0,0, 0,0) }
- /*
- switch(FEAT_TRAINS, SELF, sw_giger_can_attach_wagon, vehicle_type_id) {
- train_giger: return CB_RESULT_ATTACH_ALLOW;
- return string(STR_TRAIN_giger_CANNOT_ATTACH_OTHER);
- }
- */
- item(FEAT_TRAINS, train_giger) {
- /* Define properties first, make sure to set all of them */
- property {
- name: string(STR_TRAIN_GIGER_NAME);
- climates_available: bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL); // not available in toyland
- introduction_date: date(1979, 5, 25);
- model_life: VEHICLE_NEVER_EXPIRES;
- vehicle_life: 30;
- reliability_decay: 20;
- refittable_cargo_classes: bitmask();
- non_refittable_cargo_classes: bitmask();
- refittable_cargo_types: bitmask(); // refitting is done via cargo classes only, no cargoes need explicit enabling/disabling
- loading_speed: 6; // It's an intercity train, loading is relatively slow
- cost_factor: 90; // About $234K
- running_cost_factor: 100; // Changed by callback
- // cargo_age_period: 185; // default value
- sprite_id: SPRITE_ID_NEW_TRAIN;
- speed: 176 km/h;
- misc_flags: bitmask(TRAIN_FLAG_2CC);
- refit_cost: 0;
- // callback flags are not set manually
- track_type: RAIL; // from rail type table
- ai_special_flag: AI_FLAG_CARGO;
- power: 10400 hp; // Changed by CB
- running_cost_base: RUNNING_COST_DIESEL;
- dual_headed: 0;
- cargo_capacity: 0;
- weight: 67 ton; // Total weight, changed by callback
- ai_engine_rank: 0; // not intended to be used by the ai
- engine_class: ENGINE_CLASS_DIESEL;
- extra_power_per_wagon: 0 kW;
- tractive_effort_coefficient: 0.1; // Changed by callback
- air_drag_coefficient: 0.05;
- shorten_vehicle: SHORTEN_TO_8_8;
- /* Overridden by callback to disable for non-powered wagons */
- visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_STEAM, 0, DISABLE_WAGON_POWER);
- extra_weight_per_wagon: 0 ton;
- bitmask_vehicle_info: 0;
- }
- /* Define graphics and callbacks
- * Setting all callbacks is not needed, only define what is used */
- graphics {
- default: set_train_giger_engine;
- purchase: set_train_giger_purchase;
- additional_text: return string(STR_TRAIN_GIGER_TEXT);
- // articulated_part: sw_giger_articulated_part;
- running_cost_factor: 100;
- // can_attach_wagon: sw_giger_can_attach_wagon;
- purchase_running_cost_factor: 100;
- /* Capacity is per part */
- cargo_capacity: return 0;
- purchase_cargo_capacity: return 0;
- visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_STEAM, 0, DISABLE_WAGON_POWER);
- shorten_vehicle: SHORTEN_TO_8_8;
- /* Only the front vehicle has power */
- purchase_power: return 10400;
- power: return 10400;
- /* Only the front vehicle has weight */
- purchase_weight: return 67; //tons
- weight: return 67;
- /* Only the front vehicle has TE */
- purchase_tractive_effort_coefficient: return int(0.3 * 255 / 4);
- tractive_effort_coefficient: return int(0.3 * 255 / 4);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement