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

Method SetProductionLevel

src/script/api/script_industry.cpp:306–315  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

304}
305
306/* static */ bool ScriptIndustry::SetProductionLevel(IndustryID industry_id, SQInteger prod_level, bool show_news, Text *custom_news)
307{
308 ScriptObjectRef counter(custom_news);
309
310 EnforceDeityMode(false);
311 EnforcePrecondition(false, IsValidIndustry(industry_id));
312 EnforcePrecondition(false, prod_level >= PRODLEVEL_MINIMUM && prod_level <= PRODLEVEL_MAXIMUM);
313
314 return ScriptObject::Command<CMD_INDUSTRY_SET_PRODUCTION>::Do(industry_id, prod_level, show_news, custom_news != nullptr ? custom_news->GetEncodedText() : EncodedString{});
315}

Callers

nothing calls this directly

Calls 1

GetEncodedTextMethod · 0.80

Tested by

no test coverage detected