mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Rename RebuildComponent to QuickbuildComponent
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "AmDropshipComputer.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "eMissionState.h"
|
||||
@@ -10,9 +10,9 @@ void AmDropshipComputer::OnStartup(Entity* self) {
|
||||
}
|
||||
|
||||
void AmDropshipComputer::OnUse(Entity* self, Entity* user) {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent == nullptr || rebuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent == nullptr || quickBuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@ void AmDropshipComputer::OnDie(Entity* self, Entity* killer) {
|
||||
}
|
||||
|
||||
void AmDropshipComputer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent == nullptr) {
|
||||
if (quickBuildComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (timerName == "reset" && rebuildComponent->GetState() == eRebuildState::OPEN) {
|
||||
if (timerName == "reset" && quickBuildComponent->GetState() == eRebuildState::OPEN) {
|
||||
self->Smash(self->GetObjectID(), eKillType::SILENT);
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
void AmShieldGeneratorQuickbuild::OnStartup(Entity* self) {
|
||||
@@ -174,9 +174,9 @@ void AmShieldGeneratorQuickbuild::BuffPlayers(Entity* self) {
|
||||
}
|
||||
|
||||
void AmShieldGeneratorQuickbuild::EnemyEnteredShield(Entity* self, Entity* intruder) {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent == nullptr || rebuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent == nullptr || quickBuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "ImgBrickConsoleQB.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
@@ -19,18 +19,18 @@ void ImgBrickConsoleQB::OnStartup(Entity* self) {
|
||||
}
|
||||
|
||||
void ImgBrickConsoleQB::OnUse(Entity* self, Entity* user) {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
if (!self->GetNetworkVar<bool>(u"used")) {
|
||||
const auto consoles = EntityManager::Instance()->GetEntitiesInGroup("Console");
|
||||
|
||||
auto bothBuilt = false;
|
||||
|
||||
for (auto* console : consoles) {
|
||||
auto* consoleRebuildComponent = console->GetComponent<RebuildComponent>();
|
||||
auto* consoleQuickBuildComponent = console->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (consoleRebuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
if (consoleQuickBuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -145,9 +145,9 @@ void ImgBrickConsoleQB::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
const auto consoles = EntityManager::Instance()->GetEntitiesInGroup("Console");
|
||||
|
||||
for (auto* console : consoles) {
|
||||
auto* consoleRebuildComponent = console->GetComponent<RebuildComponent>();
|
||||
auto* consoleQuickBuildComponent = console->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (consoleRebuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
if (consoleQuickBuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -166,9 +166,9 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer) {
|
||||
|
||||
self->SetVar(u"Died", true);
|
||||
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
auto offFX = 0;
|
||||
|
||||
const auto location = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"console"));
|
||||
@@ -227,9 +227,9 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer) {
|
||||
|
||||
void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "reset") {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent->GetState() == eRebuildState::OPEN) {
|
||||
if (quickBuildComponent->GetState() == eRebuildState::OPEN) {
|
||||
self->Smash(self->GetObjectID(), eKillType::SILENT);
|
||||
}
|
||||
} else if (timerName == "Die") {
|
||||
|
@@ -1,13 +1,13 @@
|
||||
#include "NjRailActivatorsServer.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "Character.h"
|
||||
|
||||
void NjRailActivatorsServer::OnUse(Entity* self, Entity* user) {
|
||||
const auto flag = self->GetVar<int32_t>(u"RailFlagNum");
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
// Only allow use if this is not a quick build or the quick build is built
|
||||
if (rebuildComponent == nullptr || rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent == nullptr || quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
auto* character = user->GetCharacter();
|
||||
if (character != nullptr) {
|
||||
character->SetPlayerFlag(flag, true);
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#include "NjRailPostServer.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "EntityManager.h"
|
||||
|
||||
void NjRailPostServer::OnStartup(Entity* self) {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
if (rebuildComponent != nullptr) {
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
if (quickBuildComponent != nullptr) {
|
||||
self->SetNetworkVar<bool>(NetworkNotActiveVariable, true);
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "PropertyPlatform.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
|
||||
@@ -14,8 +14,8 @@ void PropertyPlatform::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
}
|
||||
|
||||
void PropertyPlatform::OnUse(Entity* self, Entity* user) {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
if (rebuildComponent != nullptr && rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
if (quickBuildComponent != nullptr && quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
// auto* movingPlatform = self->GetComponent<MovingPlatformComponent>();
|
||||
// if (movingPlatform != nullptr) {
|
||||
// movingPlatform->GotoWaypoint(1);
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include "GameMessages.h"
|
||||
#include "Character.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "eTerminateType.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
@@ -12,13 +12,13 @@ void NsTokenConsoleServer::OnStartup(Entity* self) {
|
||||
}
|
||||
|
||||
void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent == nullptr) {
|
||||
if (quickBuildComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rebuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent->GetState() != eRebuildState::COMPLETED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "CavePrisonCage.h"
|
||||
#include "EntityManager.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "Character.h"
|
||||
#include "dZoneManager.h"
|
||||
@@ -68,14 +68,14 @@ void CavePrisonCage::SpawnCounterweight(Entity* self, Spawner* spawner) {
|
||||
|
||||
self->SetVar<LWOOBJID>(u"Counterweight", counterweight->GetObjectID());
|
||||
|
||||
auto* rebuildComponent = counterweight->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = counterweight->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent != nullptr) {
|
||||
rebuildComponent->AddRebuildStateCallback([this, self](eRebuildState state) {
|
||||
if (quickBuildComponent != nullptr) {
|
||||
quickBuildComponent->AddRebuildStateCallback([this, self](eRebuildState state) {
|
||||
OnRebuildNotifyState(self, state);
|
||||
});
|
||||
|
||||
rebuildComponent->AddRebuildCompleteCallback([this, self](Entity* user) {
|
||||
quickBuildComponent->AddRebuildCompleteCallback([this, self](Entity* user) {
|
||||
// The counterweight is a simple mover, which is not implemented, so we'll just set it's position
|
||||
auto* counterweight = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"Counterweight"));
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
#include "ImaginationShrineServer.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
|
||||
void ImaginationShrineServer::OnUse(Entity* self, Entity* user) {
|
||||
// If the rebuild component is complete, use the shrine
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent == nullptr) {
|
||||
if (quickBuildComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
// Use the shrine
|
||||
BaseUse(self, user);
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "NjMonastryBossInstance.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
@@ -221,9 +221,9 @@ void NjMonastryBossInstance::HandleLedgedFrakjawSpawned(Entity* self, Entity* le
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* counterWeight) {
|
||||
auto* rebuildComponent = counterWeight->GetComponent<RebuildComponent>();
|
||||
if (rebuildComponent != nullptr) {
|
||||
rebuildComponent->AddRebuildStateCallback([this, self, counterWeight](eRebuildState state) {
|
||||
auto* quickBuildComponent = counterWeight->GetComponent<QuickBuildComponent>();
|
||||
if (quickBuildComponent != nullptr) {
|
||||
quickBuildComponent->AddRebuildStateCallback([this, self, counterWeight](eRebuildState state) {
|
||||
|
||||
switch (state) {
|
||||
case eRebuildState::BUILDING:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "ActMine.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
|
||||
void ActMine::OnStartup(Entity* self) {
|
||||
self->SetVar(u"RebuildComplete", false);
|
||||
@@ -10,7 +10,7 @@ void ActMine::OnStartup(Entity* self) {
|
||||
|
||||
void ActMine::OnRebuildNotifyState(Entity* self, eRebuildState state) {
|
||||
if (state == eRebuildState::COMPLETED) {
|
||||
auto* rebuild = self->GetComponent<RebuildComponent>();
|
||||
auto* rebuild = self->GetComponent<QuickBuildComponent>();
|
||||
if (rebuild) {
|
||||
auto* builder = rebuild->GetBuilder();
|
||||
self->SetVar(u"Builder", builder->GetObjectID());
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "ActParadoxPipeFix.h"
|
||||
#include "EntityManager.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eEndBehavior.h"
|
||||
@@ -19,9 +19,9 @@ void ActParadoxPipeFix::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto* rebuildComponent = object->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = object->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
indexCount++;
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "GeneralUtils.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "Spawner.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
|
||||
void FvBrickPuzzleServer::OnStartup(Entity* self) {
|
||||
const auto myGroup = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"spawner_name"));
|
||||
@@ -59,9 +59,9 @@ void FvBrickPuzzleServer::OnDie(Entity* self, Entity* killer) {
|
||||
|
||||
void FvBrickPuzzleServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "reset") {
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent != nullptr && rebuildComponent->GetState() == eRebuildState::OPEN) {
|
||||
if (quickBuildComponent != nullptr && quickBuildComponent->GetState() == eRebuildState::OPEN) {
|
||||
self->Smash(self->GetObjectID(), eKillType::SILENT);
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include "Item.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "SoundTriggerComponent.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
@@ -93,9 +93,9 @@ void NsConcertInstrument::OnTimerDone(Entity* self, std::string name) {
|
||||
activePlayer->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
if (rebuildComponent != nullptr)
|
||||
rebuildComponent->ResetRebuild(false);
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
if (quickBuildComponent != nullptr)
|
||||
quickBuildComponent->ResetRebuild(false);
|
||||
|
||||
self->Smash(self->GetObjectID(), eKillType::VIOLENT);
|
||||
self->SetVar<LWOOBJID>(u"activePlayer", LWOOBJID_EMPTY);
|
||||
|
Reference in New Issue
Block a user