mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-07-16 00:44:46 +00:00
Implement handling for spawn_pad and spawn_zone
This commit is contained in:
parent
2a0a694ad2
commit
b80f26efe6
6 changed files with 84 additions and 7 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
"IsChildObject": false
|
"IsChildObject": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 8,
|
"Id": 9,
|
||||||
"ObjectName": "order_terminal",
|
"ObjectName": "order_terminal",
|
||||||
"ObjectType": "order_terminal",
|
"ObjectType": "order_terminal",
|
||||||
"Owner": 0,
|
"Owner": 0,
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"IsChildObject": true
|
"IsChildObject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 9,
|
"Id": 10,
|
||||||
"ObjectName": "order_terminal",
|
"ObjectName": "order_terminal",
|
||||||
"ObjectType": "order_terminal",
|
"ObjectType": "order_terminal",
|
||||||
"Owner": 0,
|
"Owner": 0,
|
||||||
|
|
@ -40,6 +40,19 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 6,
|
"Id": 6,
|
||||||
|
"ObjectName": "spawn_pad",
|
||||||
|
"ObjectType": "spawn_pad",
|
||||||
|
"Owner": 0,
|
||||||
|
"AbsX": 500.0,
|
||||||
|
"AbsY": 530.0,
|
||||||
|
"AbsZ": 13.37697,
|
||||||
|
"Yaw": 180.0,
|
||||||
|
"GUID": 833,
|
||||||
|
"MapID": null,
|
||||||
|
"IsChildObject": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": 7,
|
||||||
"ObjectName": "order_terminal",
|
"ObjectName": "order_terminal",
|
||||||
"ObjectType": "order_terminal",
|
"ObjectType": "order_terminal",
|
||||||
"Owner": 0,
|
"Owner": 0,
|
||||||
|
|
@ -52,7 +65,7 @@
|
||||||
"IsChildObject": true
|
"IsChildObject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 10,
|
"Id": 11,
|
||||||
"ObjectName": "order_terminal",
|
"ObjectName": "order_terminal",
|
||||||
"ObjectType": "order_terminal",
|
"ObjectType": "order_terminal",
|
||||||
"Owner": 0,
|
"Owner": 0,
|
||||||
|
|
@ -65,7 +78,7 @@
|
||||||
"IsChildObject": true
|
"IsChildObject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 11,
|
"Id": 12,
|
||||||
"ObjectName": "order_terminal",
|
"ObjectName": "order_terminal",
|
||||||
"ObjectType": "order_terminal",
|
"ObjectType": "order_terminal",
|
||||||
"Owner": 0,
|
"Owner": 0,
|
||||||
|
|
@ -78,7 +91,7 @@
|
||||||
"IsChildObject": true
|
"IsChildObject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 7,
|
"Id": 8,
|
||||||
"ObjectName": "order_terminal",
|
"ObjectName": "order_terminal",
|
||||||
"ObjectType": "order_terminal",
|
"ObjectType": "order_terminal",
|
||||||
"Owner": 0,
|
"Owner": 0,
|
||||||
|
|
@ -104,7 +117,7 @@
|
||||||
"IsChildObject": true
|
"IsChildObject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 12,
|
"Id": 13,
|
||||||
"ObjectName": "order_terminal",
|
"ObjectName": "order_terminal",
|
||||||
"ObjectType": "order_terminal",
|
"ObjectType": "order_terminal",
|
||||||
"Owner": 0,
|
"Owner": 0,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import net.psforever.objects.serverobject.painbox.PainboxDefinition
|
||||||
import net.psforever.objects.serverobject.terminals._
|
import net.psforever.objects.serverobject.terminals._
|
||||||
import net.psforever.objects.serverobject.tube.SpawnTubeDefinition
|
import net.psforever.objects.serverobject.tube.SpawnTubeDefinition
|
||||||
import net.psforever.objects.serverobject.resourcesilo.ResourceSiloDefinition
|
import net.psforever.objects.serverobject.resourcesilo.ResourceSiloDefinition
|
||||||
import net.psforever.objects.serverobject.structures.{AmenityDefinition, BuildingDefinition, WarpGateDefinition}
|
import net.psforever.objects.serverobject.structures.{AmenityDefinition, BuildingDefinition, VirtualTrainingTeleporterDefinition, WarpGateDefinition}
|
||||||
import net.psforever.objects.serverobject.terminals.capture.CaptureTerminalDefinition
|
import net.psforever.objects.serverobject.terminals.capture.CaptureTerminalDefinition
|
||||||
import net.psforever.objects.serverobject.terminals.implant.ImplantTerminalMechDefinition
|
import net.psforever.objects.serverobject.terminals.implant.ImplantTerminalMechDefinition
|
||||||
import net.psforever.objects.serverobject.turret.FacilityTurretDefinition
|
import net.psforever.objects.serverobject.turret.FacilityTurretDefinition
|
||||||
|
|
@ -1281,6 +1281,10 @@ object GlobalDefinitions {
|
||||||
|
|
||||||
val obbasemesh: AmenityDefinition = new AmenityDefinition(598) {}
|
val obbasemesh: AmenityDefinition = new AmenityDefinition(598) {}
|
||||||
|
|
||||||
|
val spawn_pad = new VirtualTrainingTeleporterDefinition()
|
||||||
|
|
||||||
|
val spawn_zone = new VirtualTrainingTeleporterDefinition()
|
||||||
|
|
||||||
val targeting_laser_dispenser = new OrderTerminalDefinition(851)
|
val targeting_laser_dispenser = new OrderTerminalDefinition(851)
|
||||||
|
|
||||||
val stationaryteleportpad = new GenericTeleportationDefinition(836)
|
val stationaryteleportpad = new GenericTeleportationDefinition(836)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
// Copyright (c) 2026 PSForever
|
||||||
|
package net.psforever.objects.serverobject.structures
|
||||||
|
|
||||||
|
import akka.actor.ActorContext
|
||||||
|
import net.psforever.objects.GlobalDefinitions
|
||||||
|
import net.psforever.objects.serverobject.PlanetSideServerObject
|
||||||
|
import net.psforever.types.{PlanetSideEmpire, Vector3}
|
||||||
|
|
||||||
|
class VirtualTrainingTeleporter extends PlanetSideServerObject {
|
||||||
|
def Definition: VirtualTrainingTeleporterDefinition = GlobalDefinitions.spawn_zone
|
||||||
|
|
||||||
|
def Faction: PlanetSideEmpire.Value = PlanetSideEmpire.NEUTRAL
|
||||||
|
}
|
||||||
|
|
||||||
|
object VirtualTrainingTeleporter {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overloaded constructor.
|
||||||
|
* @return the `VirtualTrainingTeleporter` object
|
||||||
|
*/
|
||||||
|
def apply(): VirtualTrainingTeleporter = {
|
||||||
|
new VirtualTrainingTeleporter()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiate an configure a `VirtualTrainingTeleporter` object
|
||||||
|
* @param id the unique id that will be assigned to this entity
|
||||||
|
* @param context a context to allow the object to properly set up `ActorSystem` functionality;
|
||||||
|
* not necessary for this object, but required by signature
|
||||||
|
* @return the `VirtualTrainingTeleporter` object
|
||||||
|
*/
|
||||||
|
def Constructor(id: Int, context: ActorContext): VirtualTrainingTeleporter = {
|
||||||
|
val obj = VirtualTrainingTeleporter()
|
||||||
|
obj
|
||||||
|
}
|
||||||
|
|
||||||
|
def Constructor(pos: Vector3)(id: Int, context: ActorContext): VirtualTrainingTeleporter = {
|
||||||
|
val obj = VirtualTrainingTeleporter()
|
||||||
|
obj.Position = pos
|
||||||
|
obj
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
// Copyright (c) 2026 PSForever
|
||||||
|
package net.psforever.objects.serverobject.structures
|
||||||
|
|
||||||
|
import net.psforever.objects.definition.ObjectDefinition
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shared definition for spawn_pad and spawn_zone objects.
|
||||||
|
*/
|
||||||
|
class VirtualTrainingTeleporterDefinition extends ObjectDefinition(815) {
|
||||||
|
Name = "spawn_zone"
|
||||||
|
}
|
||||||
|
|
@ -422,6 +422,8 @@ object ObjectClass {
|
||||||
final val order_terminalb = 614
|
final val order_terminalb = 614
|
||||||
final val portable_ammo_terminal = 684
|
final val portable_ammo_terminal = 684
|
||||||
final val portable_order_terminal = 690
|
final val portable_order_terminal = 690
|
||||||
|
final val spawn_pad = 800
|
||||||
|
final val spawn_zone = 815
|
||||||
final val targeting_laser_dispenser = 851
|
final val targeting_laser_dispenser = 851
|
||||||
final val teleportpad_terminal = 853
|
final val teleportpad_terminal = 853
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import net.psforever.objects.serverobject.shuttle.OrbitalShuttlePad
|
||||||
import net.psforever.objects.serverobject.structures.{Building, BuildingDefinition, FoundationBuilder, StructureType, WarpGate}
|
import net.psforever.objects.serverobject.structures.{Building, BuildingDefinition, FoundationBuilder, StructureType, WarpGate}
|
||||||
import net.psforever.objects.serverobject.terminals.capture.{CaptureTerminal, CaptureTerminalDefinition}
|
import net.psforever.objects.serverobject.terminals.capture.{CaptureTerminal, CaptureTerminalDefinition}
|
||||||
import net.psforever.objects.serverobject.terminals.implant.{ImplantTerminalInterface, ImplantTerminalMech}
|
import net.psforever.objects.serverobject.terminals.implant.{ImplantTerminalInterface, ImplantTerminalMech}
|
||||||
|
import net.psforever.objects.serverobject.structures.VirtualTrainingTeleporter
|
||||||
import net.psforever.objects.serverobject.tube.SpawnTube
|
import net.psforever.objects.serverobject.tube.SpawnTube
|
||||||
import net.psforever.objects.serverobject.turret.{FacilityTurret, FacilityTurretDefinition, VanuSentry}
|
import net.psforever.objects.serverobject.turret.{FacilityTurret, FacilityTurretDefinition, VanuSentry}
|
||||||
import net.psforever.objects.serverobject.zipline.ZipLinePath
|
import net.psforever.objects.serverobject.zipline.ZipLinePath
|
||||||
|
|
@ -710,6 +711,10 @@ object Zones {
|
||||||
)
|
)
|
||||||
zoneMap.linkShuttleToBay(obj.guid)
|
zoneMap.linkShuttleToBay(obj.guid)
|
||||||
|
|
||||||
|
case "spawn_pad" | "spawn_zone" =>
|
||||||
|
zoneMap
|
||||||
|
.addLocalObject(obj.guid, VirtualTrainingTeleporter.Constructor(obj.position))
|
||||||
|
|
||||||
case _ => ()
|
case _ => ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue