feat(scripts): Portabello's starflies start moving when their mission is handed in

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>
This commit is contained in:
Aaron Kimbrell
2026-09-29 09:33:04 -05:00
parent 342269cf61
commit 88b2ef5f38
4 changed files with 25 additions and 0 deletions

View File

@@ -322,6 +322,7 @@
// WBL scripts
#include "WblGenericZone.h"
#include "WblStarflies.h"
// Alpha Scripts
#include "TriggerGas.h"
@@ -688,6 +689,7 @@ namespace {
//WBL
{"scripts\\zone\\LUPs\\WBL_generic_zone.lua", []() {return new WblGenericZone();}},
{"scripts\\zone\\LUPs\\Portabello Intro\\WBL_Starflies.lua", []() {return new WblStarflies();}},
{"scripts\\zone\\LUPs\\Moonbase Intro\\MOONBASE-INTRO_INTRO_CINEMATIC.lua", []() {return new WblGenericZone();}},
//Alpha

View File

@@ -1,5 +1,6 @@
set(DSCRIPTS_SOURCES_ZONE_LUPS
"WblGenericZone.cpp"
"WblStarflies.cpp"
)
add_subdirectory(RobotCity_Intro)

View File

@@ -0,0 +1,14 @@
#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();
}
}

View File

@@ -0,0 +1,8 @@
#pragma once
#include "CppScripts.h"
// WBL_Starflies (Portabello): the starflies start moving when the mission given here is handed in
class WblStarflies : public CppScripts::Script {
public:
void OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) override;
};