mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-04-25 14:25:27 +00:00
Vehicles Must Be Destroyed (#390)
* internalized the actions of the VehicleRemover into the vehicle control agency; this required modifications to vehicle deconstruction messaging, but also had implications for the vehicle spawn pad * fixed tests; created a with-context ActorTest environment; hacked away the unnecessary aspects of VehicleRemover * changes to tests; simplifications to terminated cargoing abilities * removing unnecessary indirection from cargo handling at the end of a vehicle's life
This commit is contained in:
parent
58134e02fa
commit
9f12cfa625
21 changed files with 553 additions and 346 deletions
|
|
@ -21,7 +21,7 @@ import net.psforever.objects.vital.Vitality
|
|||
import net.psforever.objects.zones.{Zone, ZoneMap}
|
||||
import net.psforever.packet.game.DamageWithPositionMessage
|
||||
import net.psforever.types._
|
||||
import services.{RemoverActor, Service}
|
||||
import services.Service
|
||||
import services.avatar.{AvatarAction, AvatarServiceMessage}
|
||||
import services.support.SupportActor
|
||||
import services.vehicle.support.TurretUpgrader
|
||||
|
|
@ -1307,7 +1307,6 @@ class DamageableVehicleDestroyTest extends ActorTest {
|
|||
atv.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg124 = avatarProbe.receiveN(3, 500 milliseconds)
|
||||
val msg3 = player2Probe.receiveOne(200 milliseconds)
|
||||
val msg567 = vehicleProbe.receiveN(2, 200 milliseconds)
|
||||
assert(
|
||||
msg124.head match {
|
||||
case AvatarServiceMessage("test", AvatarAction.PlanetsideAttributeToAll(PlanetSideGUID(1), 0, _)) => true
|
||||
|
|
@ -1332,18 +1331,6 @@ class DamageableVehicleDestroyTest extends ActorTest {
|
|||
case _ => false
|
||||
}
|
||||
)
|
||||
assert(
|
||||
msg567.head match {
|
||||
case VehicleServiceMessage.Decon(SupportActor.ClearSpecific(List(target), _zone)) if (target eq atv) && (_zone eq zone) => true
|
||||
case _ => false
|
||||
}
|
||||
)
|
||||
assert(
|
||||
msg567(1) match {
|
||||
case VehicleServiceMessage.Decon(RemoverActor.AddTask(target, _zone, _)) if (target eq atv) && (_zone eq zone) => true
|
||||
case _ => false
|
||||
}
|
||||
)
|
||||
assert(atv.Health <= atv.Definition.DamageDestroysAt)
|
||||
assert(atv.Destroyed)
|
||||
//
|
||||
|
|
@ -1467,7 +1454,7 @@ class DamageableVehicleDestroyMountedTest extends ActorTest {
|
|||
player2Probe.expectNoMsg(10 milliseconds)
|
||||
val msg_player3 = player3Probe.receiveOne(200 milliseconds)
|
||||
player3Probe.expectNoMsg(10 milliseconds)
|
||||
val msg_vehicle = vehicleProbe.receiveN(6, 200 milliseconds)
|
||||
val msg_vehicle = vehicleProbe.receiveN(2, 200 milliseconds)
|
||||
vehicleProbe.expectNoMsg(10 milliseconds)
|
||||
assert(
|
||||
msg_avatar.exists( {
|
||||
|
|
@ -1511,30 +1498,6 @@ class DamageableVehicleDestroyMountedTest extends ActorTest {
|
|||
case _ => false
|
||||
}
|
||||
)
|
||||
assert(
|
||||
msg_vehicle.exists( {
|
||||
case VehicleServiceMessage.Decon(SupportActor.ClearSpecific(List(target), _zone)) if (target eq lodestar) && (_zone eq zone) => true
|
||||
case _ => false
|
||||
})
|
||||
)
|
||||
assert(
|
||||
msg_vehicle.exists( {
|
||||
case VehicleServiceMessage.Decon(RemoverActor.AddTask(target, _zone, _)) if (target eq lodestar) && (_zone eq zone) => true
|
||||
case _ => false
|
||||
})
|
||||
)
|
||||
assert(
|
||||
msg_vehicle.exists( {
|
||||
case VehicleServiceMessage.Decon(SupportActor.ClearSpecific(List(target), _zone)) if (target eq atv) && (_zone eq zone) => true
|
||||
case _ => false
|
||||
})
|
||||
)
|
||||
assert(
|
||||
msg_vehicle.exists( {
|
||||
case VehicleServiceMessage.Decon(RemoverActor.AddTask(target, _zone, _)) if (target eq atv) && (_zone eq zone) => true
|
||||
case _ => false
|
||||
})
|
||||
)
|
||||
assert(
|
||||
msg_vehicle.exists( {
|
||||
case VehicleServiceMessage("test", VehicleAction.PlanetsideAttribute(Service.defaultPlayerGUID, PlanetSideGUID(4), 27, 0))=> true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue