Instant Action / Recall to Sanctuary (#348)

* refactored ZoneActor for external calls; earliest code for calculating Instant Action placement

* created a building definition so that SOI is no longer indeterminate; gave hot spots projector a longer-lasting backup for purposes of activity retention; instant action ramp-up works

* filled out instant action messages; refactored main method

* packet and initial tests for DroppodFreefallingMessage; drop pod definition, packet converter, and consideration in WSA and InterstellarCluster instant action functionality; droppods now work

* duplicated soi information; modified priority of instant action; assigned cavern status; added reset for instant action failure; implant interrupt condition; wrote comments

* no instant action droppods; added messages for cancelling instant action when certain conditions occur; wilderness instant action request

* made generic the entire instant action process to shoehorn the whole of the sanctuary recall process into it; I hope you're happy

* test fix; vehicle hacking fix; no more artificial NTU drain

* escape case for zoning last chance; descriptive mesages condense similar calls

* something of a merge repair
This commit is contained in:
Fate-JH 2020-04-16 21:21:33 -04:00 committed by GitHub
parent c80bb2836f
commit a23643b240
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 1342 additions and 460 deletions

View file

@ -0,0 +1,40 @@
// Copyright (c) 2017 PSForever
package game
import org.specs2.mutable._
import net.psforever.packet._
import net.psforever.packet.game._
import net.psforever.types.{PlanetSideGUID, Vector3}
import scodec.bits._
class DroppodFreefallingMessageTest extends Specification {
val string = hex"68 220e 00e0b245 00c06145 00a08744 00000000 00000000 ffff79c4 0740b245 22c66145 00608144 00 67 3f 00 00 3f"
"DroppodFreefallingMessage" should {
"decode" in {
PacketCoding.DecodePacket(string).require match {
case DroppodFreefallingMessage(guid, pos, vel, pos2, orientation1, orientation2) =>
guid mustEqual PlanetSideGUID(3618)
pos mustEqual Vector3(5724, 3612, 1085)
vel mustEqual Vector3(0, 0, -999.99994f)
pos2 mustEqual Vector3(5704.0034f, 3612.3833f, 1035.0f)
orientation1 mustEqual Vector3(0, 70.3125f, 272.8125f)
orientation2 mustEqual Vector3(0, 0, 272.8125f)
case _ =>
ko
}
}
"encode" in {
val msg = DroppodFreefallingMessage(
PlanetSideGUID(3618),
Vector3(5724, 3612, 1085),
Vector3(0, 0, -999.99994f),
Vector3(5704.0034f, 3612.3833f, 1035.0f),
Vector3(0, 70.3125f, 272.8125f), Vector3(0, 0, 272.8125f))
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
}

View file

@ -100,7 +100,7 @@ class ImplantTerminalMechObjectBuilderTest extends ActorTest {
"Implant terminal mech object" should {
"build" in {
val hub = ServerObjectBuilderTest.NumberPoolHub
val actor = system.actorOf(Props(classOf[ServerObjectBuilderTest.BuilderTestActor], ServerObjectBuilder(1, ImplantTerminalMech.Constructor), hub), "mech")
val actor = system.actorOf(Props(classOf[ServerObjectBuilderTest.BuilderTestActor], ServerObjectBuilder(1, ImplantTerminalMech.Constructor(Vector3.Zero)), hub), "mech")
actor ! "!"
val reply = receiveOne(Duration.create(1000, "ms"))