Update to 12.0-RC1

This commit is contained in:
dP
2021-09-26 20:30:12 +03:00
parent c9765f712f
commit 4eb8b29dbf
173 changed files with 31125 additions and 9485 deletions

View File

@@ -220,6 +220,9 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
int size_x = GB(spec->size, HasBit(view, 0) ? 4 : 0, 4);
int size_y = GB(spec->size, HasBit(view, 0) ? 0 : 4, 4);
TileArea ta(tile, size_x, size_y);
for (TileIndex t : ta) {
if (!IsValidTile(t)) return_cmd_error(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP_SUB); // Might be off the map
}
if (type == OBJECT_OWNED_LAND) {
/* Owned land is special as it can be placed on any slope. */
@@ -346,7 +349,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
}
if (flags & DC_EXEC) {
BuildObject(type, tile, _current_company, nullptr, view);
BuildObject(type, tile, _current_company == OWNER_DEITY ? OWNER_NONE : _current_company, nullptr, view);
/* Make sure the HQ starts at the right size. */
if (type == OBJECT_HQ) UpdateCompanyHQ(tile, hq_score);