|
|
|
@ -382,7 +382,7 @@ static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh)
|
|
|
|
|
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
|
|
|
|
|
const IndustryTileSpec *indts = GetIndustryTileSpec(gfx);
|
|
|
|
|
if (indts->grf_prop.spritegroup != NULL && HasBit(indts->callback_mask, CBM_INDT_DRAW_FOUNDATIONS)) {
|
|
|
|
|
uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
|
|
|
|
uint32 callback_res = GetIndustryTileCallback(CBID_INDTILE_DRAW_FOUNDATIONS, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
|
|
|
|
if (callback_res == 0) return FOUNDATION_NONE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2488,7 +2488,7 @@ static CommandCost TerraformTile_Industry(TileIndex tile, DoCommandFlag flags, u
|
|
|
|
|
/* Call callback 3C 'disable autosloping for industry tiles'. */
|
|
|
|
|
if (HasBit(itspec->callback_mask, CBM_INDT_AUTOSLOPE)) {
|
|
|
|
|
/* If the callback fails, allow autoslope. */
|
|
|
|
|
uint16 res = GetIndustryTileCallback(CBID_INDUSTRY_AUTOSLOPE, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
|
|
|
|
uint16 res = GetIndustryTileCallback(CBID_INDTILE_AUTOSLOPE, 0, 0, gfx, Industry::GetByTile(tile), tile);
|
|
|
|
|
if ((res == 0) || (res == CALLBACK_FAILED)) return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]);
|
|
|
|
|
} else {
|
|
|
|
|
/* allow autoslope */
|
|
|
|
|