mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-06 07:18:42 +00:00
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:
21
dScripts/ai/GF/GfOrgan.cpp
Normal file
21
dScripts/ai/GF/GfOrgan.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "GfOrgan.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void GfOrgan::OnUse(Entity* self, Entity* user) {
|
||||
if (self->GetBoolean(u"bIsInUse")) {
|
||||
m_canUse = false;
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, "{15d5f8bd-139a-4c31-8904-970c480cd70f}");
|
||||
self->SetBoolean(u"bIsInUse", true);
|
||||
self->AddTimer("reset", 5.0f);
|
||||
|
||||
GameMessages::SendPlayAnimation(user, u"jig");
|
||||
}
|
||||
|
||||
void GfOrgan::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "reset") {
|
||||
self->SetBoolean(u"bIsInUse", false);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user