mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
3 Commits
486f498df9
...
dade5996cf
Author | SHA1 | Date |
---|---|---|
|
dade5996cf | |
|
c69fc76395 | |
|
c229823550 |
|
@ -595,12 +595,16 @@ bool CanDeleteHouse(TileIndex tile)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The house might be placed by a player or protected by the GRF house flag. */
|
||||||
|
if (IsHouseProtected(tile)) return false;
|
||||||
|
|
||||||
|
/* Check the callback result, if the house uses it. */
|
||||||
if (hs->callback_mask.Test(HouseCallbackMask::DenyDestruction)) {
|
if (hs->callback_mask.Test(HouseCallbackMask::DenyDestruction)) {
|
||||||
uint16_t callback_res = GetHouseCallback(CBID_HOUSE_DENY_DESTRUCTION, 0, 0, GetHouseType(tile), Town::GetByTile(tile), tile);
|
uint16_t callback_res = GetHouseCallback(CBID_HOUSE_DENY_DESTRUCTION, 0, 0, GetHouseType(tile), Town::GetByTile(tile), tile);
|
||||||
return (callback_res == CALLBACK_FAILED || !ConvertBooleanCallback(hs->grf_prop.grffile, CBID_HOUSE_DENY_DESTRUCTION, callback_res));
|
return (callback_res == CALLBACK_FAILED || !ConvertBooleanCallback(hs->grf_prop.grffile, CBID_HOUSE_DENY_DESTRUCTION, callback_res));
|
||||||
} else {
|
|
||||||
return !IsHouseProtected(tile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -184,7 +184,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Bridge offset
|
* Bridge offset
|
||||||
*/
|
*/
|
||||||
SpriteID bridge_offset;
|
uint8_t bridge_offset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Original railtype number to use when drawing non-newgrf railtypes, or when drawing stations.
|
* Original railtype number to use when drawing non-newgrf railtypes, or when drawing stations.
|
||||||
|
|
Loading…
Reference in New Issue