Loading

station_layouts_example.n

  1. spriteset(lowered_platforms) {
  2.   [-31, 0, "graphics/lowered_x.png"]
  3.   [-31, 0, "graphics/lowered_y.png"]
  4. }
  5.  
  6. spriteset(raised_platforms) {
  7.   [-31, 0, "graphics/raised_x.png"]
  8.   [-31, 0, "graphics/raised_y.png"]
  9. }
  10.  
  11. spriteset(buildings) {
  12.   [-31, 0, "graphics/building0.png"]
  13. }
  14.  
  15. //# Station with one lowered, one raised platform
  16. spritelayout(station_layout) {
  17.   ground { sprite: GROUNDSPRITE_RAIL; }
  18.   building {
  19.     sprite: lowered_platform(0);
  20.     yextent: 4;
  21.   }
  22.   building {
  23.     sprite: raised_platform(0);
  24.     yoffsets: 12;
  25.     yextent: 4;
  26.   }
  27. }
  28.  
  29. //# Station with two raised platforms, building on one
  30. spritelayout(station_building_layout) {
  31.   ground { sprite: GROUNDSPRITE_RAIL; }
  32.   building {
  33.     sprite: raised(0);
  34.     yextent: 4;
  35.   }
  36.   childsprite {
  37.     sprite: buildings(0);
  38.     orientation_offset: 0
  39.   }
  40.   building {
  41.     sprite: raised(0);
  42.     yoffset: 12;
  43.     yextent: 4;
  44.   }
  45. }
  46.  
  47. switch(layout_switch, ...) {
  48.   1..19: station_building_layout;
  49.   station_layout;
  50. }
  51.  
  52. item(FEAT_STATIONS, platform) {
  53.   property {
  54.     station_class: "ELY_"
  55.   }
  56.   graphics {
  57.     layout_switch;
  58.   }
  59. }

Comments