mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-18 02:32:50 +00:00
feat: add missing force field, jetpack NPC and Skullkin volume scripts
Ported from the live server scripts that ship with the client: - scripts\ai\LS\ForceFieldEffect.lua (LEGO Club and Starbase 3001 force fields): plays effect 3671 "cast" on whatever touches the phantom. - scripts\ai\NP\L_NPC_NP_JETPACK_GUY.lua (jetpack ambient NPCs): plays the object's "launch" effect when used. - scripts\02_server\Map\AM\L_SKELETON_SPAWNER_VOLUME.lua (Crux Prime Skullkin area): with 10 or more players in the volume the Skullkin engineer, miner and patroller networks maintain 2/6/6 instead of 1/4/4, with a 60 second cooldown between changes and a catch-up check when it ends. Only players are counted, and the count never goes below zero. WBL_Enemy_Grabbler.lua only sets wander variables for the old Lua movement AI, so it joins the other alpha wander scripts in the excluded list instead of logging as missing. Refs #746 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
21
dScripts/02_server/Map/AM/AmSkeletonSpawnerVolume.h
Normal file
21
dScripts/02_server/Map/AM/AmSkeletonSpawnerVolume.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
// A volume over the Skullkin area of Crux Prime that spawns more Skullkin while many players are in it.
|
||||
class AmSkeletonSpawnerVolume : public CppScripts::Script {
|
||||
public:
|
||||
void OnStartup(Entity* self) override;
|
||||
void OnCollisionPhantom(Entity* self, Entity* target) override;
|
||||
void OnOffCollisionPhantom(Entity* self, Entity* target) override;
|
||||
void OnTimerDone(Entity* self, std::string timerName) override;
|
||||
|
||||
private:
|
||||
// Sets the spawner networks to the higher or lower counts.
|
||||
static void SetSpawnCounts(Entity* self, bool max);
|
||||
|
||||
// Players needed in the volume for the higher counts.
|
||||
static constexpr int32_t ChangeNum = 10;
|
||||
|
||||
// Seconds after a change before the counts may change again.
|
||||
static constexpr float ChangeCooldown = 60.0f;
|
||||
};
|
||||
Reference in New Issue
Block a user