NML:Badges
From GRFSpecs
Jump to navigationJump to searchVehicles, Stations, Roadstops, Canals, Towns, Houses, Industries (Tiles), Cargos, Airports+Tiles, Objects, Railtypes, Roadtypes, Tramtypes, Bridges, Badges, Terrain
- common props | vars | CBs
- train | roadveh | ship | aircr props
- common variables
- industry props | vars | CBs
- tile props | vars | CBs
- airport props | vars | CBs
- tile props | vars | CBs
item (FEAT_BADGES, item_name) { ... }
Badge properties
| property | value range | comment |
|---|---|---|
| label | string with / as delimiter
|
Badges with label without / are considered to be classes.
Labels for other badges should match following syntax:
|
| name | string | Name of this badge or badge class. |
Badge variables
| name | value range | comment |
|---|
Badge callbacks
| callback | return value | comment |
|---|---|---|
| default | spriteset | Graphics for the badge or badge class. |
Example code
item (FEAT_BADGES, power) {
property {
label: "power";
name: string(STR_POWER);
}
}
item (FEAT_BADGES, diesel) {
property {
label: "power/diesel";
name: string(STR_POWER_DIESEL);
}
}
item (FEAT_BADGES, steam) {
property {
label: "power/steam";
name: string(STR_POWER_STEAM);
}
graphics {
default: sprite_steam;
}
}