Mercurial > hg > openttd
changeset 18148:05d04f57cce3 draft
(svn r22973) -Add: support for replacing the buoy via action123
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 02 Oct 2011 20:26:43 +0000 |
parents | b8ef15f0b232 |
children | cc35a0c0be5a |
files | src/newgrf.h src/station_cmd.cpp |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf.h +++ b/src/newgrf.h @@ -28,6 +28,8 @@ CF_DOCKS, CF_RIVER_SLOPE, CF_RIVER_EDGE, + CF_RIVER_GUI, + CF_BUOY, CF_END, };
--- 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 @@ } } - 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 {