mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-15 08:35:11 +01:00
This commit is contained in:
parent
70d33dc71f
commit
93b711d70d
@ -328,6 +328,8 @@ CommandCost CmdBuildObject(DoCommandFlag flags, TileIndex tile, ObjectType type,
|
|||||||
case OBJECT_HQ: {
|
case OBJECT_HQ: {
|
||||||
Company *c = Company::Get(_current_company);
|
Company *c = Company::Get(_current_company);
|
||||||
if (c->location_of_HQ != INVALID_TILE) {
|
if (c->location_of_HQ != INVALID_TILE) {
|
||||||
|
/* Don't relocate HQ on the same location. */
|
||||||
|
if (c->location_of_HQ == tile) return_cmd_error(STR_ERROR_ALREADY_BUILT);
|
||||||
/* We need to persuade a bit harder to remove the old HQ. */
|
/* We need to persuade a bit harder to remove the old HQ. */
|
||||||
_current_company = OWNER_WATER;
|
_current_company = OWNER_WATER;
|
||||||
cost.AddCost(ClearTile_Object(c->location_of_HQ, flags));
|
cost.AddCost(ClearTile_Object(c->location_of_HQ, flags));
|
||||||
|
Loading…
Reference in New Issue
Block a user