diff options
author | frosch <frosch@openttd.org> | 2012-09-08 12:14:00 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-09-08 12:14:00 +0000 |
commit | bcac3d16b63c119a3fa6763a9f5b5467d6e49d96 (patch) | |
tree | 9fd4924fc321ff11b8620a67b470c792e243beeb /src/industry_cmd.cpp | |
parent | 8aa27f09fe7d723e72de47f859eb35afe90d3869 (diff) | |
download | openttd-bcac3d16b63c119a3fa6763a9f5b5467d6e49d96.tar.xz |
(svn r24513) -Add: [Script] ScriptIndustryType::IsProcessingIndustry.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index fd8387e2d..abb41e6db 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -2722,8 +2722,17 @@ void InitializeIndustries() */ bool IndustrySpec::IsRawIndustry() const { - /* Lumber mills are extractive/organic, but can always be built like a non-raw industry */ - return (this->life_type & (INDUSTRYLIFE_EXTRACTIVE | INDUSTRYLIFE_ORGANIC)) != 0 && + return (this->life_type & (INDUSTRYLIFE_EXTRACTIVE | INDUSTRYLIFE_ORGANIC)) != 0; +} + +/** + * Is an industry with the spec a processing industry? + * @return true if it should be handled as a processing industry + */ +bool IndustrySpec::IsProcessingIndustry() const +{ + /* Lumber mills are neither raw nor processing */ + return (this->life_type & INDUSTRYLIFE_PROCESSING) != 0 && (this->behaviour & INDUSTRYBEH_CUT_TREES) == 0; } |