Organize dScripts (#814)

* Organize dScripts

whitespace

Remove parent scope

Remove parent scope from initial setter

Remove debug

Remove helper programs

* Fix NtImagimeterVisibility script

Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
This commit is contained in:
David Markowitz
2022-11-03 10:57:54 -07:00
committed by GitHub
parent b974eed8f5
commit 8d37d9b681
567 changed files with 886 additions and 252 deletions

View File

@@ -0,0 +1,30 @@
#include "NtOverbuildServer.h"
#include "EntityManager.h"
void NtOverbuildServer::SetVariables(Entity* self) {
self->SetVar<float_t>(m_SpyProximityVariable, 30.0f);
self->SetVar<SpyData>(m_SpyDataVariable, {
NT_FACTION_SPY_OVERBUILD, 13891, 1320
});
self->SetVar<std::vector<SpyDialogue>>(m_SpyDialogueTableVariable, {
{ "OVERBUILD_NT_CONVO_1", 0 },
{ "OVERBUILD_NT_CONVO_2", 1 },
{ "OVERBUILD_NT_CONVO_3", 0 },
{ "OVERBUILD_NT_CONVO_4", 1 },
{ "OVERBUILD_NT_CONVO_5", 0 },
{ "OVERBUILD_NT_CONVO_6", 1 },
{ "OVERBUILD_NT_CONVO_7", 0 },
});
// Find the second object Dr. Overbuild interacts with
LWOOBJID otherConvoObjectID = LWOOBJID_EMPTY;
for (auto* otherConvoObject : EntityManager::Instance()->GetEntitiesInGroup(GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(m_OtherEntitiesGroupVariable)))) {
otherConvoObjectID = otherConvoObject->GetObjectID();
break;
}
// If there's an alternating conversation, indices should be provided using the conversationID variables
self->SetVar<std::vector<LWOOBJID>>(m_SpyCinematicObjectsVariable, { self->GetObjectID(), otherConvoObjectID });
}