PSF-LoginServer/src/test/scala/objects/VehicleControlTest.scala

946 lines
34 KiB
Scala
Raw Normal View History

Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
// Copyright (c) 2020 PSForever
package objects
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
import akka.actor.{ActorRef, Props}
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
import akka.actor.typed.scaladsl.adapter._
import akka.testkit.TestProbe
import base.{ActorTest, FreedContextActorTest}
import net.psforever.actors.zone.ZoneActor
import net.psforever.objects.avatar.{Avatar, PlayerControl}
import net.psforever.objects.{GlobalDefinitions, Player, Vehicle}
import net.psforever.objects.guid.NumberPoolHub
import net.psforever.objects.guid.source.MaxNumberSource
import net.psforever.objects.serverobject.environment._
import net.psforever.objects.serverobject.mount.Mountable
import net.psforever.objects.vehicles.{VehicleControl, VehicleLockState}
import net.psforever.objects.vital.VehicleShieldCharge
import net.psforever.objects.zones.{Zone, ZoneMap}
import net.psforever.packet.game.{CargoMountPointStatusMessage, ObjectDetachMessage, PlanetsideAttributeMessage}
import net.psforever.services.ServiceManager
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
import net.psforever.services.vehicle.{VehicleAction, VehicleServiceMessage}
import net.psforever.types._
import scala.concurrent.duration._
class VehicleControlPrepareForDeletionTest extends ActorTest {
val vehicle = Vehicle(GlobalDefinitions.two_man_assault_buggy)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
val vehicleProbe = new TestProbe(system)
vehicle.Zone = new Zone("test", new ZoneMap("test"), 0) {
VehicleEvents = vehicleProbe.ref
}
vehicle.GUID = PlanetSideGUID(1)
expectNoMessage(200 milliseconds)
"VehicleControl" should {
"submit for unregistering when marked for deconstruction" in {
vehicle.Actor ! Vehicle.Deconstruct()
vehicleProbe.expectNoMessage(5 seconds)
}
}
}
class VehicleControlPrepareForDeletionPassengerTest extends ActorTest {
val vehicle = Vehicle(GlobalDefinitions.two_man_assault_buggy)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
val vehicleProbe = new TestProbe(system)
vehicle.Zone = new Zone("test", new ZoneMap("test"), 0) {
VehicleEvents = vehicleProbe.ref
}
val player1 = Player(VehicleTest.avatar1)
vehicle.GUID = PlanetSideGUID(1)
player1.GUID = PlanetSideGUID(2)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(1).mount(player1) //passenger mount
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
expectNoMessage(200 milliseconds)
"VehicleControl" should {
"kick all players when marked for deconstruction" in {
vehicle.Actor ! Vehicle.Deconstruct()
val vehicle_msg = vehicleProbe.receiveN(1, 500 milliseconds)
assert(
vehicle_msg.head match {
case VehicleServiceMessage(
"test",
VehicleAction.KickPassenger(PlanetSideGUID(2), 4, false, PlanetSideGUID(1))
) =>
true
case _ => false
}
)
assert(player1.VehicleSeated.isEmpty)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(vehicle.Seats(1).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}
}
}
class VehicleControlPrepareForDeletionMountedInTest extends FreedContextActorTest {
ServiceManager.boot
val guid = new NumberPoolHub(new MaxNumberSource(10))
val zone = new Zone("test", new ZoneMap("test"), 0) {
GUID(guid)
override def SetupNumberPools(): Unit = {}
}
zone.actor = system.spawn(ZoneActor(zone), "test-zone-actor")
// crappy workaround but without it the zone doesn't get initialized in time
expectNoMessage(400 milliseconds)
val vehicle = Vehicle(GlobalDefinitions.two_man_assault_buggy)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test-cargo")
vehicle.Zone = zone
val lodestar = Vehicle(GlobalDefinitions.lodestar)
lodestar.Faction = PlanetSideEmpire.TR
val player1 = Player(VehicleTest.avatar1) //name="test1"
val player2 = Player(VehicleTest.avatar2) //name="test2"
guid.register(vehicle, 1)
guid.register(lodestar, 2)
player1.GUID = PlanetSideGUID(3)
var utilityId = 10
lodestar.Utilities.values.foreach { util =>
util().GUID = PlanetSideGUID(utilityId)
utilityId += 1
}
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(1).mount(player1) //passenger mount
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
lodestar.Seats(0).mount(player2)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player2.VehicleSeated = lodestar.GUID
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
lodestar.CargoHolds(1).mount(vehicle)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.MountedIn = lodestar.GUID
val vehicleProbe = new TestProbe(system)
zone.VehicleEvents = vehicleProbe.ref
zone.Transport ! Zone.Vehicle.Spawn(lodestar) //can not fake this
"VehicleControl" should {
"if mounted as cargo, self-eject when marked for deconstruction" in {
vehicle.Actor ! Vehicle.Deconstruct()
val vehicle_msg = vehicleProbe.receiveN(6, 500 milliseconds)
//dismounting as cargo messages
assert(
vehicle_msg.head match {
case VehicleServiceMessage(
_,
VehicleAction.SendResponse(_, PlanetsideAttributeMessage(PlanetSideGUID(1), 0, _))
) =>
true
case _ => false
}
)
assert(
vehicle_msg(1) match {
case VehicleServiceMessage(
_,
VehicleAction.SendResponse(_, PlanetsideAttributeMessage(PlanetSideGUID(1), 68, _))
) =>
true
case _ => false
}
)
assert(
vehicle_msg(2) match {
case VehicleServiceMessage(
"test",
VehicleAction.SendResponse(
_,
CargoMountPointStatusMessage(PlanetSideGUID(2), _, PlanetSideGUID(1), _, 1, CargoStatus.InProgress, 0)
)
) =>
true
case _ => false
}
)
assert(
vehicle_msg(3) match {
case VehicleServiceMessage(
"test",
VehicleAction.SendResponse(_, ObjectDetachMessage(PlanetSideGUID(2), PlanetSideGUID(1), _, _, _, _))
) =>
true
case _ => false
}
)
assert(
vehicle_msg(4) match {
case VehicleServiceMessage(
"test",
VehicleAction.SendResponse(
_,
CargoMountPointStatusMessage(PlanetSideGUID(2), _, _, PlanetSideGUID(1), 1, CargoStatus.Empty, 0)
)
) =>
true
case _ => false
}
)
//dismounting as cargo messages
//TODO: does not actually kick out the cargo, but instigates the process
assert(
vehicle_msg(5) match {
case VehicleServiceMessage(
"test",
VehicleAction.KickPassenger(PlanetSideGUID(3), 4, false, PlanetSideGUID(1))
) =>
true
case _ => false
}
)
assert(player1.VehicleSeated.isEmpty)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(vehicle.Seats(1).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}
}
}
class VehicleControlPrepareForDeletionMountedCargoTest extends FreedContextActorTest {
val guid = new NumberPoolHub(new MaxNumberSource(10))
ServiceManager.boot
val zone = new Zone("test", new ZoneMap("test"), 0) {
GUID(guid)
override def SetupNumberPools(): Unit = {}
}
zone.actor = system.spawn(ZoneActor(zone), "test-zone-actor")
// crappy workaround but without it the zone doesn't get initialized in time
expectNoMessage(200 milliseconds)
val vehicle = Vehicle(GlobalDefinitions.two_man_assault_buggy)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.Zone = zone
val cargoProbe = new TestProbe(system)
vehicle.Actor = cargoProbe.ref
val lodestar = Vehicle(GlobalDefinitions.lodestar)
lodestar.Faction = PlanetSideEmpire.TR
val player1 = Player(VehicleTest.avatar1) //name="test1"
val player2 = Player(VehicleTest.avatar2) //name="test2"
guid.register(vehicle, 1)
guid.register(lodestar, 2)
player1.GUID = PlanetSideGUID(3)
player2.GUID = PlanetSideGUID(4)
var utilityId = 10
lodestar.Utilities.values.foreach { util =>
util().GUID = PlanetSideGUID(utilityId)
utilityId += 1
}
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(1).mount(player1) //passenger mount
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
lodestar.Seats(0).mount(player2)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player2.VehicleSeated = lodestar.GUID
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
lodestar.CargoHolds(1).mount(vehicle)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.MountedIn = lodestar.GUID
val vehicleProbe = new TestProbe(system)
zone.VehicleEvents = vehicleProbe.ref
zone.Transport ! Zone.Vehicle.Spawn(lodestar) //can not fake this
"VehicleControl" should {
"if with mounted cargo, eject it when marked for deconstruction" in {
lodestar.Actor ! Vehicle.Deconstruct()
val vehicle_msg = vehicleProbe.receiveN(6, 500 milliseconds)
assert(
vehicle_msg.head match {
case VehicleServiceMessage(
"test",
VehicleAction.KickPassenger(PlanetSideGUID(4), 4, false, PlanetSideGUID(2))
) =>
true
case _ => false
}
)
assert(player2.VehicleSeated.isEmpty)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(lodestar.Seats(0).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
//cargo dismounting messages
assert(
vehicle_msg(1) match {
case VehicleServiceMessage(
_,
VehicleAction.SendResponse(_, PlanetsideAttributeMessage(PlanetSideGUID(1), 0, _))
) =>
true
case _ => false
}
)
assert(
vehicle_msg(2) match {
case VehicleServiceMessage(
_,
VehicleAction.SendResponse(_, PlanetsideAttributeMessage(PlanetSideGUID(1), 68, _))
) =>
true
case _ => false
}
)
assert(
vehicle_msg(3) match {
case VehicleServiceMessage(
"test",
VehicleAction.SendResponse(
_,
CargoMountPointStatusMessage(PlanetSideGUID(2), _, PlanetSideGUID(1), _, 1, CargoStatus.InProgress, 0)
)
) =>
true
case _ => false
}
)
assert(
vehicle_msg(4) match {
case VehicleServiceMessage(
"test",
VehicleAction.SendResponse(_, ObjectDetachMessage(PlanetSideGUID(2), PlanetSideGUID(1), _, _, _, _))
) =>
true
case _ => false
}
)
assert(
vehicle_msg(5) match {
case VehicleServiceMessage(
"test",
VehicleAction.SendResponse(
_,
CargoMountPointStatusMessage(PlanetSideGUID(2), _, _, PlanetSideGUID(1), 1, CargoStatus.Empty, 0)
)
) =>
true
case _ => false
}
)
}
}
}
class VehicleControlMountingBlockedExosuitTest extends ActorTest {
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
val catchallProbe = new TestProbe(system)
val catchall = catchallProbe.ref
val zone = new Zone("test", new ZoneMap("test-map"), 0) {
override def SetupNumberPools(): Unit = {}
override def AvatarEvents: ActorRef = catchall
override def LocalEvents: ActorRef = catchall
override def VehicleEvents: ActorRef = catchall
override def Activity: ActorRef = catchall
}
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val vehicle = Vehicle(GlobalDefinitions.apc_tr)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.GUID = PlanetSideGUID(10)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Zone = zone
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
2021-02-02 21:59:46 +00:00
val vehicle2 = Vehicle(GlobalDefinitions.lightning)
vehicle2.Faction = PlanetSideEmpire.TR
vehicle2.GUID = PlanetSideGUID(11)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle2.Zone = zone
2021-02-02 21:59:46 +00:00
vehicle2.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle2), "vehicle2-test")
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val player1 = Player(VehicleTest.avatar1)
player1.ExoSuit = ExoSuitType.Reinforced
player1.GUID = PlanetSideGUID(1)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
player1.Zone = zone
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val player2 = Player(VehicleTest.avatar1)
player2.ExoSuit = ExoSuitType.MAX
player2.GUID = PlanetSideGUID(2)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
player2.Zone = zone
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val player3 = Player(VehicleTest.avatar1)
player3.ExoSuit = ExoSuitType.Agile
player3.GUID = PlanetSideGUID(3)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
player3.Zone = zone
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
"Vehicle Control" should {
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
"block players from sitting if their exo-suit is not allowed by the mount - apc_tr" in {
val probe = new TestProbe(system)
2021-02-02 21:59:46 +00:00
// disallow
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player2, 1), probe.ref) //MAX in non-Max mount
VehicleControlTest.checkCanNotMount(probe, "MAX in non-Max mount 1")
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player2, 2), probe.ref) //MAX in non-MAX mount
VehicleControlTest.checkCanNotMount(probe, "MAX in non-MAX mount 2")
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player1, 11), probe.ref) //Reinforced in MAX-only mount
VehicleControlTest.checkCanNotMount(probe, "Reinforced in MAX-only mount")
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player3, 11), probe.ref) //Agile in MAX-only mount
VehicleControlTest.checkCanNotMount(probe, "Agile in MAX-only mount")
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
//allow
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player1, 1), probe.ref) // Reinforced in driver mount allowing all except MAX
VehicleControlTest.checkCanMount(probe, "Reinforced in driver mount allowing all except MAX")
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
// Reset to allow further driver mount mounting tests
vehicle.Actor.tell(Mountable.TryDismount(player1, 0), probe.ref)
probe.receiveOne(500 milliseconds) //discard
vehicle.Owner = None //ensure
vehicle.OwnerName = None //ensure
vehicle.Actor.tell(Mountable.TryMount(player3, 1), probe.ref) // Agile in driver mount allowing all except MAX
VehicleControlTest.checkCanMount(probe, "Agile in driver mount allowing all except MAX")
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player1, 3), probe.ref) // Reinforced in passenger mount allowing all except MAX
VehicleControlTest.checkCanMount(probe, "Reinforced in passenger mount allowing all except MAX")
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player2, 11), probe.ref) // MAX in MAX-only mount
VehicleControlTest.checkCanMount(probe, "MAX in MAX-only mount")
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}
}
}
class VehicleControlMountingBlockedSeatPermissionTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.apc_tr)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
val player1 = Player(VehicleTest.avatar1)
player1.GUID = PlanetSideGUID(1)
val player2 = Player(VehicleTest.avatar1)
player2.GUID = PlanetSideGUID(2)
"Vehicle Control" should {
//11 June 2018: Group is not supported yet so do not bother testing it
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
"block players from sitting if the mount does not allow it" in {
vehicle.PermissionGroup(2, 3) //passenger group -> empire
vehicle.Actor.tell(Mountable.TryMount(player1, 4), probe.ref) //passenger mount
VehicleControlTest.checkCanMount(probe, "")
vehicle.PermissionGroup(2, 0) //passenger group -> locked
vehicle.Actor.tell(Mountable.TryMount(player2, 5), probe.ref) //passenger mount
VehicleControlTest.checkCanNotMount(probe, "")
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}
}
}
class VehicleControlMountingDriverSeatTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.apc_tr)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
val player1 = Player(VehicleTest.avatar1)
player1.GUID = PlanetSideGUID(1)
"Vehicle Control" should {
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
"allow players to sit in the driver mount, even if it is locked, if the vehicle is unowned" in {
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
assert(vehicle.PermissionGroup(0).contains(VehicleLockState.Locked)) //driver group -> locked
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(vehicle.Seats(0).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
assert(vehicle.Owner.isEmpty)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player1, 1), probe.ref)
VehicleControlTest.checkCanMount(probe, "")
assert(vehicle.Seats(0).occupant.nonEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}
}
}
class VehicleControlMountingOwnedLockedDriverSeatTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.apc_tr)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
val player1 = Player(VehicleTest.avatar1)
player1.GUID = PlanetSideGUID(1)
val player2 = Player(VehicleTest.avatar1)
player2.GUID = PlanetSideGUID(2)
"Vehicle Control" should {
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
"block players that are not the current owner from sitting in the driver mount (locked)" in {
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
assert(vehicle.PermissionGroup(0).contains(VehicleLockState.Locked)) //driver group -> locked
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(vehicle.Seats(0).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.Owner = player1.GUID
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player1, 1), probe.ref)
VehicleControlTest.checkCanMount(probe, "")
assert(vehicle.Seats(0).occupant.nonEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.Actor.tell(Mountable.TryDismount(player1, 0), probe.ref)
probe.receiveOne(Duration.create(100, "ms")) //discard
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(vehicle.Seats(0).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player2, 1), probe.ref)
VehicleControlTest.checkCanNotMount(probe, "")
assert(vehicle.Seats(0).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}
}
}
class VehicleControlMountingOwnedUnlockedDriverSeatTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.apc_tr)
vehicle.Faction = PlanetSideEmpire.TR
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
val player1 = Player(VehicleTest.avatar1)
player1.GUID = PlanetSideGUID(1)
val player2 = Player(VehicleTest.avatar1)
player2.GUID = PlanetSideGUID(2)
"Vehicle Control" should {
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
"allow players that are not the current owner to sit in the driver mount (empire)" in {
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.PermissionGroup(0, 3) //passenger group -> empire
assert(vehicle.PermissionGroup(0).contains(VehicleLockState.Empire)) //driver group -> empire
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(vehicle.Seats(0).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.Owner = player1.GUID //owner set
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player1, 1), probe.ref)
VehicleControlTest.checkCanMount(probe, "")
assert(vehicle.Seats(0).occupant.nonEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
vehicle.Actor.tell(Mountable.TryDismount(player1, 0), probe.ref)
probe.receiveOne(Duration.create(100, "ms")) //discard
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
assert(vehicle.Seats(0).occupant.isEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Actor.tell(Mountable.TryMount(player2, 1), probe.ref)
VehicleControlTest.checkCanMount(probe, "")
assert(vehicle.Seats(0).occupant.nonEmpty)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}
}
}
class VehicleControlShieldsChargingTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.fury)
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
vehicle.Zone = new Zone("test", new ZoneMap("test"), 0) {
VehicleEvents = probe.ref
}
"charge vehicle shields" in {
assert(vehicle.Shields == 0)
assert(!vehicle.History.exists({ p => p.isInstanceOf[VehicleShieldCharge] }))
vehicle.Actor ! Vehicle.ChargeShields(15)
val msg = probe.receiveOne(500 milliseconds)
assert(msg match {
case VehicleServiceMessage(_, VehicleAction.PlanetsideAttribute(_, PlanetSideGUID(10), 68, 15)) => true
case _ => false
})
assert(vehicle.Shields == 15)
assert(vehicle.History.exists({ p => p.isInstanceOf[VehicleShieldCharge] }))
}
}
class VehicleControlShieldsNotChargingVehicleDeadTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.fury)
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
vehicle.Zone = new Zone("test", new ZoneMap("test"), 0) {
VehicleEvents = probe.ref
}
"not charge vehicle shields if the vehicle is destroyed" in {
assert(vehicle.Health > 0)
vehicle.Health = 0
assert(vehicle.Health == 0)
assert(vehicle.Shields == 0)
assert(!vehicle.History.exists({ p => p.isInstanceOf[VehicleShieldCharge] }))
vehicle.Actor.tell(Vehicle.ChargeShields(15), probe.ref)
probe.expectNoMessage(1 seconds)
assert(vehicle.Shields == 0)
assert(!vehicle.History.exists({ p => p.isInstanceOf[VehicleShieldCharge] }))
}
}
class VehicleControlShieldsNotChargingVehicleShieldsFullTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.fury)
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
vehicle.Zone = new Zone("test", new ZoneMap("test"), 0) {
VehicleEvents = probe.ref
}
"not charge vehicle shields if the vehicle is destroyed" in {
assert(vehicle.Shields == 0)
vehicle.Shields = vehicle.MaxShields
assert(vehicle.Shields == vehicle.MaxShields)
assert(!vehicle.History.exists({ p => p.isInstanceOf[VehicleShieldCharge] }))
vehicle.Actor ! Vehicle.ChargeShields(15)
probe.expectNoMessage(1 seconds)
assert(!vehicle.History.exists({ p => p.isInstanceOf[VehicleShieldCharge] }))
}
}
class VehicleControlShieldsNotChargingTooEarlyTest extends ActorTest {
val probe = new TestProbe(system)
val vehicle = Vehicle(GlobalDefinitions.fury)
vehicle.GUID = PlanetSideGUID(10)
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
vehicle.Zone = new Zone("test", new ZoneMap("test"), 0) {
VehicleEvents = probe.ref
}
"charge vehicle shields" in {
assert(vehicle.Shields == 0)
vehicle.Actor ! Vehicle.ChargeShields(15)
val msg = probe.receiveOne(200 milliseconds)
//assert(msg.isInstanceOf[Vehicle.UpdateShieldsCharge])
assert(msg match {
case VehicleServiceMessage(_, VehicleAction.PlanetsideAttribute(_, PlanetSideGUID(10), 68, 15)) => true
case _ => false
})
assert(vehicle.Shields == 15)
vehicle.Actor ! Vehicle.ChargeShields(15)
probe.expectNoMessage(200 milliseconds)
assert(vehicle.Shields == 15)
}
}
//TODO implement message protocol for zone startup completion
//class VehicleControlShieldsNotChargingDamagedTest extends ActorTest {
// val probe = new TestProbe(system)
// val vehicle = Vehicle(GlobalDefinitions.fury)
// vehicle.GUID = PlanetSideGUID(10)
// vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-test")
// vehicle.Zone = new Zone("test", new ZoneMap("test"), 0) {
// VehicleEvents = probe.ref
// }
// //
// val beamer_wep = Tool(GlobalDefinitions.beamer)
// val p_source = PlayerSource( Player(Avatar(0, "TestTarget", PlanetSideEmpire.NC, CharacterSex.Female, 1, CharacterVoice.Mute)) )
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
// val projectile = Projectile(beamer_wep.Projectile, GlobalDefinitions.beamer, beamer_wep.FireMode, p_source, GlobalDefinitions.beamer.ObjectId, Vector3.Zero, Vector3.Zero)
// val fury_dm = Vehicle(GlobalDefinitions.fury).DamageModel
// val obj = DamageInteraction(p_source, ProjectileReason(DamageResolution.Hit, projectile, fury_dm), Vector3(1.2f, 3.4f, 5.6f))
//
// "not charge vehicle shields if recently damaged" in {
// assert(vehicle.Shields == 0)
// vehicle.Actor.tell(Vitality.Damage({case v : Vehicle => v.History(obj); obj }), probe.ref)
//
// val msg = probe.receiveOne(200 milliseconds)
// assert(msg.isInstanceOf[Vitality.DamageResolution])
// assert(vehicle.Shields == 0)
// vehicle.Actor.tell(Vehicle.ChargeShields(15), probe.ref)
//
// probe.expectNoMessage(200 milliseconds)
// assert(vehicle.Shields == 0)
// }
//}
class VehicleControlInteractWithWaterPartialTest extends ActorTest {
val vehicle = Vehicle(GlobalDefinitions.fury) //guid=2
val player1 =
Player(Avatar(0, "TestCharacter1", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute)) //guid=1
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val playerProbe = TestProbe()
val guid = new NumberPoolHub(new MaxNumberSource(15))
val pool = Pool(EnvironmentAttribute.Water, DeepSquare(-1, 10, 10, 0, 0))
val zone = new Zone(
id = "test-zone",
new ZoneMap(name = "test-map") {
environment = List(pool)
},
zoneNumber = 0
) {
override def SetupNumberPools() = {}
GUID(guid)
override def LivePlayers = List(player1)
override def Vehicles = List(vehicle)
}
guid.register(player1, 1)
guid.register(vehicle, 2)
player1.Zone = zone
player1.Spawn()
vehicle.Zone = zone
vehicle.Faction = PlanetSideEmpire.TR
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(0).mount(player1)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
player1.Actor = playerProbe.ref
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-control")
"VehicleControl" should {
"causes disability when the vehicle drives too deep in water (check driver messaging)" in {
vehicle.Position = Vector3(5,5,-3) //right in the pool
vehicle.zoneInteraction() //trigger
val msg_drown = playerProbe.receiveOne(250 milliseconds)
assert(
msg_drown match {
case InteractWithEnvironment(
p1,
p2,
Some(OxygenStateTarget(PlanetSideGUID(2), OxygenState.Suffocation, 100f))
) => (p1 eq player1) && (p2 eq pool)
case _ => false
}
)
}
}
}
class VehicleControlInteractWithWaterTest extends ActorTest {
val vehicle = Vehicle(GlobalDefinitions.fury) //guid=2
val player1 =
Player(Avatar(0, "TestCharacter1", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute)) //guid=1
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val avatarProbe = TestProbe()
val vehicleProbe = TestProbe()
val guid = new NumberPoolHub(new MaxNumberSource(15))
val pool = Pool(EnvironmentAttribute.Water, DeepSquare(-1, 10, 10, 0, 0))
val zone = new Zone(
id = "test-zone",
new ZoneMap(name = "test-map") {
environment = List(pool)
},
zoneNumber = 0
) {
override def SetupNumberPools() = {}
GUID(guid)
override def LivePlayers = List(player1)
override def Vehicles = List(vehicle)
override def AvatarEvents = avatarProbe.ref
override def VehicleEvents = vehicleProbe.ref
}
guid.register(player1, 1)
guid.register(vehicle, 2)
guid.register(player1.avatar.locker, 5)
player1.Zone = zone
player1.Spawn()
vehicle.Zone = zone
vehicle.Faction = PlanetSideEmpire.TR
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(0).mount(player1)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
val (probe, avatarActor) = PlayerControlTest.DummyAvatar(system)
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1, avatarActor), "player1-control")
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-control")
"VehicleControl" should {
"causes disability when the vehicle drives too deep in water" in {
vehicle.Position = Vector3(5,5,-3) //right in the pool
vehicle.zoneInteraction() //trigger
val msg_drown = avatarProbe.receiveOne(250 milliseconds)
assert(
msg_drown match {
case AvatarServiceMessage(
"TestCharacter1",
AvatarAction.OxygenState(
OxygenStateTarget(PlanetSideGUID(1), OxygenState.Suffocation, 100f),
Some(OxygenStateTarget(PlanetSideGUID(2), OxygenState.Suffocation, 100f))
)
) => true
case _ => false
}
)
//player will die in 60s
//vehicle will disable in 5s; driver will be kicked
val msg_kick = vehicleProbe.receiveOne(6 seconds)
assert(
msg_kick match {
case VehicleServiceMessage(
"test-zone",
VehicleAction.KickPassenger(PlanetSideGUID(1), 4, _, PlanetSideGUID(2))
) => true
case _ => false
}
)
//player will die, but detailing players death messages is not necessary for this test
}
}
}
class VehicleControlStopInteractWithWaterTest extends ActorTest {
val vehicle = Vehicle(GlobalDefinitions.fury) //guid=2
val player1 =
Player(Avatar(0, "TestCharacter1", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute)) //guid=1
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val playerProbe = TestProbe()
val guid = new NumberPoolHub(new MaxNumberSource(15))
val pool = Pool(EnvironmentAttribute.Water, DeepSquare(-1, 10, 10, 0, 0))
val zone = new Zone(
id = "test-zone",
new ZoneMap(name = "test-map") {
environment = List(pool)
},
zoneNumber = 0
) {
override def SetupNumberPools() = {}
GUID(guid)
override def LivePlayers = List(player1)
override def Vehicles = List(vehicle)
}
guid.register(player1, 1)
guid.register(vehicle, 2)
player1.Zone = zone
player1.Spawn()
vehicle.Zone = zone
vehicle.Faction = PlanetSideEmpire.TR
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(0).mount(player1)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
player1.Actor = playerProbe.ref
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-control")
"VehicleControl" should {
"stop becoming disabled if the vehicle drives out of the water" in {
vehicle.Position = Vector3(5,5,-3) //right in the pool
vehicle.zoneInteraction() //trigger
val msg_drown = playerProbe.receiveOne(250 milliseconds)
assert(
msg_drown match {
case InteractWithEnvironment(
p1,
p2,
Some(OxygenStateTarget(PlanetSideGUID(2), OxygenState.Suffocation, 100f))
) => (p1 eq player1) && (p2 eq pool)
case _ => false
}
)
vehicle.Position = Vector3.Zero //that's enough of that
vehicle.zoneInteraction()
val msg_recover = playerProbe.receiveOne(250 milliseconds)
assert(
msg_recover match {
case EscapeFromEnvironment(
p1,
p2,
Some(OxygenStateTarget(PlanetSideGUID(2), OxygenState.Recovery, _))
) => (p1 eq player1) && (p2 eq pool)
case _ => false
}
)
}
}
}
class VehicleControlInteractWithLavaTest extends ActorTest {
val vehicle = Vehicle(GlobalDefinitions.fury) //guid=2
val player1 =
Player(Avatar(0, "TestCharacter1", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute)) //guid=1
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val avatarProbe = TestProbe()
val vehicleProbe = TestProbe()
val guid = new NumberPoolHub(new MaxNumberSource(15))
val pool = Pool(EnvironmentAttribute.Lava, DeepSquare(-1, 10, 10, 0, 0))
val zone = new Zone(
id = "test-zone",
new ZoneMap(name = "test-map") {
environment = List(pool)
},
zoneNumber = 0
) {
override def SetupNumberPools() = {}
GUID(guid)
override def LivePlayers = List(player1)
override def Vehicles = List(vehicle)
override def AvatarEvents = avatarProbe.ref
override def VehicleEvents = vehicleProbe.ref
override def Activity = TestProbe().ref
}
guid.register(player1, 1)
guid.register(vehicle, 2)
guid.register(player1.avatar.locker, 5)
player1.Zone = zone
player1.Spawn()
vehicle.Zone = zone
vehicle.Faction = PlanetSideEmpire.TR
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(0).mount(player1)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
val (probe, avatarActor) = PlayerControlTest.DummyAvatar(system)
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1, avatarActor), "player1-control")
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-control")
"VehicleControl" should {
"take continuous damage if vehicle drives into lava" in {
assert(vehicle.Health > 0) //alive
assert(player1.Health == 100) //alive
vehicle.Position = Vector3(5,5,-3) //right in the pool
vehicle.zoneInteraction() //trigger
val msg_burn = vehicleProbe.receiveN(3,1 seconds)
msg_burn.foreach { msg =>
assert(
msg match {
case VehicleServiceMessage("test-zone", VehicleAction.PlanetsideAttribute(_, PlanetSideGUID(2), 0, _)) => true
case _ => false
}
)
}
//etc..
probe.receiveOne(65 seconds) //wait until player1's implants deinitialize
assert(vehicle.Health == 0) //ded
assert(player1.Health == 0) //ded
}
}
}
class VehicleControlInteractWithDeathTest extends ActorTest {
val vehicle = Vehicle(GlobalDefinitions.fury) //guid=2
val player1 =
Player(Avatar(0, "TestCharacter1", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute)) //guid=1
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
val guid = new NumberPoolHub(new MaxNumberSource(15))
val pool = Pool(EnvironmentAttribute.Death, DeepSquare(-1, 10, 10, 0, 0))
val zone = new Zone(
id = "test-zone",
new ZoneMap(name = "test-map") {
environment = List(pool)
},
zoneNumber = 0
) {
override def SetupNumberPools() = {}
GUID(guid)
override def LivePlayers = List(player1)
override def Vehicles = List(vehicle)
override def AvatarEvents = TestProbe().ref
override def VehicleEvents = TestProbe().ref
}
guid.register(player1, 1)
guid.register(vehicle, 2)
guid.register(player1.avatar.locker, 5)
player1.Zone = zone
player1.Spawn()
vehicle.Zone = zone
vehicle.Faction = PlanetSideEmpire.TR
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
vehicle.Seats(0).mount(player1)
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
player1.VehicleSeated = vehicle.GUID
val (probe, avatarActor) = PlayerControlTest.DummyAvatar(system)
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1, avatarActor), "player1-control")
vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), "vehicle-control")
"VehicleControl" should {
"take continuous damage if vehicle drives into a pool of death" in {
assert(vehicle.Health > 0) //alive
assert(player1.Health == 100) //alive
vehicle.Position = Vector3(5,5,-3) //right in the pool
vehicle.zoneInteraction() //trigger
probe.receiveOne(2 seconds) //wait until player1's implants deinitialize
assert(vehicle.Health == 0) //ded
assert(player1.Health == 0) //ded
}
}
}
object VehicleControlTest {
import net.psforever.objects.avatar.Avatar
import net.psforever.types.{CharacterSex, PlanetSideEmpire}
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
val avatar1 = Avatar(0, "test1", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute)
val avatar2 = Avatar(1, "test2", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute)
Hart (#723) * initial OrbitalShuttleTimeMsg packet and tests; new objects to support HART shuttle transport system * master was stale * grouped scheduling for timing orbital shuttle activity * door lock controls for HART shuttle lifecycle, and specifically for the doors that lead into the shuttle boarding hallway * separation of the door from the door unlocking logic, which now has to be provided if performed by an outside source; a door that is locked either by bolt, HART routine, or other reason, can now be shut immediately; message when HART is not docked with a corresponding entry hallway door * better degree of door logic control; all shuttle-related messages have been moved to LocalService; careful managing of 'original state' for the shuttle's cycle * modification of seat mounting and cargo mounting support entities to expand functionality * absolutely very little to do with the feature of this branch and a lot to do with yak-shaving; long story short, class inheritance is greatly modified and mountable seats can now accept multiple players if initialized properly * a lot has changed: distribution of MountableBehavior, mount point information is more complex, vehicles convert differently, the routine of the shuttle timer is initialized differently; you can now successfully utilize the HART shuttle to drop into a zone * swap of shutle from pad to pad control; tests and comments * eject players from HART gantry hallway as if passengers dismounting from seat when not boarding through the use of environmental geometry; HART system uses duration from config settings to set scheduler * rebase to curious master; repairs to vector rotation calculations; regression of mountable changes involving seats with occupancy greater than 1; orbital shuttle as a unique vehicle and amenity; corrected dismount offsets and offset calculations; weird angle of nc hart a building has been properly accommodated; hart events have prerequisite animation states * rebase with master; looks like rebase with merged_master, which is also a commit * lots of tests (though not nearly enough); checking the permission group of a shuttle seat no longer creates that seat * fixing explosions * fixed the persistence monitor service potentially using non-printable unicode in actor names * can not use a droppod to gain access to one's own sanctuary * removed hart facility update that causing open bay doors and beeping * PR review changes * fix for aggravation issues
2021-03-23 09:44:10 -04:00
def checkCanNotMount(probe: TestProbe, id: String): Unit = {
val reply = probe.receiveOne(Duration.create(250, "ms"))
reply match {
case msg: Mountable.MountMessages =>
assert(msg.response.isInstanceOf[Mountable.CanNotMount], s"test $id")
case _ =>
assert(false, s"test $id-b")
}
}
def checkCanMount(probe: TestProbe, id: String): Unit = {
val reply = probe.receiveOne(Duration.create(250, "ms"))
reply match {
case msg: Mountable.MountMessages =>
assert(msg.response.isInstanceOf[Mountable.CanMount], s" - test: $id")
case _ =>
assert(false, s" - test: $id-b")
}
}
Water and Lava (#649) * planar classes to describe levels of water and other fluid parallel to the ground * corrected purpose of field in OxygenStateMessage and adjusted the structure of the packet; the environment is now 'regions filled with stuff'; messaging pathways to facilitate drowning and drown recovery in SessionActor, WorldSession, and PlayerControl, as well as the avatar event system * drowning height is now a featur - recommend going through GlobalDefinitions; fixed lava pool collision to work on pool entry rather than drown level; lava now burns; painbox damage now is directed towards players control agency first * drowning timer works correctly for both player and vehicle targets; timing and dive depth information for targets defined, but currently originates from a generic location (ObjectDefinition); packet OSM has been modified for efficiency; classes for environment features previously exclusive to drowning mechanics have been pushed towards generic naming conventions * added sea and pools for z4, z5, z8, and z10 * vehicles now take damage (to the point of destruction) when exposed to lava due the expansion of environmental damage reasons and environmental damage modifiers; modification of the environment exposure lingo; streamlining of vital activity record system * added basic drown params to flying vehicle definitions; object trait and control mixin for environment interaction, code moved from SessionActor and WorldSession * separated environmental classes; handled waterlogged flying vehicles, in properties and code; wrote comments and tests * players mounting vehicles and players subjected to the vehicle transfer process should receive updated drown-state status of the vehicle; drowning should suspend while in the middle of vehicle transfer, in the case the process is long * increased damage performed to vehicles by lava
2020-12-24 08:04:11 -05:00
}