mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-07 14:10:25 +00:00
Let's Move Item, Together, Again (#445)
* mix-in code for akka messaging move item, currently testing on infantry only * adjusted structure of COntainable so callbacks are separate from message-producing functions, are separate from message-sending functionality; massaged LockerContainer until it could support control agency and created a wrapper for its Equipment interfacing; the control structure starts and stops when PlayerControl starts and stops, and it converts whenever necessary * added failsafe conditions to Containable, such as blocking certain messages while completing a MoveItem call, or blocking all messages to reset disruptive MoveItem calls; depiction message callbacks for Player, Locker, and Vehicle, to properly depict the manipulation of items; eliminated the old code from WSA * added useful comments to Containable; moved functionality for deployables, and for container'ing, and dropping logic out from WSA and distributed it appropriately * handling terminal operations - buying an exosuit and selecting an infantry loadout; starting work on support for more persistent equipment timers local to the avatar (that were removed in this update; see wsa changes) * linked terminal page/message with routing policy * tuning vehicle loadout management and display * separated use time from purchase time and applied a system that limits either if that same event would recur too soon; tuning exosuit and loadout changes * some ask timeout handling and comments * normalizing item on ground interactions * rearranging the project structure * merged with master; commas removed * fixing tests * added description strings to Tasks; adjusted the completion conditions for some Tasks * a failed purchase will not block future purchases; increased timeout on move-item tasks * corpses, even one's own, should have properly moveable inventories * for better persistence, until GlobalDefinitions is renovated, moved the object id->name map onto the avatar object, for the purpose of timers; replaced a use of values in GridInventory for a map conversion * max loadouts and max exosuit switch use same cooldown now; hopefully better clarifcation regarding held arm position * manual merge-rebase of master with hand reconstruction of WorldSessionActor and PlayerControl, and variations for other files necessary to maintain both inventory operations and login reliability * test fixes; MAX exo-suit cooldown is now five minutes again
This commit is contained in:
parent
d6397d54a1
commit
bd82d332fa
42 changed files with 3166 additions and 1819 deletions
|
|
@ -32,10 +32,12 @@ class PlayerControlHealTest extends ActorTest {
|
|||
player1.Zone = zone
|
||||
player1.Spawn
|
||||
player1.Position = Vector3(2, 0, 0)
|
||||
guid.register(player1.Locker, 5)
|
||||
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1), "player1-control")
|
||||
val player2 = Player(Avatar("TestCharacter2", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Mute)) //guid=2
|
||||
player2.Zone = zone
|
||||
player2.Spawn
|
||||
guid.register(player2.Locker, 6)
|
||||
player2.Actor = system.actorOf(Props(classOf[PlayerControl], player2), "player2-control")
|
||||
|
||||
val tool = Tool(GlobalDefinitions.medicalapplicator) //guid=3 & 4
|
||||
|
|
@ -102,6 +104,7 @@ class PlayerControlHealSelfTest extends ActorTest {
|
|||
player1.Zone = zone
|
||||
player1.Spawn
|
||||
player1.Position = Vector3(2, 0, 0)
|
||||
guid.register(player1.Locker, 5)
|
||||
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1), "player1-control")
|
||||
|
||||
val tool = Tool(GlobalDefinitions.medicalapplicator) //guid=3 & 4
|
||||
|
|
@ -167,10 +170,12 @@ class PlayerControlRepairTest extends ActorTest {
|
|||
player1.Zone = zone
|
||||
player1.Spawn
|
||||
player1.Position = Vector3(2, 0, 0)
|
||||
guid.register(player1.Locker, 5)
|
||||
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1), "player1-control")
|
||||
val player2 = Player(Avatar("TestCharacter2", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Mute)) //guid=2
|
||||
player2.Zone = zone
|
||||
player2.Spawn
|
||||
guid.register(player2.Locker, 6)
|
||||
player2.Actor = system.actorOf(Props(classOf[PlayerControl], player2), "player2-control")
|
||||
|
||||
val tool = Tool(GlobalDefinitions.bank) //guid=3 & 4
|
||||
|
|
@ -243,6 +248,7 @@ class PlayerControlRepairSelfTest extends ActorTest {
|
|||
player1.Zone = zone
|
||||
player1.Spawn
|
||||
player1.Position = Vector3(2, 0, 0)
|
||||
guid.register(player1.Locker, 5)
|
||||
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1), "player1-control")
|
||||
|
||||
val tool = Tool(GlobalDefinitions.bank) //guid=3 & 4
|
||||
|
|
@ -309,10 +315,12 @@ class PlayerControlDamageTest extends ActorTest {
|
|||
player1.Zone = zone
|
||||
player1.Spawn
|
||||
player1.Position = Vector3(2, 0, 0)
|
||||
guid.register(player1.Locker, 5)
|
||||
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1), "player1-control")
|
||||
val player2 = Player(Avatar("TestCharacter2", PlanetSideEmpire.NC, CharacterGender.Male, 0, CharacterVoice.Mute)) //guid=2
|
||||
player2.Zone = zone
|
||||
player2.Spawn
|
||||
guid.register(player2.Locker, 6)
|
||||
player2.Actor = system.actorOf(Props(classOf[PlayerControl], player2), "player2-control")
|
||||
val tool = Tool(GlobalDefinitions.suppressor) //guid 3 & 4
|
||||
val projectile = tool.Projectile
|
||||
|
|
@ -385,10 +393,12 @@ class PlayerControlDeathStandingTest extends ActorTest {
|
|||
player1.Zone = zone
|
||||
player1.Spawn
|
||||
player1.Position = Vector3(2,0,0)
|
||||
guid.register(player1.Locker, 5)
|
||||
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1), "player1-control")
|
||||
val player2 = Player(Avatar("TestCharacter2", PlanetSideEmpire.NC, CharacterGender.Male, 0, CharacterVoice.Mute)) //guid=2
|
||||
player2.Zone = zone
|
||||
player2.Spawn
|
||||
guid.register(player2.Locker, 6)
|
||||
player2.Actor = system.actorOf(Props(classOf[PlayerControl], player2), "player2-control")
|
||||
|
||||
val tool = Tool(GlobalDefinitions.suppressor) //guid 3 & 4
|
||||
|
|
@ -430,7 +440,7 @@ class PlayerControlDeathStandingTest extends ActorTest {
|
|||
)
|
||||
assert(
|
||||
msg_avatar(1) match {
|
||||
case AvatarServiceMessage("TestCharacter2", AvatarAction.Killed(PlanetSideGUID(2))) => true
|
||||
case AvatarServiceMessage("TestCharacter2", AvatarAction.Killed(PlanetSideGUID(2), None)) => true
|
||||
case _ => false
|
||||
}
|
||||
)
|
||||
|
|
@ -493,10 +503,12 @@ class PlayerControlDeathSeatedTest extends ActorTest {
|
|||
player1.Zone = zone
|
||||
player1.Spawn
|
||||
player1.Position = Vector3(2,0,0)
|
||||
guid.register(player1.Locker, 6)
|
||||
player1.Actor = system.actorOf(Props(classOf[PlayerControl], player1), "player1-control")
|
||||
val player2 = Player(Avatar("TestCharacter2", PlanetSideEmpire.NC, CharacterGender.Male, 0, CharacterVoice.Mute)) //guid=2
|
||||
player2.Zone = zone
|
||||
player2.Spawn
|
||||
guid.register(player2.Locker, 7)
|
||||
player2.Actor = system.actorOf(Props(classOf[PlayerControl], player2), "player2-control")
|
||||
|
||||
val vehicle = Vehicle(GlobalDefinitions.quadstealth) //guid=5
|
||||
|
|
@ -534,7 +546,7 @@ class PlayerControlDeathSeatedTest extends ActorTest {
|
|||
activityProbe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar.head match {
|
||||
case AvatarServiceMessage("TestCharacter2", AvatarAction.Killed(PlanetSideGUID(2))) => true
|
||||
case AvatarServiceMessage("TestCharacter2", AvatarAction.Killed(PlanetSideGUID(2), Some(PlanetSideGUID(5)))) => true
|
||||
case _ => false
|
||||
}
|
||||
)
|
||||
|
|
@ -595,5 +607,4 @@ class PlayerControlDeathSeatedTest extends ActorTest {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
object PlayerControlTest { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue