mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-08 13:53:45 +00:00
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:
@@ -1,5 +1,6 @@
|
||||
set(DSCRIPTS_SOURCES_ZONE_LUPS
|
||||
"WblGenericZone.cpp"
|
||||
"WblStarflies.cpp"
|
||||
)
|
||||
|
||||
add_subdirectory(RobotCity_Intro)
|
||||
|
||||
14
dScripts/zone/LUPs/WblStarflies.cpp
Normal file
14
dScripts/zone/LUPs/WblStarflies.cpp
Normal 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();
|
||||
}
|
||||
}
|
||||
8
dScripts/zone/LUPs/WblStarflies.h
Normal file
8
dScripts/zone/LUPs/WblStarflies.h
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user