summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_engine.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_engine.hpp')
-rw-r--r--src/ai/api/ai_engine.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ai/api/ai_engine.hpp b/src/ai/api/ai_engine.hpp
index 3d213fd3e..431f622c8 100644
--- a/src/ai/api/ai_engine.hpp
+++ b/src/ai/api/ai_engine.hpp
@@ -26,13 +26,21 @@ public:
static const char *GetClassName() { return "AIEngine"; }
/**
- * Checks whether the given engine type is valid and buildable by you.
+ * Checks whether the given engine type is valid. An engine is valid if you
+ * have at least one vehicle of this engine or it's currently buildable.
* @param engine_id The engine to check.
* @return True if and only if the engine type is valid.
*/
static bool IsValidEngine(EngineID engine_id);
/**
+ * Checks whether the given engine type is buildable by you.
+ * @param engine_id The engine to check.
+ * @return True if and only if the engine type is buildable.
+ */
+ static bool IsBuildable(EngineID engine_id);
+
+ /**
* Get the name of an engine.
* @param engine_id The engine to get the name of.
* @pre IsValidEngine(engine_id).