(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.
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user