Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright (C) 2013 Jussi Virtanen
- * This file is part of Finnish Trainset
- * 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.
- * 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.
- * 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.
- */
- //Sound effects
- switch (FEAT_TRAINS, SELF, switch_DMU_DM7_sound_checkdepot, vehicle_is_in_depot) {
- 0: return sound("sfx/dm7_idle.wav");
- }
- switch (FEAT_TRAINS, SELF, sound_DMU_DM7, extra_callback_info1) {
- 1: return sound("sfx/dm7_acc.wav");
- 7: return sound("sfx/dm7_run.wav");
- 8: return switch_DMU_DM7_sound_checkdepot;
- }
- //purchase menus
- spriteset (spriteset_DMU_DM7_purchase, "gfx/dmu/dmu_dm7.png") { template_purchase(0) }
- spriteset (spriteset_DMU_DM7_default, "gfx/dmu/dmu_dm7.png") { template_7_8(0) }
- switch (FEAT_TRAINS, SELF, switch_DMU_DM7_speed, cargo_subtype) {
- 1: return 115;
- return 95;
- }
- switch (FEAT_TRAINS, SELF, switch_DMU_DM7_subtypetext_pre1960, cargo_subtype) {
- return string(STR_SUBTYPE_DEFAULT, "");
- }
- switch (FEAT_TRAINS, SELF, switch_DMU_DM7_subtypetext_post1960, cargo_subtype) {
- 1: return string(STR_SUBTYPE_DEFAULT, string(STR_SUBTYPE_DM7_REGEAR));
- return string(STR_SUBTYPE_DEFAULT, "");
- }
- switch (FEAT_TRAINS, SELF, switch_DMU_DM7_subtypetext_yearcheck, current_year) {
- 0..1959: return switch_DMU_DM7_subtypetext_pre1960;
- return switch_DMU_DM7_subtypetext_post1960;
- }
- switch(FEAT_TRAINS, SELF, switch_DMU_DM7_can_attach_wagon, vehicle_type_id) {
- item_CO_EFIAB: return CB_RESULT_ATTACH_ALLOW;
- item_CO_FPOAB: return CB_RESULT_ATTACH_ALLOW;
- item_CO_GEOAB: return CB_RESULT_ATTACH_ALLOW;
- item_DMU_DM7: return CB_RESULT_ATTACH_ALLOW;
- item_DMU_DMG7: return CB_RESULT_ATTACH_ALLOW;
- return string(STR_DM7_CANNOT_ATTACH_OTHER);
- }
- switch(FEAT_TRAINS, SELF, switch_DMU_DM7_can_attach_engine, vehicle_type_id) {
- item_DMU_DM7: return CB_RESULT_ATTACH_ALLOW;
- item_DMU_DMG7: return CB_RESULT_ATTACH_ALLOW;
- return string(STR_DM7_MORE_ENGINES);
- }
- //engine needs to be always attachable
- switch(FEAT_TRAINS, PARENT, switch_DMU_DM7_check_engine_count, ((num_vehs_in_vehid_chain * 2 - 2) > num_vehs_in_consist)) {
- 1: return switch_DMU_DM7_can_attach_wagon;
- return switch_DMU_DM7_can_attach_engine;
- }
- item (FEAT_TRAINS, item_DMU_DM7) {
- property {
- //common properties
- name: string(STR_NAME_DMU_DM7);
- climates_available: ALL_CLIMATES;
- introduction_date: date(1955,01,01);
- model_life: 35;
- vehicle_life: 35;
- reliability_decay: 20;
- //refittable_cargo_classes: 0;
- //non_refittable_cargo_classes: 0;
- cargo_allow_refit: [PASS];
- loading_speed: 10;
- cost_factor: 30;
- running_cost_factor: 40;
- cargo_age_period: 185;
- //train properties
- sprite_id: SPRITE_ID_NEW_TRAIN;
- speed: 95 km/h;
- misc_flags: 0;
- refit_cost: 0;
- track_type: RAIL;
- ai_special_flag: 0;
- power: 180 hpM;
- running_cost_base: RUNNING_COST_DIESEL;
- dual_headed: 0;
- default_cargo_type: PASS;
- cargo_capacity: 64;
- weight: 18 ton;
- engine_class: ENGINE_CLASS_DIESEL;
- extra_power_per_wagon: 0;
- tractive_effort_coefficient: 0.396;
- air_drag_coefficient: 0;
- length: 7;
- visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 0, DISABLE_WAGON_POWER);
- bitmask_vehicle_info: 0;
- }
- graphics {
- // additional_text: return string(STR_PURCHASE_SERVICE, string(STR_PURCHASE_SERVICE_HF));
- cargo_capacity: 64;
- cargo_subtype_text: switch_DMU_DM7_subtypetext_yearcheck;
- can_attach_wagon: switch_DMU_DM7_check_engine_count;
- speed: switch_DMU_DM7_speed;
- sound_effect: sound_DMU_DM7;
- purchase: spriteset_DMU_DM7_purchase;
- default: spriteset_DMU_DM7_default;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement