DarkflameServer/dScripts/02_server/Map/NT/NtVandaServer.cpp
David Markowitz 8d37d9b681
Organize dScripts (#814)
* Organize dScripts

whitespace

Remove parent scope

Remove parent scope from initial setter

Remove debug

Remove helper programs

* Fix NtImagimeterVisibility script

Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
2022-11-03 12:57:54 -05:00

14 lines
526 B
C++

#include "NtVandaServer.h"
#include "InventoryComponent.h"
void NtVandaServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) {
// Removes the alien parts after completing the mission
if (missionID == m_AlienPartMissionID && missionState == MissionState::MISSION_STATE_READY_TO_COMPLETE) {
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
for (const auto& alienPartLot : m_AlienPartLots) {
inventoryComponent->RemoveItem(alienPartLot, 1);
}
}
}