Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // all station sprite sets are put in one single action1 set
- spriteset (ground_tile, "") {
- []
- }
- spriteset (cargo_pile, "") {
- [] //empty
- [] //small pile of coal
- [] //larger pile of coal
- [] //very large pile
- }
- // I'm not sure about the extent to which passing parameters is already possible
- spritelayout my_layout(amount) {
- ground {
- sprite: ground_tile;
- }
- building {
- sprite: cargo_pile(amount)
- }
- }
- switch(FEAT_STATIONS, SELF, coal_pile_amount, cargo_amount(COAL)) {
- 0.. 50: my_layout(0);
- 50.. 150: my_layout(1);
- 150 .. 300: my_layout(2);
- my_layout(3);
- }
- switch(FEAT_STATIONS, SELF, coal_pile_cb, current_callback) {
- 0x14: coal_pile_amount;
- CB_FAILED:
- }
- item(FEAT_STATIONS, coal_pile, 0) {
- property {
- class: "NML\0";
- //when defining the class, layouts are automatically added as well
- }
- graphics {
- //no cargo stuff here, do that via varaction2
- //automatically add a varaction2 that checks for CB 0 and branches to the action1/2 containing all sprites
- //i.e. 1 single action1/realaction2 per grf
- coal_pile_cb;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement