Fix issue with dropship computer

The dropship computer now no longer gives a player a second mission item should they interact with it again after mission completion
This commit is contained in:
EmosewaMC 2022-06-20 22:22:32 -07:00
parent 43377caa3b
commit 6b30292efd
2 changed files with 4 additions and 2 deletions

View File

@ -27,12 +27,12 @@ void AmDropshipComputer::OnUse(Entity* self, Entity* user)
return; return;
} }
if (inventoryComponent->GetLotCount(12323) != 0) if (inventoryComponent->GetLotCount(m_NexusTalonDataCard) != 0 || missionComponent->GetMission(979)->GetMissionState() == MissionState::MISSION_STATE_COMPLETE)
{ {
return; return;
} }
inventoryComponent->AddItem(12323, 1, eLootSourceType::LOOT_SOURCE_NONE); inventoryComponent->AddItem(m_NexusTalonDataCard, 1, eLootSourceType::LOOT_SOURCE_NONE);
} }
void AmDropshipComputer::OnDie(Entity* self, Entity* killer) void AmDropshipComputer::OnDie(Entity* self, Entity* killer)

View File

@ -8,4 +8,6 @@ public:
void OnUse(Entity* self, Entity* user) override; void OnUse(Entity* self, Entity* user) override;
void OnDie(Entity* self, Entity* killer) override; void OnDie(Entity* self, Entity* killer) override;
void OnTimerDone(Entity* self, std::string timerName) override; void OnTimerDone(Entity* self, std::string timerName) override;
private:
const LOT m_NexusTalonDataCard = 12323;
}; };