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
|
grf {
grfid: "NML\19";
name: string(STR_REGRESSION_NAME);
desc: string(STR_REGRESSION_DESC);
version: 0;
min_compatible_version: 0;
}
switch(FEAT_INDUSTRIES, SELF, return_switch, STORE_PERM(current_year - 1950, 0x01)) {
return 0;
}
/* store a value of 4 into the permanent register 0x00, but evaluate current_month
* use the array notation
*/
switch(FEAT_INDUSTRIES, SELF, coal_mine_subtype_switch, [STORE_PERM(4, 0x00), current_month]) {
0..10: return string(STR_COALMINE_MONTH_0_10);
13: return_switch; // unreachable
return string(STR_COALMINE_MONTH_11);
}
item(FEAT_INDUSTRIES, coal_mine) {
property {
substitute: INDUSTRYTYPE_COAL_MINE;
override: INDUSTRYTYPE_COAL_MINE;
}
graphics {
extra_text_industry: return string(STR_COALMINE_EXTRA_TEXT);
cargo_subtype_display: coal_mine_subtype_switch;
control_special: return extra_callback_info1 & 1; // random with 50% chance
// no default
}
}
|