MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsProductionAlterable

Function IsProductionAlterable

src/industry_gui.cpp:774–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

772static void UpdateIndustryProduction(Industry *i);
773
774static inline bool IsProductionAlterable(const Industry *i)
775{
776 const IndustrySpec *is = GetIndustrySpec(i->type);
777 bool has_prod = std::any_of(std::begin(is->production_rate), std::end(is->production_rate), [](auto rate) { return rate != 0; });
778 return ((_game_mode == GM_EDITOR || _cheats.setup_prod.value) &&
779 (has_prod || is->IsRawIndustry()) &&
780 !_networking);
781}
782
783class IndustryViewWindow : public Window
784{

Callers 1

OnInvalidateDataMethod · 0.85

Calls 4

GetIndustrySpecFunction · 0.85
beginFunction · 0.50
endFunction · 0.50
IsRawIndustryMethod · 0.45

Tested by

no test coverage detected