MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / updateDailyPlayer

Method updateDailyPlayer

src/OpenLoco/src/World/Company.cpp:152–173  ·  view source on GitHub ↗

0x004387D0

Source from the content-addressed store, hash-verified

150
151 // 0x004387D0
152 void Company::updateDailyPlayer()
153 {
154 if (SceneManager::isEditorMode() || SceneManager::isTitleMode())
155 {
156 return;
157 }
158
159 const auto newProgress = getNewChallengeProgress();
160 if (newProgress != challengeProgress)
161 {
162 challengeProgress = newProgress;
163 Ui::WindowManager::invalidate(Ui::WindowType::company, enumValue(id()));
164 }
165
166 constexpr auto requiredFlags = CompanyFlags::challengeBeatenByOpponent | CompanyFlags::challengeCompleted | CompanyFlags::challengeFailed;
167 if ((challengeFlags & requiredFlags) != CompanyFlags::none)
168 {
169 return;
170 }
171
172 evaluateChallengeProgress();
173 }
174
175 // Split off from updateDailyPlayer
176 void Company::evaluateChallengeProgress()

Callers

nothing calls this directly

Calls 4

isEditorModeFunction · 0.85
isTitleModeFunction · 0.85
enumValueFunction · 0.85
invalidateFunction · 0.50

Tested by

no test coverage detected