summaryrefslogtreecommitdiff
path: root/src/command_type.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-08-16 14:02:20 +0000
committerfrosch <frosch@openttd.org>2008-08-16 14:02:20 +0000
commitf7826f8a372d3120cc9d56e4d1c11df3e2fd577c (patch)
tree4c275596da6f577f47cea17f49ee3870846e07cb /src/command_type.h
parent56459cab81f6a56d1fde29130670d001389ff7ce (diff)
downloadopenttd-f7826f8a372d3120cc9d56e4d1c11df3e2fd577c.tar.xz
(svn r14083) -Fix [FS#1264, FS#2037, FS#2038, FS#2110]: Rewrite the autoreplace kernel.
Diffstat (limited to 'src/command_type.h')
-rw-r--r--src/command_type.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/command_type.h b/src/command_type.h
index f3e4116a7..0637673cf 100644
--- a/src/command_type.h
+++ b/src/command_type.h
@@ -101,6 +101,19 @@ public:
}
/**
+ * Returns the error message of a command
+ * @return the error message, if succeeded INVALID_STRING_ID
+ */
+ StringID GetErrorMessage() const
+ {
+ extern StringID _error_message;
+
+ if (this->success) return INVALID_STRING_ID;
+ if (this->message != INVALID_STRING_ID) return this->message;
+ return _error_message;
+ }
+
+ /**
* Did this command succeed?
* @return true if and only if it succeeded
*/
@@ -259,6 +272,7 @@ enum {
CMD_CLONE_VEHICLE, ///< clone a vehicle
CMD_START_STOP_VEHICLE, ///< start or stop a vehicle
CMD_MASS_START_STOP, ///< start/stop all vehicles (in a depot)
+ CMD_AUTOREPLACE_VEHICLE, ///< replace/renew a vehicle while it is in a depot
CMD_DEPOT_SELL_ALL_VEHICLES, ///< sell all vehicles which are in a given depot
CMD_DEPOT_MASS_AUTOREPLACE, ///< force the autoreplace to take action in a given depot
@@ -290,7 +304,7 @@ enum {
DC_AI_BUILDING = 0x020, ///< special building rules for AI
DC_NO_TOWN_RATING = 0x040, ///< town rating does not disallow you from building
DC_BANKRUPT = 0x080, ///< company bankrupts, skip money check, skip vehicle on tile check in some cases
- DC_AUTOREPLACE = 0x100, ///< autoreplace/autorenew is in progress
+ DC_AUTOREPLACE = 0x100, ///< autoreplace/autorenew is in progress, this shall disable vehicle limits when building, and ignore certain restrictions when undoing things (like vehicle attach callback)
};
/**