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

Function UpdateIndustryProduction

src/industry_gui.cpp:1185–1195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1183};
1184
1185static void UpdateIndustryProduction(Industry *i)
1186{
1187 const IndustrySpec *indspec = GetIndustrySpec(i->type);
1188 if (indspec->UsesOriginalEconomy()) i->RecomputeProductionMultipliers();
1189
1190 for (auto &p : i->produced) {
1191 if (IsValidCargoType(p.cargo)) {
1192 p.history[LAST_MONTH].production = ScaleByCargoScale(8 * p.rate, false);
1193 }
1194 }
1195}
1196
1197/** Widget definition of the view industry gui */
1198static constexpr std::initializer_list<NWidgetPart> _nested_industry_view_widgets = {

Callers 2

OnClickMethod · 0.85
OnQueryTextFinishedMethod · 0.85

Calls 5

GetIndustrySpecFunction · 0.85
IsValidCargoTypeFunction · 0.85
ScaleByCargoScaleFunction · 0.85
UsesOriginalEconomyMethod · 0.80

Tested by

no test coverage detected