mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
WBL_Starflies had no script. As the live script: when the mission given at that object is handed in, every object of the Starflies group starts its path. Check: in Portabello, hand in the starflies mission: the starflies fly off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
586 B
C++
15 lines
586 B
C++
#include "WblStarflies.h"
|
|
|
|
#include "Entity.h"
|
|
#include "EntityManager.h"
|
|
#include "eMissionState.h"
|
|
#include "MovingPlatformComponent.h"
|
|
|
|
void WblStarflies::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
|
if (missionState != eMissionState::COMPLETE && missionState != eMissionState::READY_TO_COMPLETE) return;
|
|
for (auto* starfly : Game::entityManager->GetEntitiesInGroup("Starflies")) {
|
|
if (starfly == self) continue;
|
|
if (auto* movingPlatform = starfly->GetComponent<MovingPlatformComponent>()) movingPlatform->StartPathing();
|
|
}
|
|
}
|