mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-08 11:44:11 +00:00
feat: start car races if you "equip" the car near the car pad; add more old ns scripts to ignore list (#1681)
* brother * use some better logic * Implement spider boss msg script tested that the message now shows up when hitting the survival spider entrance area * add drag to start race feature
This commit is contained in:
@@ -329,6 +329,7 @@
|
||||
#include "WblRobotCitizen.h"
|
||||
#include "EnemyClearThreat.h"
|
||||
#include "AgSpiderBossMessage.h"
|
||||
#include "GfRaceInstancer.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
@@ -690,6 +691,7 @@ namespace {
|
||||
{"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenYellow.lua", []() {return new WblRobotCitizen();}},
|
||||
{"scripts\\02_server\\Map\\General\\L_ENEMY_CLEAR_THREAT.lua", []() {return new EnemyClearThreat();}},
|
||||
{"scripts\\ai\\AG\\L_AG_SPIDER_BOSS_MESSAGE.lua", []() {return new AgSpiderBossMessage();}},
|
||||
{"scripts\\ai\\GF\\L_GF_RACE_INSTANCER.lua", []() {return new GfRaceInstancer();}},
|
||||
|
||||
};
|
||||
|
||||
@@ -703,6 +705,8 @@ namespace {
|
||||
"scripts\\zone\\AG\\L_ZONE_AG.lua",
|
||||
"scripts\\zone\\NS\\L_ZONE_NS.lua",
|
||||
"scripts\\zone\\GF\\L_ZONE_GF.lua",
|
||||
"scripts\\ai\\AG\\CONCERT_STAGE.lua",
|
||||
"scripts\\ai\\NS\\L_NS_CAR_MODULAR_BUILD.lua", // In our implementation, this is done in GameMessages.cpp
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -354,7 +354,7 @@ namespace CppScripts {
|
||||
* @param player the player to remove
|
||||
* @param canceled if it was done via the cancel button
|
||||
*/
|
||||
virtual void OnRequestActivityExit(Entity* sender, LWOOBJID player, bool canceled){};
|
||||
virtual void OnRequestActivityExit(Entity* sender, LWOOBJID player, bool canceled) {};
|
||||
};
|
||||
|
||||
Script* const GetScript(Entity* parent, const std::string& scriptName);
|
||||
|
@@ -25,11 +25,10 @@ void AgSpiderBossMessage::MakeBox(Entity* self) const {
|
||||
if (!tgt) return;
|
||||
GameMessages::DisplayTooltip tooltip;
|
||||
tooltip.target = tgt->GetObjectID();
|
||||
tooltip.sysAddr = tgt->GetSystemAddress();
|
||||
tooltip.show = true;
|
||||
tooltip.text = box.boxText;
|
||||
tooltip.time = box.boxTime * 1000; // to ms
|
||||
tooltip.Send();
|
||||
tooltip.Send(tgt->GetSystemAddress());
|
||||
}
|
||||
|
||||
void AgSpiderBossMessage::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
|
@@ -1,4 +1,5 @@
|
||||
set(DSCRIPTS_SOURCES_AI_GF
|
||||
"GfRaceInstancer.cpp"
|
||||
"GfCampfire.cpp"
|
||||
"GfOrgan.cpp"
|
||||
"GfBanana.cpp"
|
||||
|
7
dScripts/ai/GF/GfRaceInstancer.cpp
Normal file
7
dScripts/ai/GF/GfRaceInstancer.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "GfRaceInstancer.h"
|
||||
|
||||
#include "Entity.h"
|
||||
|
||||
void GfRaceInstancer::OnStartup(Entity* self) {
|
||||
self->SetProximityRadius(self->HasVar(u"interaction_distance") ? self->GetVar<float>(u"interaction_distance") : 16.0f, "Interaction_Distance");
|
||||
}
|
11
dScripts/ai/GF/GfRaceInstancer.h
Normal file
11
dScripts/ai/GF/GfRaceInstancer.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef GFRACEINSTANCER_H
|
||||
#define GFRACEINSTANCER_H
|
||||
|
||||
#include "CppScripts.h"
|
||||
|
||||
class GfRaceInstancer : public CppScripts::Script {
|
||||
public:
|
||||
void OnStartup(Entity* self) override;
|
||||
};
|
||||
|
||||
#endif //!GFRACEINSTANCER_H
|
Reference in New Issue
Block a user