mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-04 04:30:21 +00:00
Basic lattice functionality (#296)
* Move isMoving check to outer block to fix scoping issues * Initial basic lattice functionality * Small tweaks to tests
This commit is contained in:
parent
28beea4e30
commit
7b6063055a
36 changed files with 1335 additions and 932 deletions
|
|
@ -30,7 +30,7 @@ class AmenityTest extends Specification {
|
|||
|
||||
"can be owned by a building" in {
|
||||
val ao = new AmenityObject()
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
|
||||
ao.Owner = bldg
|
||||
ao.Owner mustEqual bldg
|
||||
|
|
@ -54,7 +54,7 @@ class AmenityTest extends Specification {
|
|||
"confer faction allegiance through ownership" in {
|
||||
//see FactionAffinityTest
|
||||
val ao = new AmenityObject()
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
ao.Owner = bldg
|
||||
bldg.Faction mustEqual PlanetSideEmpire.NEUTRAL
|
||||
ao.Faction mustEqual PlanetSideEmpire.NEUTRAL
|
||||
|
|
@ -69,7 +69,7 @@ class AmenityTest extends Specification {
|
|||
class BuildingTest extends Specification {
|
||||
"Building" should {
|
||||
"construct" in {
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
bldg.MapId mustEqual 10
|
||||
bldg.Actor mustEqual ActorRef.noSender
|
||||
bldg.Amenities mustEqual Nil
|
||||
|
|
@ -78,7 +78,7 @@ class BuildingTest extends Specification {
|
|||
}
|
||||
|
||||
"change faction affinity" in {
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
bldg.Faction mustEqual PlanetSideEmpire.NEUTRAL
|
||||
|
||||
bldg.Faction = PlanetSideEmpire.TR
|
||||
|
|
@ -86,7 +86,7 @@ class BuildingTest extends Specification {
|
|||
}
|
||||
|
||||
"keep track of amenities" in {
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val door1 = Door(GlobalDefinitions.door)
|
||||
val door2 = Door(GlobalDefinitions.door)
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ class BuildingTest extends Specification {
|
|||
class WarpGateTest extends Specification {
|
||||
"WarpGate" should {
|
||||
"construct" in {
|
||||
val bldg = WarpGate(0, 10, Zone.Nowhere, GlobalDefinitions.warpgate)
|
||||
val bldg = WarpGate("Building", 0, 10, Zone.Nowhere, GlobalDefinitions.warpgate)
|
||||
bldg.MapId mustEqual 10
|
||||
bldg.Actor mustEqual ActorRef.noSender
|
||||
bldg.Amenities mustEqual Nil
|
||||
|
|
@ -117,7 +117,7 @@ class WarpGateTest extends Specification {
|
|||
class BuildingControl1Test extends ActorTest {
|
||||
"Building Control" should {
|
||||
"construct" in {
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
bldg.Actor = system.actorOf(Props(classOf[BuildingControl], bldg), "test")
|
||||
assert(bldg.Actor != ActorRef.noSender)
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ class BuildingControl1Test extends ActorTest {
|
|||
|
||||
class BuildingControl2Test extends ActorTest {
|
||||
ServiceManager.boot(system) ! ServiceManager.Register(Props[GalaxyService], "galaxy")
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
bldg.Faction = PlanetSideEmpire.TR
|
||||
bldg.Actor = system.actorOf(Props(classOf[BuildingControl], bldg), "test")
|
||||
bldg.Actor ! "startup"
|
||||
|
|
@ -148,7 +148,7 @@ class BuildingControl2Test extends ActorTest {
|
|||
|
||||
class BuildingControl3Test extends ActorTest {
|
||||
ServiceManager.boot(system) ! ServiceManager.Register(Props[GalaxyService], "galaxy")
|
||||
val bldg = Building(0, 10, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", 0, 10, Zone.Nowhere, StructureType.Building)
|
||||
bldg.Faction = PlanetSideEmpire.TR
|
||||
bldg.Actor = system.actorOf(Props(classOf[BuildingControl], bldg), "test")
|
||||
val door1 = Door(GlobalDefinitions.door)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ object DoorControlTest {
|
|||
def SetUpAgents(faction : PlanetSideEmpire.Value)(implicit system : ActorSystem) : (Player, Door) = {
|
||||
val door = Door(GlobalDefinitions.door)
|
||||
door.Actor = system.actorOf(Props(classOf[DoorControl], door), "door")
|
||||
door.Owner = new Building(building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
door.Owner = new Building("Building", building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
door.Owner.Faction = faction
|
||||
(Player(Avatar("test", faction, CharacterGender.Male, 0, CharacterVoice.Mute)), door)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class FacilityTurretControl2Test extends ActorTest {
|
|||
val obj = FacilityTurret(GlobalDefinitions.manned_turret)
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
obj.Actor = system.actorOf(Props(classOf[FacilityTurretControl], obj), "turret-control")
|
||||
val bldg = Building(guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building)
|
||||
bldg.Amenities = obj
|
||||
bldg.Faction = PlanetSideEmpire.TR
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ class FacilityTurretControl3Test extends ActorTest {
|
|||
val obj = FacilityTurret(GlobalDefinitions.manned_turret)
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
obj.Actor = system.actorOf(Props(classOf[FacilityTurretControl], obj), "turret-control")
|
||||
val bldg = Building(guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building)
|
||||
bldg.Amenities = obj
|
||||
|
||||
"FacilityTurretControl" should {
|
||||
|
|
@ -157,7 +157,7 @@ class FacilityTurretControl4Test extends ActorTest {
|
|||
val obj = FacilityTurret(objDef)
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
obj.Actor = system.actorOf(Props(classOf[FacilityTurretControl], obj), "turret-control")
|
||||
val bldg = Building(guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building)
|
||||
val bldg = Building("Building", guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building)
|
||||
bldg.Amenities = obj
|
||||
|
||||
"FacilityTurretControl" should {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class FactionAffinityTest extends Specification {
|
|||
|
||||
"inherits affinity from owner 2" in {
|
||||
val obj = new Door(GlobalDefinitions.door)
|
||||
val bldg = new Building(building_guid = 0, map_id = 1, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
val bldg = new Building("Building", building_guid = 0, map_id = 1, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
obj.Owner = bldg
|
||||
obj.Faction mustEqual PlanetSideEmpire.NEUTRAL
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class IFFLockControl2Test extends ActorTest {
|
|||
|
||||
class IFFLockControl3Test extends ActorTest {
|
||||
"IFFLockControl" should {
|
||||
"can hack" in {
|
||||
"can clear hack" in {
|
||||
val (player, lock) = IFFLockControlTest.SetUpAgents(PlanetSideEmpire.TR)
|
||||
player.GUID = PlanetSideGUID(1)
|
||||
assert(lock.HackedBy.isEmpty)
|
||||
|
|
@ -89,7 +89,7 @@ object IFFLockControlTest {
|
|||
def SetUpAgents(faction : PlanetSideEmpire.Value)(implicit system : ActorSystem) : (Player, IFFLock) = {
|
||||
val lock = IFFLock(GlobalDefinitions.lock_external)
|
||||
lock.Actor = system.actorOf(Props(classOf[IFFLockControl], lock), "lock-control")
|
||||
lock.Owner = new Building(building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
lock.Owner = new Building("Building", building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
lock.Owner.Faction = faction
|
||||
(Player(Avatar("test", faction, CharacterGender.Male, 0, CharacterVoice.Mute)), lock)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class ResourceSiloTest extends Specification {
|
|||
obj.ChargeLevel = -5
|
||||
obj.ChargeLevel mustEqual 0
|
||||
|
||||
obj.ChargeLevel = 1250
|
||||
obj.ChargeLevel = obj.MaximumCharge + 100
|
||||
obj.ChargeLevel mustEqual 1000
|
||||
obj.ChargeLevel mustEqual obj.MaximumCharge
|
||||
}
|
||||
|
|
@ -103,13 +103,12 @@ class ResourceSiloControlUseTest extends ActorTest {
|
|||
}
|
||||
|
||||
class ResourceSiloControlNtuWarningTest extends ActorTest {
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
val bldg = new Building(building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
||||
val obj = ResourceSilo()
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
||||
obj.Actor ! "startup"
|
||||
obj.Owner = bldg
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
obj.Owner = new Building("Building", building_guid = 6, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
val zoneEvents = TestProbe("zone-events")
|
||||
|
||||
"Resource silo" should {
|
||||
|
|
@ -135,12 +134,12 @@ class ResourceSiloControlNtuWarningTest extends ActorTest {
|
|||
}
|
||||
|
||||
class ResourceSiloControlUpdate1Test extends ActorTest {
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
val bldg = new Building(building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
||||
val obj = ResourceSilo()
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
||||
obj.Actor ! "startup"
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
val bldg = new Building("Building", building_guid = 6, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
obj.Owner = bldg
|
||||
val zoneEvents = TestProbe("zone-events")
|
||||
val buildingEvents = TestProbe("building-events")
|
||||
|
|
@ -200,12 +199,12 @@ class ResourceSiloControlUpdate1Test extends ActorTest {
|
|||
}
|
||||
|
||||
class ResourceSiloControlUpdate2Test extends ActorTest {
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
val bldg = new Building(building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
||||
val obj = ResourceSilo()
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
||||
obj.Actor ! "startup"
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
val bldg = new Building("Building", building_guid = 6, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
obj.Owner = bldg
|
||||
val zoneEvents = TestProbe("zone-events")
|
||||
val buildingEvents = TestProbe("building-events")
|
||||
|
|
@ -257,12 +256,12 @@ class ResourceSiloControlUpdate2Test extends ActorTest {
|
|||
}
|
||||
|
||||
class ResourceSiloControlNoUpdateTest extends ActorTest {
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
val bldg = new Building(building_guid = 6, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
||||
val obj = ResourceSilo()
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
obj.Actor = system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
||||
obj.Actor ! "startup"
|
||||
val zone = new Zone("nowhere", new ZoneMap("nowhere-map"), 0)
|
||||
val bldg = new Building("Building", building_guid = 6, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
obj.Owner = bldg
|
||||
val zoneEvents = TestProbe("zone-events")
|
||||
val buildingEvents = TestProbe("building-events")
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import scala.concurrent.duration.Duration
|
|||
class BuildingBuilderTest extends ActorTest {
|
||||
"Building object" should {
|
||||
"build" in {
|
||||
val structure : (Int,Int,Zone,ActorContext)=>Building = Building.Structure(StructureType.Building)
|
||||
val structure : (String, Int,Int,Zone,ActorContext)=>Building = Building.Structure(StructureType.Building)
|
||||
val actor = system.actorOf(Props(classOf[ServerObjectBuilderTest.BuildingTestActor], structure, 10, 10, Zone.Nowhere), "building")
|
||||
actor ! "!"
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ class BuildingBuilderTest extends ActorTest {
|
|||
class WarpGateBuilderTest extends ActorTest {
|
||||
"WarpGate object" should {
|
||||
"build" in {
|
||||
val structure : (Int,Int,Zone,ActorContext)=>Building = WarpGate.Structure
|
||||
val structure : (String,Int,Int,Zone,ActorContext)=>Building = WarpGate.Structure
|
||||
val actor = system.actorOf(Props(classOf[ServerObjectBuilderTest.BuildingTestActor], structure, 10, 10, Zone.Nowhere), "wgate")
|
||||
actor ! "!"
|
||||
|
||||
|
|
@ -279,10 +279,10 @@ object ServerObjectBuilderTest {
|
|||
}
|
||||
}
|
||||
|
||||
class BuildingTestActor(structure_con : (Int,Int,Zone,ActorContext)=>Building, building_guid : Int, map_id : Int, zone : Zone) extends Actor {
|
||||
class BuildingTestActor(structure_con : (String,Int,Int,Zone,ActorContext)=>Building, name: String, building_guid : Int, map_id : Int, zone : Zone) extends Actor {
|
||||
def receive : Receive = {
|
||||
case _ =>
|
||||
sender ! FoundationBuilder(structure_con).Build(building_guid, map_id, zone)(context)
|
||||
sender ! FoundationBuilder(structure_con).Build(name, building_guid, map_id, zone)(context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ object VehicleSpawnPadControlTest {
|
|||
|
||||
val pad = VehicleSpawnPad(GlobalDefinitions.mb_pad_creation)
|
||||
pad.Actor = system.actorOf(Props(classOf[VehicleSpawnControl], pad), s"test-pad-${System.nanoTime()}")
|
||||
pad.Owner = new Building(building_guid = 0, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
||||
pad.Owner = new Building("Building", building_guid = 0, map_id = 0, zone, StructureType.Building, GlobalDefinitions.building)
|
||||
pad.Owner.Faction = faction
|
||||
val player = Player(Avatar("test", faction, CharacterGender.Male, 0, CharacterVoice.Mute))
|
||||
player.GUID = PlanetSideGUID(10)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import org.specs2.mutable.Specification
|
|||
import scala.concurrent.duration._
|
||||
|
||||
class ZoneTest extends Specification {
|
||||
def test(a: Int, b: Int, c : Zone, d : ActorContext) : Building = { Building.NoBuilding }
|
||||
def test(a: String, b: Int, c: Int, d : Zone, e : ActorContext) : Building = { Building.NoBuilding }
|
||||
|
||||
"ZoneMap" should {
|
||||
"construct" in {
|
||||
|
|
@ -33,11 +33,11 @@ class ZoneTest extends Specification {
|
|||
"references bases by a positive building id (defaults to 0)" in {
|
||||
val map = new ZoneMap("map13")
|
||||
map.LocalBuildings mustEqual Map.empty
|
||||
map.LocalBuilding(building_guid = 10, map_id = 0, FoundationBuilder(test))
|
||||
map.LocalBuildings.keySet.contains((10, 0)) mustEqual true
|
||||
map.LocalBuilding(building_guid = -1, map_id = 0, FoundationBuilder(test))
|
||||
map.LocalBuildings.keySet.contains((10, 0)) mustEqual true
|
||||
map.LocalBuildings.keySet.contains((-1, 0)) mustEqual false
|
||||
map.LocalBuilding("Building", building_guid = 10, map_id = 0, FoundationBuilder(test))
|
||||
map.LocalBuildings.keySet.contains(("Building", 10, 0)) mustEqual true
|
||||
map.LocalBuilding("Building", building_guid = -1, map_id = 0, FoundationBuilder(test))
|
||||
map.LocalBuildings.keySet.contains(("Building", 10, 0)) mustEqual true
|
||||
map.LocalBuildings.keySet.contains(("Building", -1, 0)) mustEqual false
|
||||
}
|
||||
|
||||
"associates objects to bases (doesn't check numbers)" in {
|
||||
|
|
@ -87,7 +87,7 @@ class ZoneTest extends Specification {
|
|||
}
|
||||
|
||||
val map13 = new ZoneMap("map13")
|
||||
map13.LocalBuilding(building_guid = 0, map_id = 10, FoundationBuilder(test))
|
||||
map13.LocalBuilding("Building", building_guid = 0, map_id = 10, FoundationBuilder(test))
|
||||
class TestObject extends IdentifiableEntity
|
||||
|
||||
"Zone" should {
|
||||
|
|
@ -172,7 +172,7 @@ class ZoneActorTest extends ActorTest {
|
|||
|
||||
"set up spawn groups based on buildings" in {
|
||||
val map6 = new ZoneMap("map6") {
|
||||
LocalBuilding(building_guid = 1, map_id = 1, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
LocalBuilding("Building", building_guid = 1, map_id = 1, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
LocalObject(1, SpawnTube.Constructor(Vector3.Zero, Vector3.Zero))
|
||||
LocalObject(2, Terminal.Constructor(Vector3.Zero, GlobalDefinitions.dropship_vehicle_terminal))
|
||||
LocalObject(3, SpawnTube.Constructor(Vector3.Zero, Vector3.Zero))
|
||||
|
|
@ -180,11 +180,11 @@ class ZoneActorTest extends ActorTest {
|
|||
ObjectToBuilding(2, 1)
|
||||
ObjectToBuilding(3, 1)
|
||||
|
||||
LocalBuilding(building_guid = 2, map_id = 2, FoundationBuilder(Building.Structure(StructureType.Building)))
|
||||
LocalBuilding("Building", building_guid = 2, map_id = 2, FoundationBuilder(Building.Structure(StructureType.Building)))
|
||||
LocalObject(7, SpawnTube.Constructor(Vector3.Zero, Vector3.Zero))
|
||||
ObjectToBuilding(7, 2)
|
||||
|
||||
LocalBuilding(building_guid = 3, map_id = 3, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
LocalBuilding("Building", building_guid = 3, map_id = 3, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
LocalObject(4, Terminal.Constructor(Vector3.Zero, GlobalDefinitions.dropship_vehicle_terminal))
|
||||
LocalObject(5, SpawnTube.Constructor(Vector3.Zero, Vector3.Zero))
|
||||
LocalObject(6, Terminal.Constructor(Vector3.Zero, GlobalDefinitions.dropship_vehicle_terminal))
|
||||
|
|
@ -222,11 +222,11 @@ class ZoneActorTest extends ActorTest {
|
|||
|
||||
"select spawn points based on the position of the player in reference to buildings" in {
|
||||
val map6 = new ZoneMap("map6") {
|
||||
LocalBuilding(building_guid = 1, map_id = 1, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
LocalBuilding("Building", building_guid = 1, map_id = 1, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
LocalObject(1, SpawnTube.Constructor(Vector3.Zero, Vector3.Zero))
|
||||
ObjectToBuilding(1, 1)
|
||||
|
||||
LocalBuilding(building_guid = 3, map_id = 3, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(4,4,4))))
|
||||
LocalBuilding("Building", building_guid = 3, map_id = 3, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(4,4,4))))
|
||||
LocalObject(5, SpawnTube.Constructor(Vector3.Zero, Vector3.Zero))
|
||||
ObjectToBuilding(5, 3)
|
||||
}
|
||||
|
|
@ -255,9 +255,9 @@ class ZoneActorTest extends ActorTest {
|
|||
|
||||
"will report if no spawn points have been found in a zone" in {
|
||||
val map6 = new ZoneMap("map6") {
|
||||
LocalBuilding(building_guid = 1, map_id = 1, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
LocalBuilding("Building", building_guid = 1, map_id = 1, FoundationBuilder(Building.Structure(StructureType.Building, Vector3(1,1,1))))
|
||||
|
||||
LocalBuilding(building_guid = 3, map_id = 3, FoundationBuilder(Building.Structure(StructureType.Tower, Vector3(4,4,4))))
|
||||
LocalBuilding("Building", building_guid = 3, map_id = 3, FoundationBuilder(Building.Structure(StructureType.Tower, Vector3(4,4,4))))
|
||||
LocalObject(5, SpawnTube.Constructor(Vector3.Zero, Vector3.Zero))
|
||||
ObjectToBuilding(5, 3)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ object ImplantTerminalMechTest {
|
|||
|
||||
val terminal = ImplantTerminalMech(GlobalDefinitions.implant_terminal_mech)
|
||||
terminal.Actor = system.actorOf(Props(classOf[ImplantTerminalMechControl], terminal), "mech")
|
||||
terminal.Owner = new Building(building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
terminal.Owner = new Building("Building", building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
terminal.Owner.Faction = faction
|
||||
terminal.GUID = PlanetSideGUID(1)
|
||||
(Player(Avatar("test", faction, CharacterGender.Male, 0, CharacterVoice.Mute)), terminal)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class OrderTerminalTest extends Specification {
|
|||
val avatar = Avatar("test", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Mute)
|
||||
val player = Player(avatar)
|
||||
|
||||
val building = new Building(building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
val building = new Building("Building", building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
building.Faction = PlanetSideEmpire.TR
|
||||
val infantryTerminal = Terminal(GlobalDefinitions.order_terminal)
|
||||
infantryTerminal.Owner = building
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class ProximityTerminalControlStartTest extends ActorTest {
|
|||
}
|
||||
val terminal = new ProximityTerminal(GlobalDefinitions.medical_terminal)
|
||||
terminal.Actor = system.actorOf(Props(classOf[ProximityTerminalControl], terminal), "test-prox")
|
||||
new Building(building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
new Building("Building", building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
Amenities = terminal
|
||||
Faction = PlanetSideEmpire.VS
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ class ProximityTerminalControlTwoUsersTest extends ActorTest {
|
|||
}
|
||||
val terminal = new ProximityTerminal(GlobalDefinitions.medical_terminal)
|
||||
terminal.Actor = system.actorOf(Props(classOf[ProximityTerminalControl], terminal), "test-prox")
|
||||
new Building(building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
new Building("Building", building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
Amenities = terminal
|
||||
Faction = PlanetSideEmpire.VS
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ class ProximityTerminalControlStopTest extends ActorTest {
|
|||
}
|
||||
val terminal = new ProximityTerminal(GlobalDefinitions.medical_terminal)
|
||||
terminal.Actor = system.actorOf(Props(classOf[ProximityTerminalControl], terminal), "test-prox")
|
||||
new Building(building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
new Building("Building", building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
Amenities = terminal
|
||||
Faction = PlanetSideEmpire.VS
|
||||
}
|
||||
|
|
@ -236,11 +236,9 @@ class ProximityTerminalControlNotStopTest extends ActorTest {
|
|||
AddPool("dynamic", 1 to 10)
|
||||
}
|
||||
}
|
||||
val probe = new TestProbe(system)
|
||||
zone.LocalEvents = probe.ref
|
||||
val terminal = new ProximityTerminal(GlobalDefinitions.medical_terminal)
|
||||
terminal.Actor = system.actorOf(Props(classOf[ProximityTerminalControl], terminal), "test-prox")
|
||||
new Building(building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
new Building("Building", building_guid = 0, map_id = 0, zone, StructureType.Facility, GlobalDefinitions.building) {
|
||||
Amenities = terminal
|
||||
Faction = PlanetSideEmpire.VS
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ object TerminalControlTest {
|
|||
def SetUpAgents(tdef : TerminalDefinition, faction : PlanetSideEmpire.Value)(implicit system : ActorSystem) : (Player, Terminal) = {
|
||||
val terminal = Terminal(tdef)
|
||||
terminal.Actor = system.actorOf(Props(classOf[TerminalControl], terminal), "test-term")
|
||||
terminal.Owner = new Building(building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
terminal.Owner = new Building("Building", building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Building, GlobalDefinitions.building)
|
||||
terminal.Owner.Faction = faction
|
||||
(Player(Avatar("test", faction, CharacterGender.Male, 0, CharacterVoice.Mute)), terminal)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue