mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 13:37:22 +00:00
Add script to playfx on canisters before consoles are active (#754)
* Add script to playfx on canisters before consoles are active * remove debug stuff
This commit is contained in:
parent
b70e7334e8
commit
3b75ecc0b4
@ -94,6 +94,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp"
|
|||||||
"FvConsoleRightQuickbuild.cpp"
|
"FvConsoleRightQuickbuild.cpp"
|
||||||
"FvDragonSmashingGolemQb.cpp"
|
"FvDragonSmashingGolemQb.cpp"
|
||||||
"FvFacilityBrick.cpp"
|
"FvFacilityBrick.cpp"
|
||||||
|
"FvFacilityPipes.cpp"
|
||||||
"FvFlyingCreviceDragon.cpp"
|
"FvFlyingCreviceDragon.cpp"
|
||||||
"FvFong.cpp"
|
"FvFong.cpp"
|
||||||
"FvFreeGfNinjas.cpp"
|
"FvFreeGfNinjas.cpp"
|
||||||
|
@ -144,6 +144,7 @@
|
|||||||
#include "FvConsoleLeftQuickbuild.h"
|
#include "FvConsoleLeftQuickbuild.h"
|
||||||
#include "FvConsoleRightQuickbuild.h"
|
#include "FvConsoleRightQuickbuild.h"
|
||||||
#include "FvFacilityBrick.h"
|
#include "FvFacilityBrick.h"
|
||||||
|
#include "FvFacilityPipes.h"
|
||||||
#include "ImgBrickConsoleQB.h"
|
#include "ImgBrickConsoleQB.h"
|
||||||
#include "ActParadoxPipeFix.h"
|
#include "ActParadoxPipeFix.h"
|
||||||
#include "FvNinjaGuard.h"
|
#include "FvNinjaGuard.h"
|
||||||
@ -573,6 +574,8 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
|||||||
script = new FvConsoleRightQuickbuild();
|
script = new FvConsoleRightQuickbuild();
|
||||||
else if (scriptName == "scripts\\ai\\FV\\L_FV_FACILITY_BRICK.lua")
|
else if (scriptName == "scripts\\ai\\FV\\L_FV_FACILITY_BRICK.lua")
|
||||||
script = new FvFacilityBrick();
|
script = new FvFacilityBrick();
|
||||||
|
else if (scriptName == "scripts\\ai\\FV\\L_FV_FACILITY_PIPES.lua")
|
||||||
|
script = new FvFacilityPipes();
|
||||||
else if (scriptName == "scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua")
|
else if (scriptName == "scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua")
|
||||||
script = new ImgBrickConsoleQB();
|
script = new ImgBrickConsoleQB();
|
||||||
else if (scriptName == "scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua")
|
else if (scriptName == "scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua")
|
||||||
|
10
dScripts/FvFacilityPipes.cpp
Normal file
10
dScripts/FvFacilityPipes.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include "FvFacilityPipes.h"
|
||||||
|
#include "GameMessages.h"
|
||||||
|
|
||||||
|
void FvFacilityPipes::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
||||||
|
if (args == "startFX") {
|
||||||
|
GameMessages::SendPlayFXEffect(self->GetObjectID(), m_LeftPipeEffectID, m_EffectType, m_LeftPipeEffectName);
|
||||||
|
GameMessages::SendPlayFXEffect(self->GetObjectID(), m_RightPipeEffectID, m_EffectType, m_RightPipeEffectName);
|
||||||
|
GameMessages::SendPlayFXEffect(self->GetObjectID(), m_ImaginationCanisterEffectID, m_EffectType, m_ImaginationCanisterEffectName);
|
||||||
|
}
|
||||||
|
}
|
15
dScripts/FvFacilityPipes.h
Normal file
15
dScripts/FvFacilityPipes.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "CppScripts.h"
|
||||||
|
|
||||||
|
class FvFacilityPipes : public CppScripts::Script {
|
||||||
|
public:
|
||||||
|
void OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) override;
|
||||||
|
private:
|
||||||
|
const std::u16string m_EffectType = u"create";
|
||||||
|
const std::string m_LeftPipeEffectName = "LeftPipeOff";
|
||||||
|
const int32_t m_LeftPipeEffectID = 2774;
|
||||||
|
const std::string m_RightPipeEffectName = "RightPipeOff";
|
||||||
|
const int32_t m_RightPipeEffectID = 2777;
|
||||||
|
const std::string m_ImaginationCanisterEffectName = "imagination_canister";
|
||||||
|
const int32_t m_ImaginationCanisterEffectID = 2750;
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user