diff options
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; } |