Merge branch 'master' into jgrpp

# Conflicts:
#	src/aircraft_cmd.cpp
#	src/company_gui.cpp
#	src/lang/arabic_egypt.txt
#	src/lang/czech.txt
#	src/lang/esperanto.txt
#	src/lang/faroese.txt
#	src/lang/finnish.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/lang/latvian.txt
#	src/lang/malay.txt
#	src/lang/polish.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/lang/unfinished/urdu.txt
#	src/main_gui.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/road_cmd.cpp
#	src/settings_type.h
#	src/station_cmd.cpp
#	src/table/settings.ini
This commit is contained in:
Jonathan G Rennison
2021-01-31 01:10:01 +00:00
88 changed files with 262 additions and 229 deletions

View File

@@ -251,7 +251,14 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
} else {
if (!allow_ground) return_cmd_error(STR_ERROR_MUST_BE_BUILT_ON_WATER);
/* For non-water tiles, we'll have to clear it before building. */
cost.AddCost(DoCommand(t, 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR));
/* When relocating HQ, allow it to be relocated (partial) on itself. */
if (!(type == OBJECT_HQ &&
IsTileType(t, MP_OBJECT) &&
IsTileOwner(t, _current_company) &&
IsObjectType(t, OBJECT_HQ))) {
cost.AddCost(DoCommand(t, 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR));
}
}
}