summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-08 10:59:30 +0000
committerrubidium <rubidium@openttd.org>2010-08-08 10:59:30 +0000
commit3da3d131c6a1e17db81d08c161b944c2c00533da (patch)
tree1793f2ebfc20fc2be1e028ad2252f8140f45334a /src/ai/api
parentabc14d8fbfb9ca313d6a5ab50fc726a2507de6a4 (diff)
downloadopenttd-3da3d131c6a1e17db81d08c161b944c2c00533da.tar.xz
(svn r20411) -Codechange: rename unmovables as quite a lot of them are actually movable; e.g. HQ and owned land are pretty movable.
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_company.cpp4
-rw-r--r--src/ai/api/ai_error.hpp2
-rw-r--r--src/ai/api/ai_error.hpp.sq2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/api/ai_company.cpp b/src/ai/api/ai_company.cpp
index f9c352d9d..e11b2bb4b 100644
--- a/src/ai/api/ai_company.cpp
+++ b/src/ai/api/ai_company.cpp
@@ -16,11 +16,11 @@
#include "../../company_base.h"
#include "../../company_manager_face.h"
#include "../../economy_func.h"
+#include "../../object_type.h"
#include "../../strings_func.h"
#include "../../tile_map.h"
#include "../../string_func.h"
#include "../../settings_func.h"
-#include "../../unmovable_type.h"
#include "table/strings.h"
/* static */ AICompany::CompanyID AICompany::ResolveCompanyID(AICompany::CompanyID company)
@@ -163,7 +163,7 @@
{
EnforcePrecondition(false, ::IsValidTile(tile));
- return AIObject::DoCommand(tile, UNMOVABLE_HQ, 0, CMD_BUILD_UNMOVABLE);
+ return AIObject::DoCommand(tile, OBJECT_HQ, 0, CMD_BUILD_OBJECT);
}
/* static */ TileIndex AICompany::GetCompanyHQ(CompanyID company)
diff --git a/src/ai/api/ai_error.hpp b/src/ai/api/ai_error.hpp
index e26944eae..c2dd8ba95 100644
--- a/src/ai/api/ai_error.hpp
+++ b/src/ai/api/ai_error.hpp
@@ -99,7 +99,7 @@ public:
ERR_ALREADY_BUILT, // [STR_ERROR_ALREADY_BUILT, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST]
/** Area isn't clear, try to demolish the building on it */
- ERR_AREA_NOT_CLEAR, // [STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_RAILROAD, STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, STR_ERROR_BUOY_IN_THE_WAY, STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, STR_ERROR_UNMOVABLE_OBJECT_IN_THE_WAY, STR_ERROR_COMPANY_HEADQUARTERS_IN, STR_ERROR_OBJECT_IN_THE_WAY, STR_ERROR_MUST_REMOVE_ROAD_FIRST, STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, STR_ERROR_EXCAVATION_WOULD_DAMAGE]
+ ERR_AREA_NOT_CLEAR, // [STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_RAILROAD, STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, STR_ERROR_BUOY_IN_THE_WAY, STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, STR_ERROR_COMPANY_HEADQUARTERS_IN, STR_ERROR_OBJECT_IN_THE_WAY, STR_ERROR_MUST_REMOVE_ROAD_FIRST, STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, STR_ERROR_EXCAVATION_WOULD_DAMAGE]
/** Area / property is owned by another company */
ERR_OWNED_BY_ANOTHER_COMPANY, // [STR_ERROR_AREA_IS_OWNED_BY_ANOTHER, STR_ERROR_OWNED_BY]
diff --git a/src/ai/api/ai_error.hpp.sq b/src/ai/api/ai_error.hpp.sq
index 7f27fda69..5101d77f3 100644
--- a/src/ai/api/ai_error.hpp.sq
+++ b/src/ai/api/ai_error.hpp.sq
@@ -79,7 +79,7 @@ void SQAIError_Register(Squirrel *engine)
AIError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, AIError::ERR_AREA_NOT_CLEAR);
AIError::RegisterErrorMap(STR_ERROR_BUOY_IN_THE_WAY, AIError::ERR_AREA_NOT_CLEAR);
AIError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, AIError::ERR_AREA_NOT_CLEAR);
- AIError::RegisterErrorMap(STR_ERROR_UNMOVABLE_OBJECT_IN_THE_WAY, AIError::ERR_AREA_NOT_CLEAR);
+ AIError::RegisterErrorMap(STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, AIError::ERR_AREA_NOT_CLEAR);
AIError::RegisterErrorMap(STR_ERROR_COMPANY_HEADQUARTERS_IN, AIError::ERR_AREA_NOT_CLEAR);
AIError::RegisterErrorMap(STR_ERROR_OBJECT_IN_THE_WAY, AIError::ERR_AREA_NOT_CLEAR);
AIError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_ROAD_FIRST, AIError::ERR_AREA_NOT_CLEAR);