2018-07-15 01:25:44 +00:00
|
|
|
// Copyright (c) 2017 PSForever
|
|
|
|
|
package objects
|
|
|
|
|
|
|
|
|
|
import akka.actor.{Actor, Props}
|
|
|
|
|
import akka.routing.RandomPool
|
|
|
|
|
import akka.testkit.TestProbe
|
|
|
|
|
import base.ActorTest
|
2020-07-22 15:28:09 +00:00
|
|
|
import net.psforever.actors.zone.{BuildingActor, ZoneActor}
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
import net.psforever.objects.guid.{NumberPoolHub, TaskResolver}
|
|
|
|
|
import net.psforever.objects.guid.source.LimitedNumberSource
|
2020-07-14 18:13:18 +00:00
|
|
|
import net.psforever.objects.serverobject.CommonMessages
|
2020-08-01 10:25:03 +00:00
|
|
|
import net.psforever.objects.{GlobalDefinitions, Ntu, Player, Vehicle}
|
2018-07-15 01:25:44 +00:00
|
|
|
import net.psforever.objects.serverobject.resourcesilo.{ResourceSilo, ResourceSiloControl, ResourceSiloDefinition}
|
|
|
|
|
import net.psforever.objects.serverobject.structures.{Building, StructureType}
|
2020-07-14 18:13:18 +00:00
|
|
|
import net.psforever.objects.serverobject.transfer.TransferBehavior
|
2020-07-22 15:28:09 +00:00
|
|
|
import net.psforever.objects.zones.{Zone, ZoneMap}
|
2020-01-06 13:45:55 +00:00
|
|
|
import net.psforever.packet.game.UseItemMessage
|
|
|
|
|
import net.psforever.types._
|
2018-07-15 01:25:44 +00:00
|
|
|
import org.specs2.mutable.Specification
|
2020-08-23 01:26:06 +00:00
|
|
|
import net.psforever.services.ServiceManager
|
|
|
|
|
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
|
2020-07-22 15:28:09 +00:00
|
|
|
import akka.actor.typed.scaladsl.adapter._
|
2020-08-01 10:25:03 +00:00
|
|
|
import net.psforever.objects.avatar.Avatar
|
2018-07-15 01:25:44 +00:00
|
|
|
|
|
|
|
|
import scala.concurrent.duration._
|
|
|
|
|
|
|
|
|
|
class ResourceSiloTest extends Specification {
|
|
|
|
|
"Resource Silo" should {
|
|
|
|
|
"define" in {
|
|
|
|
|
val obj = new ResourceSiloDefinition
|
|
|
|
|
obj.ObjectId mustEqual 731
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"construct" in {
|
|
|
|
|
val obj = ResourceSilo()
|
|
|
|
|
obj.Definition mustEqual GlobalDefinitions.resource_silo
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.MaxNtuCapacitor mustEqual 1000
|
|
|
|
|
obj.NtuCapacitor mustEqual 0
|
2018-07-18 12:41:28 +00:00
|
|
|
obj.LowNtuWarningOn mustEqual true
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.CapacitorDisplay mustEqual 0
|
|
|
|
|
//
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.NtuCapacitor = 50
|
2018-07-18 12:41:28 +00:00
|
|
|
obj.LowNtuWarningOn = false
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.NtuCapacitor mustEqual 50
|
2018-07-18 12:41:28 +00:00
|
|
|
obj.LowNtuWarningOn mustEqual false
|
2020-04-20 22:19:50 +00:00
|
|
|
obj.CapacitorDisplay mustEqual 1
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"charge level can not exceed limits(0 to maximum)" in {
|
|
|
|
|
val obj = ResourceSilo()
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.NtuCapacitor mustEqual 0
|
|
|
|
|
obj.NtuCapacitor = -5
|
|
|
|
|
obj.NtuCapacitor mustEqual 0
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.NtuCapacitor = obj.MaxNtuCapacitor + 100
|
|
|
|
|
obj.NtuCapacitor mustEqual 1000
|
|
|
|
|
obj.NtuCapacitor mustEqual obj.MaxNtuCapacitor
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"using the silo generates a charge event" in {
|
2020-07-14 03:54:05 +00:00
|
|
|
val msg = UseItemMessage(
|
|
|
|
|
PlanetSideGUID(1),
|
|
|
|
|
PlanetSideGUID(0),
|
|
|
|
|
PlanetSideGUID(2),
|
|
|
|
|
0L,
|
|
|
|
|
false,
|
|
|
|
|
Vector3(0f, 0f, 0f),
|
|
|
|
|
Vector3(0f, 0f, 0f),
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
0L
|
|
|
|
|
) //faked
|
2018-07-15 01:25:44 +00:00
|
|
|
ResourceSilo().Use(ResourceSiloTest.player, msg) mustEqual ResourceSilo.ChargeEvent()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ResourceSiloControlStartupTest extends ActorTest {
|
|
|
|
|
val serviceManager = ServiceManager.boot(system)
|
2020-08-01 10:25:03 +00:00
|
|
|
serviceManager ! ServiceManager.Register(RandomPool(1).props(Props[TaskResolver]()), "taskResolver")
|
2018-07-15 01:25:44 +00:00
|
|
|
val obj = ResourceSilo()
|
|
|
|
|
obj.GUID = PlanetSideGUID(1)
|
|
|
|
|
val probe = TestProbe()
|
|
|
|
|
serviceManager ! ServiceManager.Register(Props(classOf[ResourceSiloTest.ProbedAvatarService], probe), "avatar")
|
|
|
|
|
|
|
|
|
|
"Resource silo" should {
|
|
|
|
|
"startup properly" in {
|
2020-05-26 23:50:54 +00:00
|
|
|
expectNoMessage(500 milliseconds)
|
2018-07-15 01:25:44 +00:00
|
|
|
system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
2020-05-26 23:50:54 +00:00
|
|
|
expectNoMessage(1 seconds)
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ResourceSiloControlUseTest extends ActorTest {
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
val guid = new NumberPoolHub(new LimitedNumberSource(10))
|
2020-07-14 03:54:05 +00:00
|
|
|
val map = new ZoneMap("test")
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
val zone = new Zone("test", map, 0) {
|
|
|
|
|
override def SetupNumberPools() = {}
|
|
|
|
|
GUID(guid)
|
|
|
|
|
}
|
2020-07-22 15:28:09 +00:00
|
|
|
zone.actor = system.spawnAnonymous(ZoneActor(zone))
|
2020-07-14 03:54:05 +00:00
|
|
|
val building = new Building(
|
|
|
|
|
"Building",
|
|
|
|
|
building_guid = 0,
|
|
|
|
|
map_id = 0,
|
|
|
|
|
zone,
|
|
|
|
|
StructureType.Building,
|
|
|
|
|
GlobalDefinitions.building
|
|
|
|
|
) //guid=1
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
|
|
|
|
|
val obj = ResourceSilo() //guid=2
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
obj.Owner = building
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.Actor ! "startup"
|
|
|
|
|
|
2020-07-14 03:54:05 +00:00
|
|
|
val player = Player(
|
2020-08-01 10:25:03 +00:00
|
|
|
new Avatar(0, "TestCharacter", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Mute)
|
2020-07-14 03:54:05 +00:00
|
|
|
) //guid=3
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
val vehicle = Vehicle(GlobalDefinitions.ant) //guid=4
|
2020-07-22 15:28:09 +00:00
|
|
|
val probe = new TestProbe(system)
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
|
|
|
|
|
guid.register(building, 1)
|
|
|
|
|
guid.register(obj, 2)
|
|
|
|
|
guid.register(player, 3)
|
|
|
|
|
guid.register(vehicle, 4)
|
2020-05-26 23:50:54 +00:00
|
|
|
expectNoMessage(200 milliseconds)
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
zone.Transport ! Zone.Vehicle.Spawn(vehicle)
|
|
|
|
|
vehicle.Seats(0).Occupant = player
|
|
|
|
|
player.VehicleSeated = vehicle.GUID
|
2020-05-26 23:50:54 +00:00
|
|
|
expectNoMessage(200 milliseconds)
|
2020-07-14 18:13:18 +00:00
|
|
|
system.stop(vehicle.Actor)
|
|
|
|
|
vehicle.Actor = probe.ref
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 19:17:32 +00:00
|
|
|
|
2018-07-15 01:25:44 +00:00
|
|
|
"Resource silo" should {
|
|
|
|
|
"respond when being used" in {
|
2020-05-26 23:50:54 +00:00
|
|
|
expectNoMessage(1 seconds)
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.Actor ! CommonMessages.Use(ResourceSiloTest.player)
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2020-07-14 18:13:18 +00:00
|
|
|
val reply = probe.receiveOne(2000 milliseconds)
|
|
|
|
|
assert(reply match {
|
|
|
|
|
case TransferBehavior.Discharging(Ntu.Nanites) => true
|
2020-07-22 15:28:09 +00:00
|
|
|
case _ => false
|
2020-07-14 18:13:18 +00:00
|
|
|
})
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ResourceSiloControlNtuWarningTest extends ActorTest {
|
|
|
|
|
val obj = ResourceSilo()
|
|
|
|
|
obj.GUID = PlanetSideGUID(1)
|
|
|
|
|
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
|
|
|
|
obj.Actor ! "startup"
|
2019-12-10 14:17:55 +00:00
|
|
|
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
2020-07-14 03:54:05 +00:00
|
|
|
obj.Owner =
|
|
|
|
|
new Building("Building", building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
2020-01-20 02:32:14 +00:00
|
|
|
obj.Owner.GUID = PlanetSideGUID(6)
|
2019-12-10 13:37:57 +00:00
|
|
|
val zoneEvents = TestProbe("zone-events")
|
2018-07-15 01:25:44 +00:00
|
|
|
|
|
|
|
|
"Resource silo" should {
|
2018-07-18 12:41:28 +00:00
|
|
|
"announce high ntu" in {
|
2019-12-10 13:37:57 +00:00
|
|
|
zone.AvatarEvents = zoneEvents.ref
|
|
|
|
|
assert(obj.LowNtuWarningOn)
|
2018-07-18 12:41:28 +00:00
|
|
|
obj.Actor ! ResourceSilo.LowNtuWarning(false)
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2019-12-10 13:37:57 +00:00
|
|
|
val reply = zoneEvents.receiveOne(500 milliseconds)
|
|
|
|
|
assert(!obj.LowNtuWarningOn)
|
2018-07-15 01:25:44 +00:00
|
|
|
assert(reply.isInstanceOf[AvatarServiceMessage])
|
|
|
|
|
assert(reply.asInstanceOf[AvatarServiceMessage].forChannel == "nowhere")
|
2020-07-14 03:54:05 +00:00
|
|
|
assert(reply.asInstanceOf[AvatarServiceMessage].actionMessage.isInstanceOf[AvatarAction.PlanetsideAttribute])
|
|
|
|
|
assert(
|
|
|
|
|
reply
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.player_guid == PlanetSideGUID(6)
|
|
|
|
|
)
|
|
|
|
|
assert(
|
|
|
|
|
reply
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.attribute_type == 47
|
|
|
|
|
)
|
|
|
|
|
assert(
|
|
|
|
|
reply
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.attribute_value == 0
|
|
|
|
|
)
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ResourceSiloControlUpdate1Test extends ActorTest {
|
|
|
|
|
val obj = ResourceSilo()
|
|
|
|
|
obj.GUID = PlanetSideGUID(1)
|
|
|
|
|
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
|
|
|
|
obj.Actor ! "startup"
|
2019-12-10 14:17:55 +00:00
|
|
|
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
2020-07-14 03:54:05 +00:00
|
|
|
val bldg =
|
|
|
|
|
new Building("Building", building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
2020-01-20 02:32:14 +00:00
|
|
|
bldg.GUID = PlanetSideGUID(6)
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.Owner = bldg
|
2020-07-14 03:54:05 +00:00
|
|
|
val zoneEvents = TestProbe("zone-events")
|
2019-12-10 13:37:57 +00:00
|
|
|
val buildingEvents = TestProbe("building-events")
|
2018-07-15 01:25:44 +00:00
|
|
|
|
|
|
|
|
"Resource silo" should {
|
2018-07-18 12:41:28 +00:00
|
|
|
"update the charge level and capacitor display (report high ntu, power restored)" in {
|
2019-12-10 13:37:57 +00:00
|
|
|
zone.AvatarEvents = zoneEvents.ref
|
|
|
|
|
bldg.Actor = buildingEvents.ref
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(obj.NtuCapacitor == 0)
|
2018-07-15 01:25:44 +00:00
|
|
|
assert(obj.CapacitorDisplay == 0)
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(obj.LowNtuWarningOn)
|
2018-07-18 12:41:28 +00:00
|
|
|
obj.Actor ! ResourceSilo.UpdateChargeLevel(305)
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2019-12-10 13:37:57 +00:00
|
|
|
val reply1 = zoneEvents.receiveOne(500 milliseconds)
|
|
|
|
|
val reply2 = buildingEvents.receiveOne(500 milliseconds)
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(obj.NtuCapacitor == 305)
|
2019-08-21 14:33:26 +00:00
|
|
|
assert(obj.CapacitorDisplay == 4)
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(reply1 match {
|
|
|
|
|
case AvatarServiceMessage("nowhere", AvatarAction.PlanetsideAttribute(PlanetSideGUID(1), 45, 4)) => true
|
2020-07-22 15:28:09 +00:00
|
|
|
case _ => false
|
2020-07-14 18:13:18 +00:00
|
|
|
})
|
2020-07-22 15:28:09 +00:00
|
|
|
assert(reply2.isInstanceOf[BuildingActor.MapUpdate])
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2019-12-10 13:37:57 +00:00
|
|
|
val reply3 = zoneEvents.receiveOne(500 milliseconds)
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(!obj.LowNtuWarningOn)
|
|
|
|
|
assert(reply3 match {
|
|
|
|
|
case AvatarServiceMessage("nowhere", AvatarAction.PlanetsideAttribute(PlanetSideGUID(6), 47, 0)) => true
|
2020-07-22 15:28:09 +00:00
|
|
|
case _ => false
|
2020-07-14 18:13:18 +00:00
|
|
|
})
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2019-12-10 13:37:57 +00:00
|
|
|
val reply4 = zoneEvents.receiveOne(500 milliseconds)
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(reply4 match {
|
|
|
|
|
case AvatarServiceMessage("nowhere", AvatarAction.PlanetsideAttribute(PlanetSideGUID(6), 48, 0)) => true
|
2020-07-22 15:28:09 +00:00
|
|
|
case _ => false
|
2020-07-14 18:13:18 +00:00
|
|
|
})
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ResourceSiloControlUpdate2Test extends ActorTest {
|
|
|
|
|
val obj = ResourceSilo()
|
|
|
|
|
obj.GUID = PlanetSideGUID(1)
|
|
|
|
|
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
|
|
|
|
obj.Actor ! "startup"
|
2019-12-10 14:17:55 +00:00
|
|
|
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
2020-07-14 03:54:05 +00:00
|
|
|
val bldg =
|
|
|
|
|
new Building("Building", building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
2020-01-20 02:32:14 +00:00
|
|
|
bldg.GUID = PlanetSideGUID(6)
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.Owner = bldg
|
2020-07-14 03:54:05 +00:00
|
|
|
val zoneEvents = TestProbe("zone-events")
|
2019-12-10 13:37:57 +00:00
|
|
|
val buildingEvents = TestProbe("building-events")
|
2018-07-15 01:25:44 +00:00
|
|
|
|
|
|
|
|
"Resource silo" should {
|
|
|
|
|
"update the charge level and capacitor display (report good ntu)" in {
|
2019-12-10 13:37:57 +00:00
|
|
|
zone.AvatarEvents = zoneEvents.ref
|
|
|
|
|
bldg.Actor = buildingEvents.ref
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.NtuCapacitor = 100
|
2018-07-18 12:41:28 +00:00
|
|
|
obj.LowNtuWarningOn = true
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(obj.NtuCapacitor == 100)
|
2018-07-15 01:25:44 +00:00
|
|
|
assert(obj.CapacitorDisplay == 1)
|
2019-12-10 13:37:57 +00:00
|
|
|
assert(obj.LowNtuWarningOn)
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.Actor ! ResourceSilo.UpdateChargeLevel(105)
|
|
|
|
|
|
2019-12-11 13:34:29 +00:00
|
|
|
val reply1 = zoneEvents.receiveOne(1000 milliseconds)
|
|
|
|
|
val reply2 = buildingEvents.receiveOne(1000 milliseconds)
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(obj.NtuCapacitor == 205)
|
2019-08-21 14:33:26 +00:00
|
|
|
assert(obj.CapacitorDisplay == 3)
|
2018-07-15 01:25:44 +00:00
|
|
|
assert(reply1.isInstanceOf[AvatarServiceMessage])
|
|
|
|
|
assert(reply1.asInstanceOf[AvatarServiceMessage].forChannel == "nowhere")
|
2020-07-14 03:54:05 +00:00
|
|
|
assert(reply1.asInstanceOf[AvatarServiceMessage].actionMessage.isInstanceOf[AvatarAction.PlanetsideAttribute])
|
|
|
|
|
assert(
|
|
|
|
|
reply1
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.player_guid == PlanetSideGUID(1)
|
|
|
|
|
)
|
|
|
|
|
assert(
|
|
|
|
|
reply1
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.attribute_type == 45
|
|
|
|
|
)
|
|
|
|
|
assert(
|
|
|
|
|
reply1
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.attribute_value == 3
|
|
|
|
|
)
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2020-07-22 15:28:09 +00:00
|
|
|
assert(reply2.isInstanceOf[BuildingActor.MapUpdate])
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2019-12-10 13:37:57 +00:00
|
|
|
val reply3 = zoneEvents.receiveOne(500 milliseconds)
|
|
|
|
|
assert(!obj.LowNtuWarningOn)
|
2018-07-15 01:25:44 +00:00
|
|
|
assert(reply3.isInstanceOf[AvatarServiceMessage])
|
|
|
|
|
assert(reply3.asInstanceOf[AvatarServiceMessage].forChannel == "nowhere")
|
2020-07-14 03:54:05 +00:00
|
|
|
assert(reply3.asInstanceOf[AvatarServiceMessage].actionMessage.isInstanceOf[AvatarAction.PlanetsideAttribute])
|
|
|
|
|
assert(
|
|
|
|
|
reply3
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.player_guid == PlanetSideGUID(6)
|
|
|
|
|
)
|
|
|
|
|
assert(
|
|
|
|
|
reply3
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.attribute_type == 47
|
|
|
|
|
)
|
|
|
|
|
assert(
|
|
|
|
|
reply3
|
|
|
|
|
.asInstanceOf[AvatarServiceMessage]
|
|
|
|
|
.actionMessage
|
|
|
|
|
.asInstanceOf[AvatarAction.PlanetsideAttribute]
|
|
|
|
|
.attribute_value == 0
|
|
|
|
|
)
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ResourceSiloControlNoUpdateTest extends ActorTest {
|
|
|
|
|
val obj = ResourceSilo()
|
|
|
|
|
obj.GUID = PlanetSideGUID(1)
|
|
|
|
|
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
|
|
|
|
obj.Actor ! "startup"
|
2019-12-10 14:17:55 +00:00
|
|
|
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
2020-07-14 03:54:05 +00:00
|
|
|
val bldg =
|
|
|
|
|
new Building("Building", building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
2020-01-20 02:32:14 +00:00
|
|
|
bldg.GUID = PlanetSideGUID(6)
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.Owner = bldg
|
2020-07-14 03:54:05 +00:00
|
|
|
val zoneEvents = TestProbe("zone-events")
|
2019-12-10 13:37:57 +00:00
|
|
|
val buildingEvents = TestProbe("building-events")
|
2018-07-15 01:25:44 +00:00
|
|
|
|
|
|
|
|
"Resource silo" should {
|
|
|
|
|
"update, but not sufficiently to change the capacitor display" in {
|
2019-12-10 13:37:57 +00:00
|
|
|
zone.AvatarEvents = zoneEvents.ref
|
|
|
|
|
bldg.Actor = buildingEvents.ref
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2020-07-14 18:13:18 +00:00
|
|
|
obj.NtuCapacitor = 250
|
2018-07-18 12:41:28 +00:00
|
|
|
obj.LowNtuWarningOn = false
|
2020-07-14 18:13:18 +00:00
|
|
|
assert(obj.NtuCapacitor == 250)
|
2018-07-15 01:25:44 +00:00
|
|
|
assert(obj.CapacitorDisplay == 3)
|
2019-12-10 13:37:57 +00:00
|
|
|
assert(!obj.LowNtuWarningOn)
|
2018-07-15 01:25:44 +00:00
|
|
|
obj.Actor ! ResourceSilo.UpdateChargeLevel(50)
|
|
|
|
|
|
2020-05-26 23:50:54 +00:00
|
|
|
expectNoMessage(500 milliseconds)
|
|
|
|
|
zoneEvents.expectNoMessage(500 milliseconds)
|
|
|
|
|
buildingEvents.expectNoMessage(500 milliseconds)
|
2020-07-22 15:28:09 +00:00
|
|
|
assert(
|
|
|
|
|
obj.NtuCapacitor == 299 || obj.NtuCapacitor == 300
|
|
|
|
|
) // Just in case the capacitor level drops while waiting for the message check 299 & 300
|
2018-07-15 01:25:44 +00:00
|
|
|
assert(obj.CapacitorDisplay == 3)
|
2019-12-10 13:37:57 +00:00
|
|
|
assert(!obj.LowNtuWarningOn)
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
object ResourceSiloTest {
|
2020-07-14 03:54:05 +00:00
|
|
|
val player = Player(
|
2020-08-01 10:25:03 +00:00
|
|
|
new Avatar(0, "TestCharacter", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Mute)
|
2020-07-14 03:54:05 +00:00
|
|
|
)
|
2018-07-15 01:25:44 +00:00
|
|
|
|
2020-07-14 03:54:05 +00:00
|
|
|
class ProbedAvatarService(probe: TestProbe) extends Actor {
|
|
|
|
|
override def receive: Receive = {
|
2018-07-15 01:25:44 +00:00
|
|
|
case msg =>
|
|
|
|
|
probe.ref ! msg
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-14 03:54:05 +00:00
|
|
|
class ProbedBuildingControl(probe: TestProbe) extends Actor {
|
|
|
|
|
override def receive: Receive = {
|
2018-07-15 01:25:44 +00:00
|
|
|
case msg =>
|
|
|
|
|
probe.ref ! msg
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-14 03:54:05 +00:00
|
|
|
class ProbedResourceSiloControl(silo: ResourceSilo, probe: TestProbe) extends ResourceSiloControl(silo) {
|
|
|
|
|
override def receive: Receive = {
|
2018-07-15 01:25:44 +00:00
|
|
|
case msg =>
|
2020-07-14 03:54:05 +00:00
|
|
|
super.receive.apply(msg)
|
|
|
|
|
probe.ref ! msg
|
|
|
|
|
}
|
2018-07-15 01:25:44 +00:00
|
|
|
}
|
|
|
|
|
}
|