|
| 1 | +/* |
| 2 | +A simple articulated tram, graphics from OpenGFX+rv |
| 3 | +Code is modified in some places for testing reasons. |
| 4 | +*/ |
| 5 | + |
| 6 | +grf { |
| 7 | + grfid: "NML\41"; |
| 8 | + name: string(STR_REGRESSION_NAME); |
| 9 | + desc: string(STR_REGRESSION_DESC); |
| 10 | + version: 0; |
| 11 | + min_compatible_version: 0; |
| 12 | +} |
| 13 | + |
| 14 | +template tmpl_tram(x, y) { |
| 15 | + [ x, y, 8, 18, -3, -10] |
| 16 | + [ 16 + x, y, 20, 18, -14, -5] |
| 17 | + [ 48 + x, y, 28, 15, -14, -8] |
| 18 | + [ 96 + x, y, 20, 18, -6, -7] |
| 19 | + [128 + x, y, 8, 18, -3, -10] |
| 20 | + [144 + x, y, 20, 18, -14, -9] |
| 21 | + [176 + x, y, 28, 15, -14, -8] |
| 22 | + [224 + x, y, 20, 18, -6, -7] |
| 23 | +} |
| 24 | +spriteset(foster_express_set, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "tram_foster_express.32.png") { |
| 25 | + tmpl_tram(48,1) |
| 26 | +} |
| 27 | + |
| 28 | +switch(FEAT_ROADVEHS, SELF, foster_express_articulated_parts, extra_callback_info1) { |
| 29 | + 1..3: return foster_express_tram; |
| 30 | + return 0xFF; |
| 31 | +} |
| 32 | + |
| 33 | + |
| 34 | +item(FEAT_ROADVEHS, foster_express_tram, 88) { |
| 35 | + property { |
| 36 | + name: string(STR_NAME_FOSTER_TURBO_TRAM); |
| 37 | + climates_available: ALL_CLIMATES; |
| 38 | + model_life: 40; // years |
| 39 | + vehicle_life: 30; // years |
| 40 | + introduction_date: date(1965,1,1); |
| 41 | + reliability_decay: 1; |
| 42 | + running_cost_base: RUNNING_COST_ROADVEH; // Default road vehicle running cost base |
| 43 | + running_cost_factor: 135; |
| 44 | + cost_factor: 143; |
| 45 | + speed: 317 mph; |
| 46 | + power: 220 hp; |
| 47 | + weight: 22 ton; |
| 48 | + sprite_id: SPRITE_ID_NEW_ROADVEH; // We have our own sprites |
| 49 | + loading_speed: 16; // loading speed |
| 50 | + tractive_effort_coefficient: 0.3; |
| 51 | + air_drag_coefficient: 0.5; |
| 52 | + cargo_capacity: 45; // passengers |
| 53 | + refittable_cargo_classes: bitmask(CC_PASSENGERS); // Allow passengers (and tourists) |
| 54 | + non_refittable_cargo_classes: NO_CARGO_CLASS; // Disallow other cargos |
| 55 | + cargo_allow_refit: []; |
| 56 | + default_cargo_type: DEFAULT_CARGO_FIRST_REFITTABLE; |
| 57 | + misc_flags: bitmask(ROADVEH_FLAG_TRAM); // This is a tram |
| 58 | + } |
| 59 | + graphics { |
| 60 | + articulated_part: foster_express_articulated_parts; |
| 61 | + foster_express_set; |
| 62 | + } |
| 63 | +} |
0 commit comments