feat: Mission Component debug (#1901)

* feat: Mission Component debug

* Add player argument to inspect command

* Add completion details

* Remove unlocalized server string

done on client instead
This commit is contained in:
David Markowitz
2025-10-05 20:13:27 -07:00
committed by GitHub
parent 5d5bce53d0
commit 62ac65c520
10 changed files with 197 additions and 67 deletions

View File

@@ -270,6 +270,12 @@ bool Mission::IsReadyToComplete() const {
return m_State == eMissionState::READY_TO_COMPLETE || m_State == eMissionState::COMPLETE_READY_TO_COMPLETE;
}
bool Mission::IsFailed() const {
const auto underlying = GeneralUtils::ToUnderlying(m_State);
const auto target = GeneralUtils::ToUnderlying(eMissionState::FAILED);
return (underlying & target) != 0;
}
void Mission::MakeReadyToComplete() {
SetMissionState(m_Completions == 0 ? eMissionState::READY_TO_COMPLETE : eMissionState::COMPLETE_READY_TO_COMPLETE);
}