diff options
author | frosch <frosch@openttd.org> | 2010-05-01 13:09:49 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-05-01 13:09:49 +0000 |
commit | 910aade284ef2b3212663c81f4e15e77b1c7120d (patch) | |
tree | 1975bbb8eeb58de9cd174667fc7f7654eee89d10 /src/newgrf_industrytiles.cpp | |
parent | 77953032274c3bb49c8b22ff7a2767412586c5a7 (diff) | |
download | openttd-910aade284ef2b3212663c81f4e15e77b1c7120d.tar.xz |
(svn r19744) -Add [FS#3477]: [NewGRF] Access to random bits of houses and industries from construction callbacks 17, 28 and 2F. That is: The randombits the house/industry will start with, if construction succeeds.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 232343924..c29823855 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -257,15 +257,17 @@ extern bool IsSlopeRefused(Slope current, Slope refused); * @param type Industry type. * @param gfx Gfx of the tile. * @param itspec_index Layout. + * @param initial_random_bits Random bits of industry after construction * @return Suceeded or failed command. */ -CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index) +CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index, uint16 initial_random_bits) { Industry ind; ind.index = INVALID_INDUSTRY; ind.location.tile = ind_base_tile; ind.location.w = 0; ind.type = type; + ind.random = initial_random_bits; uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_SHAPE_CHECK, 0, itspec_index, gfx, &ind, ind_tile); if (callback_res == CALLBACK_FAILED) { |