Facility Turrets (#223)

* object class, actor class, and definitions for base turrets; untested

* wired base turrets into existence, with hoop jumping; created interface for objects with mounted weapons (vehicles and turrets); working example phalanx_sgl_hevgatcan in Anguta, Ceryshen

* re-wiring manned turrets so that the turreted weapon itself never changes externally but merely identifies different and changes internally; workflow for upgrading wall turrets in place (30s); clarifications and documentation for HackMessage and UseItemMessage; getting rid of orphaned packages from previous location of services

* added a simple task that reverts upgraded manned turrets to their None state after a certain amount of time has passed; it works but need improvement

* turret weapon upgrades now last for a duration of 30 minutes before reverting; created a service support actor base actor that underlies all current support actors; nano-dispenser now properly loads 1 unit of upgrade canister, rather than 100 units; all canister types have appropriate 2x3 inventory size

* forgot to hurry; moved over the Services tests from main/test folder into the common/test folder and needed to change the location of ActorTest to accommodate it; test and documentation for MannedTurret; codecov ignore update

* wired facility turrets in Anguta, Ceryshen; Akna tower, Ceryshen; and S.Villa tower, home3 (Anguta tower is a watchtower); attempted workaround for Travis CI issues with receiveN; re-introduced RemoveActorTest, at least the first test; expanded how ZoneActor performs tests on MannedTurret setup

* getting rid of useless commented-out code; making common operations for mounting and dismounting

* removed outdated comment; added ResourceSilo tests; added extra test for Zone
This commit is contained in:
Fate-JH 2018-07-14 21:25:44 -04:00 committed by GitHub
parent 61a51c1dd1
commit b81ff2bbf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 2246 additions and 680 deletions

View file

@ -2,6 +2,7 @@
package objects
import akka.actor.{ActorRef, Props}
import base.ActorTest
import net.psforever.objects.GlobalDefinitions
import net.psforever.objects.definition.ObjectDefinition
import net.psforever.objects.serverobject.affinity.FactionAffinity
@ -128,12 +129,11 @@ class BuildingControl2Test extends ActorTest {
val bldg = Building(10, Zone.Nowhere, StructureType.Building)
bldg.Faction = PlanetSideEmpire.TR
bldg.Actor = system.actorOf(Props(classOf[BuildingControl], bldg), "test")
bldg.Actor ! "startup"
"Building Control" should {
"convert and assert faction affinity on convert request" in {
expectNoMsg(250 milliseconds)
bldg.Actor ! "startup"
expectNoMsg(250 milliseconds)
expectNoMsg(500 milliseconds)
assert(bldg.Faction == PlanetSideEmpire.TR)
bldg.Actor ! FactionAffinity.ConvertFactionAffinity(PlanetSideEmpire.VS)
@ -159,12 +159,11 @@ class BuildingControl3Test extends ActorTest {
door2.Actor = system.actorOf(Props(classOf[DoorControl], door2), "door2-test")
bldg.Amenities = door2
bldg.Amenities = door1
bldg.Actor ! "startup"
"Building Control" should {
"convert and assert faction affinity on convert request, and for each of its amenities" in {
expectNoMsg(250 milliseconds)
bldg.Actor ! "startup"
expectNoMsg(250 milliseconds)
expectNoMsg(500 milliseconds)
assert(bldg.Faction == PlanetSideEmpire.TR)
assert(bldg.Amenities.length == 2)
@ -172,7 +171,8 @@ class BuildingControl3Test extends ActorTest {
assert(bldg.Amenities(1) == door1)
bldg.Actor ! FactionAffinity.ConvertFactionAffinity(PlanetSideEmpire.VS)
val reply = receiveN(3, Duration.create(500, "ms"))
val reply = ActorTest.receiveMultiple(3, 500 milliseconds, this)
//val reply = receiveN(3, Duration.create(5000, "ms"))
assert(reply.length == 3)
var building_count = 0
var door_count = 0