summaryrefslogtreecommitdiff
path: root/src/script/api/script_industrytype.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-09-08 12:14:00 +0000
committerfrosch <frosch@openttd.org>2012-09-08 12:14:00 +0000
commitbcac3d16b63c119a3fa6763a9f5b5467d6e49d96 (patch)
tree9fd4924fc321ff11b8620a67b470c792e243beeb /src/script/api/script_industrytype.hpp
parent8aa27f09fe7d723e72de47f859eb35afe90d3869 (diff)
downloadopenttd-bcac3d16b63c119a3fa6763a9f5b5467d6e49d96.tar.xz
(svn r24513) -Add: [Script] ScriptIndustryType::IsProcessingIndustry.
Diffstat (limited to 'src/script/api/script_industrytype.hpp')
-rw-r--r--src/script/api/script_industrytype.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/script/api/script_industrytype.hpp b/src/script/api/script_industrytype.hpp
index 1d642ac38..de5180c43 100644
--- a/src/script/api/script_industrytype.hpp
+++ b/src/script/api/script_industrytype.hpp
@@ -65,13 +65,33 @@ public:
/**
* Is this industry type a raw industry?
+ * Raw industries usually produce cargo without any prerequisites.
+ * ("Usually" means that advanced NewGRF industry concepts might not fit the "raw"/"processing"
+ * classification, so it's up to the interpretation of the NewGRF author.)
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True if it should be handled as a raw industry.
+ * @note Industries might be neither raw nor processing.
+ * This is usually the case for industries which produce nothing (e.g. power plants),
+ * but also for weird industries like temperate banks and tropic lumber mills.
*/
static bool IsRawIndustry(IndustryType industry_type);
/**
+ * Is this industry type a processing industry?
+ * Processing industries usually produce cargo when delivered with input cargo.
+ * ("Usually" means that advanced NewGRF industry concepts might not fit the "raw"/"processing"
+ * classification, so it's up to the interpretation of the NewGRF author.)
+ * @param industry_type The type of the industry.
+ * @pre IsValidIndustryType(industry_type).
+ * @return True if it is a processing industry.
+ * @note Industries might be neither raw nor processing.
+ * This is usually the case for industries which produce nothing (e.g. power plants),
+ * but also for weird industries like temperate banks and tropic lumber mills.
+ */
+ static bool IsProcessingIndustry(IndustryType industry_type);
+
+ /**
* Can the production of this industry increase?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).