diff options
author | rubidium <rubidium@openttd.org> | 2011-10-02 20:26:43 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-10-02 20:26:43 +0000 |
commit | 1842622d818ce6b1ac881572a7ef36a68fa5aff7 (patch) | |
tree | f964499457832ce1959127f025b7ec3510a46ab9 | |
parent | 10fe88ba26d8f09f0faaf9cc12c7b773054bcc4a (diff) | |
download | openttd-1842622d818ce6b1ac881572a7ef36a68fa5aff7.tar.xz |
(svn r22973) -Add: support for replacing the buoy via action123
-rw-r--r-- | src/newgrf.h | 2 | ||||
-rw-r--r-- | src/station_cmd.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/newgrf.h b/src/newgrf.h index 92f8994a5..c19b41132 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -28,6 +28,8 @@ enum CanalFeature { CF_DOCKS, CF_RIVER_SLOPE, CF_RIVER_EDGE, + CF_RIVER_GUI, + CF_BUOY, CF_END, }; diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 5f140365b..18afebe7d 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -23,6 +23,7 @@ #include "newgrf_cargo.h" #include "newgrf_debug.h" #include "newgrf_station.h" +#include "newgrf_canal.h" /* For the buoy */ #include "pathfinder/yapf/yapf_cache.h" #include "road_internal.h" /* For drawing catenary/checking road removal */ #include "autoslope.h" @@ -2669,7 +2670,11 @@ draw_default_foundation: } } - if (IsBuoy(ti->tile) || IsDock(ti->tile) || (IsOilRig(ti->tile) && IsTileOnWater(ti->tile))) { + if (IsBuoy(ti->tile)) { + DrawWaterClassGround(ti); + SpriteID sprite = GetCanalSprite(CF_BUOY, ti->tile); + if (sprite != 0) total_offset = sprite - SPR_IMG_BUOY; + } else if (IsDock(ti->tile) || (IsOilRig(ti->tile) && IsTileOnWater(ti->tile))) { if (ti->tileh == SLOPE_FLAT) { DrawWaterClassGround(ti); } else { |