File: 038_optimised_scope.nml

package info (click to toggle)
nml 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,932 kB
  • sloc: python: 20,457; ansic: 109; makefile: 68
file content (55 lines) | stat: -rw-r--r-- 1,486 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
grf {
    grfid: "NML\38";
    name: string(STR_REGRESSION_NAME);
    desc: string(STR_REGRESSION_DESC);
    version: 0;
    min_compatible_version: 0;
}

switch (FEAT_TRAINS, SELF, color_conditional, vehicle_is_flipped) {
    1: return base_sprite_2cc + 16 * company_colour1 + company_colour2;
    return base_sprite_2cc + 16 * company_colour2 + company_colour1;
}

switch (FEAT_TRAINS, SELF, color_unconditional, 0) {
    1: return base_sprite_2cc + 16 * company_colour1 + company_colour2;
    return base_sprite_2cc + 16 * company_colour2 + company_colour1;
}

switch (FEAT_TRAINS, SELF, color_indirect1, 1) {
    1: return color_conditional;
    return color_unconditional;
}

switch (FEAT_TRAINS, SELF, color_indirect0, 0) {
    1: return color_conditional;
    return color_unconditional;
}

switch (FEAT_TRAINS, SELF, color_indirect, 0) {
    1: return color_indirect1;
    return color_indirect0;
}

switch (FEAT_TRAINS, PARENT, color_override, vehicle_type_id) {
    3000: return color_conditional;
    return color_indirect;
}

switch (FEAT_TRAINS, PARENT, text, 0) {
    return string(STR_REGRESSION_DESC);
}

switch (FEAT_TRAINS, SELF, scope_capacity, cap, cargo_capacity + cap) { return; }

switch (FEAT_TRAINS, PARENT, mixed_scope_capacity, 0) {
    return scope_capacity(cargo_capacity);
}

item(FEAT_TRAINS, colored_train, 100) {
    graphics {
        colour_mapping: color_override;
        cargo_capacity: mixed_scope_capacity;
        additional_text: text;
    }
}