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:
Aaron Kimbrell
2026-09-26 18:42:25 -05:00
parent c485ab2d38
commit 4ad7ddd9c6
10 changed files with 141 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
set(DSCRIPTS_SOURCES_AI_GENERAL
"ForceFieldEffect.cpp"
"InstanceExitTransferPlayerToLastNonInstance.cpp"
"LegoDieRoll.cpp")

View File

@@ -0,0 +1,10 @@
#include "ForceFieldEffect.h"
#include "Entity.h"
#include "GameMessages.h"
void ForceFieldEffect::OnCollisionPhantom(Entity* self, Entity* target) {
if (!target) return;
GameMessages::SendPlayFXEffect(target, 3671, u"cast", "", LWOOBJID_EMPTY);
}

View File

@@ -0,0 +1,8 @@
#pragma once
#include "CppScripts.h"
// Plays a sparkle effect on anything that touches this phantom physics object.
class ForceFieldEffect : public CppScripts::Script {
public:
void OnCollisionPhantom(Entity* self, Entity* target) override;
};

View File

@@ -1,4 +1,5 @@
set(DSCRIPTS_SOURCES_AI_NP
"NpcNpJetpackGuy.cpp"
"NpcNpSpacemanBob.cpp")
add_library(dScriptsAiNP OBJECT ${DSCRIPTS_SOURCES_AI_NP})

View File

@@ -0,0 +1,9 @@
#include "NpcNpJetpackGuy.h"
#include "Entity.h"
#include "GameMessages.h"
void NpcNpJetpackGuy::OnUse(Entity* self, Entity* user) {
// No effect ID, the client plays the object's own effect of this type.
GameMessages::SendPlayFXEffect(self, -1, u"launch", "", LWOOBJID_EMPTY);
}

View File

@@ -0,0 +1,8 @@
#pragma once
#include "CppScripts.h"
// Plays the launch effect when a player talks to the jetpack NPC.
class NpcNpJetpackGuy : public CppScripts::Script {
public:
void OnUse(Entity* self, Entity* user) override;
};