mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-21 02:54:44 +00:00
* functions for certifcation ui updates (that don't work) * initialization of combat engineering deployables ui on load and certification change * representation classes for ACE and FDU; ability to pull ACE and FDU from equipment terminals * ammo change functionality and fire mode change functionality for ConstructionItems refactored from Tool operations and supported properly (switch between deployable options) * zone-specific structure for keeping track of deployables; abaility to dismiss deployables from the map screen (previous functionality); local client creation of explosive-type deployables * refactored MannedTurret into FacilityTurret and lesser traits to be used in the deployable spitfires and the OMFT's; all ACE deployables are available for placement; partial management of the construction items after the deployable is placed; boomers create boomer triggers * Avatar-specific storage for deployables and for updating UI elements * refactored quite a bit of code in WSA for the benefit of deployable management; refinements to deployable creation; server messages about deployable quantities; corrected the FDU encoding pattern; lots of work dedicated just to synchronizing BoomerTrigger objects * added RemoverActor for deployables and redistributed deconstruction functionality away from WSA to new DeployableRemover; added events to facilitate activities not inheritable with this model * refactored and distributed Deployables classes; copious amounts of testing and document-writing * boomers now explode from trigger; support for deployables being destroyed by weapon discharge, including individual health, soure identification, and damage model; shuffled deployable classes to build different hierarchy * sensor_shield was skipped by accident * identified stray object in Hanish, Ishundar, and added Irkalla, Ishundar's capture console; fixed issue with Warp command and 'Irkalla'; modified building amenity setup and setup testing in Zone; players load and die properly when seated in an omft; reserve ammunition in omft properly registered * added local service channel, capture consoles, fixed tests as much as posible * fixed LocalService tests by booting the ServiceManager; added avatar and local tests * a simple attempt to refactor Actor messages in a way that is acceptable to Travis CI * making the explosive deployables vanish upon explosion; sensor health bars are now supported
39 lines
1.5 KiB
Scala
39 lines
1.5 KiB
Scala
// Copyright (c) 2017 PSForever
|
|
package objects.guidtask
|
|
|
|
import base.ActorTest
|
|
import net.psforever.objects._
|
|
import net.psforever.objects.guid.{GUIDTask, TaskResolver}
|
|
import net.psforever.types.{CharacterGender, CharacterVoice, PlanetSideEmpire}
|
|
|
|
class GUIDTaskRegisterAvatarTest extends ActorTest {
|
|
"RegisterAvatar" in {
|
|
val (_, uns, taskResolver, probe) = GUIDTaskTest.CommonTestSetup
|
|
val obj = Player(Avatar("test", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Mute))
|
|
val obj_wep = Tool(GlobalDefinitions.beamer)
|
|
obj.Slot(0).Equipment = obj_wep
|
|
val obj_wep_ammo = AmmoBox(GlobalDefinitions.energy_cell)
|
|
obj_wep.AmmoSlots.head.Box = obj_wep_ammo
|
|
val obj_inv_ammo = AmmoBox(GlobalDefinitions.energy_cell)
|
|
obj.Slot(6).Equipment = obj_inv_ammo
|
|
val obj_locker = obj.Slot(5).Equipment.get
|
|
val obj_locker_ammo = AmmoBox(GlobalDefinitions.energy_cell)
|
|
obj_locker.asInstanceOf[LockerContainer].Inventory += 0 -> obj_locker_ammo
|
|
|
|
assert(!obj.HasGUID)
|
|
assert(!obj_wep.HasGUID)
|
|
assert(!obj_wep_ammo.HasGUID)
|
|
assert(!obj_inv_ammo.HasGUID)
|
|
assert(!obj_locker.HasGUID)
|
|
assert(!obj_locker_ammo.HasGUID)
|
|
taskResolver ! TaskResolver.GiveTask(new GUIDTaskTest.RegisterTestTask(probe.ref), List(GUIDTask.RegisterAvatar(obj)(uns)))
|
|
probe.expectMsg(scala.util.Success)
|
|
assert(obj.HasGUID)
|
|
assert(obj_wep.HasGUID)
|
|
assert(obj_wep_ammo.HasGUID)
|
|
assert(obj_inv_ammo.HasGUID)
|
|
assert(obj_locker.HasGUID)
|
|
assert(obj_locker_ammo.HasGUID)
|
|
}
|
|
}
|