2021-12-05 17:54:36 +00:00
|
|
|
#include "NtVandaServer.h"
|
|
|
|
#include "InventoryComponent.h"
|
2023-01-07 05:17:05 +00:00
|
|
|
#include "eMissionState.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
void NtVandaServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
|
|
|
|
|
|
|
// Removes the alien parts after completing the mission
|
|
|
|
if (missionID == m_AlienPartMissionID && missionState == eMissionState::READY_TO_COMPLETE) {
|
2023-06-07 07:23:50 +00:00
|
|
|
auto inventoryComponent = target->GetComponent<InventoryComponent>();
|
2021-12-05 17:54:36 +00:00
|
|
|
for (const auto& alienPartLot : m_AlienPartLots) {
|
|
|
|
inventoryComponent->RemoveItem(alienPartLot, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|