1
0
Fork 0

Fix e114ed357d: Incorrect test of object flags allowed HQ to be removed. (#14062)

pull/14060/head
Peter Nelson 2025-04-21 15:45:29 +01:00 committed by GitHub
parent 305c892b3a
commit e1fdc10227
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -571,7 +571,7 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlags flags)
} else if (CheckTileOwnership(tile).Failed()) { } else if (CheckTileOwnership(tile).Failed()) {
/* We don't own it!. */ /* We don't own it!. */
return CommandCost(STR_ERROR_OWNED_BY); return CommandCost(STR_ERROR_OWNED_BY);
} else if (spec->flags.All({ObjectFlag::CannotRemove, ObjectFlag::Autoremove})) { } else if (spec->flags.Test(ObjectFlag::CannotRemove) && !spec->flags.Test(ObjectFlag::Autoremove)) {
/* In the game editor or with cheats we can remove, otherwise we can't. */ /* In the game editor or with cheats we can remove, otherwise we can't. */
if (!_cheats.magic_bulldozer.value) { if (!_cheats.magic_bulldozer.value) {
if (type == OBJECT_HQ) return CommandCost(STR_ERROR_COMPANY_HEADQUARTERS_IN); if (type == OBJECT_HQ) return CommandCost(STR_ERROR_COMPANY_HEADQUARTERS_IN);