Add imagimeter visibility script (#738)

This commit is contained in:
Aaron Kimbrell 2022-08-18 00:09:14 -05:00 committed by GitHub
parent dd8091f60e
commit e4a15a0f2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 0 deletions

View File

@ -628,6 +628,7 @@ enum ePlayerFlags {
GF_BINOC_IN_CROC_AREA = 1308,
GF_BINOC_IN_JAIL_AREA = 1309,
GF_BINOC_TELESCOPE_NEXT_TO_CAPTAIN_JACK = 1310,
NT_PLINTH_REBUILD = 1919,
NT_FACTION_SPY_DUKE = 1974,
NT_FACTION_SPY_OVERBUILD = 1976,
NT_FACTION_SPY_HAEL = 1977,

View File

@ -177,6 +177,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp"
"NtFactionSpyServer.cpp"
"NtHaelServer.cpp"
"NtImagBeamBuffer.cpp"
"NtImagimeterVisibility.cpp"
"NtOverbuildServer.cpp"
"NtParadoxPanelServer.cpp"
"NtParadoxTeleServer.cpp"

View File

@ -201,6 +201,7 @@
#include "ForceVolumeServer.h"
#include "NtXRayServer.h"
#include "NtSleepingGuard.h"
#include "NtImagimeterVisibility.h"
// DLU Scripts
#include "DLUVanityNPC.h"
@ -661,6 +662,9 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
script = new NtXRayServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_SLEEPING_GUARD.lua")
script = new NtSleepingGuard();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_IMAGIMETER_VISIBILITY_SERVER.lua") {
script = new NTImagimeterVisibility();
}
//AM:
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_AM_CONSOLE_TELEPORT_SERVER.lua")

View File

@ -0,0 +1,11 @@
#include "NtImagimeterVisibility.h"
#include "GameMessages.h"
#include "Entity.h"
#include "Character.h"
void NTImagimeterVisibility::OnRebuildComplete(Entity* self, Entity* target) {
auto* character = target->GetCharacter();
if (character) character->SetPlayerFlag(ePlayerFlags::NT_PLINTH_REBUILD, true);
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlinthBuilt", 0, 0, LWOOBJID_EMPTY, "", target->GetSystemAddress());
}

View File

@ -0,0 +1,7 @@
#pragma once
#include "CppScripts.h"
class NTImagimeterVisibility : public CppScripts::Script {
public:
void OnRebuildComplete(Entity* self, Entity* target) override;
};