mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +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:
12
dScripts/ai/WILD/AllCrateChicken.cpp
Normal file
12
dScripts/ai/WILD/AllCrateChicken.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "AllCrateChicken.h"
|
||||
#include "Entity.h"
|
||||
|
||||
void AllCrateChicken::OnStartup(Entity* self) {
|
||||
self->AddTimer("KillRooster", 4.2f);
|
||||
}
|
||||
|
||||
void AllCrateChicken::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "KillRooster") {
|
||||
self->ScheduleKillAfterUpdate();
|
||||
}
|
||||
}
|
9
dScripts/ai/WILD/AllCrateChicken.h
Normal file
9
dScripts/ai/WILD/AllCrateChicken.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class AllCrateChicken : public CppScripts::Script {
|
||||
public:
|
||||
void OnStartup(Entity* self);
|
||||
void OnTimerDone(Entity* self, std::string timerName);
|
||||
};
|
||||
|
4
dScripts/ai/WILD/CMakeLists.txt
Normal file
4
dScripts/ai/WILD/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
set(DSCRIPTS_SOURCES_AI_WILD
|
||||
"AllCrateChicken.cpp"
|
||||
"WildAmbients.cpp"
|
||||
PARENT_SCOPE)
|
6
dScripts/ai/WILD/WildAmbients.cpp
Normal file
6
dScripts/ai/WILD/WildAmbients.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include "WildAmbients.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void WildAmbients::OnUse(Entity* self, Entity* user) {
|
||||
GameMessages::SendPlayAnimation(self, u"interact");
|
||||
}
|
8
dScripts/ai/WILD/WildAmbients.h
Normal file
8
dScripts/ai/WILD/WildAmbients.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class WildAmbients : public CppScripts::Script
|
||||
{
|
||||
public:
|
||||
void OnUse(Entity* self, Entity* user) override;
|
||||
};
|
Reference in New Issue
Block a user