Merge branch 'main' into movingPlatformWork

This commit is contained in:
David Markowitz
2024-02-10 19:10:55 -08:00
810 changed files with 18865 additions and 15976 deletions

View File

@@ -20,7 +20,7 @@ void AgJetEffectServer::OnUse(Entity* self, Entity* user) {
self->AddTimer("CineDone", 7.5f + 5.0f); // 7.5f is time the cinematic takes to play
}
void AgJetEffectServer::OnRebuildComplete(Entity* self, Entity* target) {
void AgJetEffectServer::OnQuickBuildComplete(Entity* self, Entity* target) {
if (self->GetLOT() != 6209) return;
auto entities = Game::entityManager->GetEntitiesInGroup("Jet_FX");
if (entities.empty()) return;

View File

@@ -6,7 +6,7 @@ class AgJetEffectServer final : public CppScripts::Script
public:
void OnUse(Entity* self, Entity* user) override;
void OnRebuildComplete(Entity* self, Entity* target) override;
void OnQuickBuildComplete(Entity* self, Entity* target) override;
void OnTimerDone(Entity* self, std::string timerName) override;
private:

View File

@@ -11,7 +11,7 @@ void AgPicnicBlanket::OnUse(Entity* self, Entity* user) {
self->SetVar<bool>(u"active", true);
auto lootTable = std::unordered_map<LOT, int32_t>{ {935, 3} };
LootGenerator::Instance().DropLoot(user, self, lootTable, 0, 0);
Loot::DropLoot(user, self, lootTable, 0, 0);
self->AddCallbackTimer(5.0f, [self]() {
self->SetVar<bool>(u"active", false);

View File

@@ -8,7 +8,7 @@ void AgQbElevator::OnStartup(Entity* self) {
}
//when the QB is finished being built by a player
void AgQbElevator::OnRebuildComplete(Entity* self, Entity* target) {
void AgQbElevator::OnQuickBuildComplete(Entity* self, Entity* target) {
self->SetProximityRadius(proxRadius, "elevatorProx");
self->SetI64(u"qbPlayer", target->GetObjectID());

View File

@@ -4,7 +4,7 @@
class AgQbElevator : public CppScripts::Script {
public:
void OnStartup(Entity* self) override;
void OnRebuildComplete(Entity* self, Entity* target) override;
void OnQuickBuildComplete(Entity* self, Entity* target) override;
void OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) override;
void OnTimerDone(Entity* self, std::string timerName) override;

View File

@@ -1,6 +1,6 @@
#include "AgQbWall.h"
void AgQbWall::OnRebuildComplete(Entity* self, Entity* player) {
void AgQbWall::OnQuickBuildComplete(Entity* self, Entity* player) {
self->SetVar(u"player", player->GetObjectID());
auto targetWallSpawners = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"spawner"));
if (targetWallSpawners != "") {

View File

@@ -3,5 +3,5 @@
class AgQbWall : public CppScripts::Script {
public:
void OnRebuildComplete(Entity* self, Entity* player) override;
void OnQuickBuildComplete(Entity* self, Entity* player) override;
};

View File

@@ -12,6 +12,5 @@ void AgStromlingProperty::OnStartup(Entity* self) {
4
};
auto* movementAIComponent = new MovementAIComponent(self, movementInfo);
self->AddComponent(eReplicaComponentType::MOVEMENT_AI, movementAIComponent);
self->AddComponent<MovementAIComponent>(movementInfo);
}

View File

@@ -12,6 +12,6 @@ void AgTurret::OnTimerDone(Entity* self, std::string timerName) {
}
}
void AgTurret::OnRebuildStart(Entity* self, Entity* user) {
void AgTurret::OnQuickBuildStart(Entity* self, Entity* user) {
GameMessages::SendLockNodeRotation(self, "base");
}

View File

@@ -4,5 +4,5 @@
class AgTurret : public CppScripts::Script {
void OnStartup(Entity* self);
void OnTimerDone(Entity* self, std::string timerName);
void OnRebuildStart(Entity* self, Entity* user);
void OnQuickBuildStart(Entity* self, Entity* user);
};

View File

@@ -14,5 +14,8 @@ set(DSCRIPTS_SOURCES_AI_AG
"AgDarkSpiderling.cpp"
"AgPicnicBlanket.cpp"
"AgStagePlatforms.cpp"
"AgQbWall.cpp"
PARENT_SCOPE)
"AgQbWall.cpp")
add_library(dScriptsAiAG STATIC ${DSCRIPTS_SOURCES_AI_AG})
target_include_directories(dScriptsAiAG PUBLIC ".")
target_precompile_headers(dScriptsAiAG REUSE_FROM dScriptsBase)