mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-03 04:00:20 +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
|
|
@ -15,7 +15,12 @@ import net.psforever.objects.zones.Zone
|
|||
import net.psforever.packet.game._
|
||||
import net.psforever.types.{PlanetSideEmpire, Vector3}
|
||||
|
||||
class Building(private val building_guid : Int, private val map_id : Int, val zone : Zone, private val buildingType : StructureType.Value, private val buildingDefinition : ObjectDefinition) extends PlanetSideServerObject
|
||||
class Building(private val name: String,
|
||||
private val building_guid : Int,
|
||||
private val map_id : Int,
|
||||
private val zone : Zone,
|
||||
private val buildingType : StructureType.Value,
|
||||
private val buildingDefinition : ObjectDefinition) extends PlanetSideServerObject {
|
||||
with AmenityOwner {
|
||||
/**
|
||||
* The map_id is the identifier number used in BuildingInfoUpdateMessage. This is the index that the building appears in the MPO file starting from index 1
|
||||
|
|
@ -28,6 +33,10 @@ class Building(private val building_guid : Int, private val map_id : Int, val zo
|
|||
|
||||
GUID = PlanetSideGUID(building_guid)
|
||||
|
||||
override def toString = name
|
||||
|
||||
def Name : String = name
|
||||
|
||||
def MapId : Int = map_id
|
||||
|
||||
def Faction : PlanetSideEmpire.Value = faction
|
||||
|
|
@ -60,6 +69,27 @@ class Building(private val building_guid : Int, private val map_id : Int, val zo
|
|||
playersInSOI
|
||||
}
|
||||
|
||||
def Zone : Zone = zone
|
||||
|
||||
// Get all lattice neighbours
|
||||
def Neighbours: Option[Set[Building]] = {
|
||||
zone.Lattice find this match {
|
||||
case Some(x) => Some(x.diSuccessors.map(x => x.toOuter))
|
||||
case None => None;
|
||||
}
|
||||
}
|
||||
|
||||
// Get all lattice neighbours matching the specified faction
|
||||
def Neighbours(faction: PlanetSideEmpire.Value): Option[Set[Building]] = {
|
||||
this.Neighbours match {
|
||||
case Some(x: Set[Building]) => {
|
||||
val matching = x.filter(b => b.Faction == faction)
|
||||
if(matching.isEmpty) None else Some(matching)
|
||||
}
|
||||
case None => None
|
||||
}
|
||||
}
|
||||
|
||||
def Info : (
|
||||
Int,
|
||||
Boolean, PlanetSideEmpire.Value, Long, PlanetSideEmpire.Value,
|
||||
|
|
@ -138,42 +168,42 @@ class Building(private val building_guid : Int, private val map_id : Int, val zo
|
|||
}
|
||||
|
||||
object Building {
|
||||
final val NoBuilding : Building = new Building(building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Platform, GlobalDefinitions.building) {
|
||||
final val NoBuilding : Building = new Building(name = "", building_guid = 0, map_id = 0, Zone.Nowhere, StructureType.Platform, GlobalDefinitions.building) {
|
||||
override def Faction_=(faction : PlanetSideEmpire.Value) : PlanetSideEmpire.Value = PlanetSideEmpire.NEUTRAL
|
||||
override def Amenities_=(obj : Amenity) : List[Amenity] = Nil
|
||||
}
|
||||
|
||||
def apply(guid : Int, map_id : Int, zone : Zone, buildingType : StructureType.Value) : Building = {
|
||||
new Building(guid, map_id, zone, buildingType, GlobalDefinitions.building)
|
||||
def apply(name : String, guid : Int, map_id : Int, zone : Zone, buildingType : StructureType.Value) : Building = {
|
||||
new Building(name, guid, map_id, zone, buildingType, GlobalDefinitions.building)
|
||||
}
|
||||
|
||||
def Structure(buildingType : StructureType.Value, location : Vector3, definition: ObjectDefinition)(guid : Int, map_id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
def Structure(buildingType : StructureType.Value, location : Vector3, definition: ObjectDefinition)(name : String, guid : Int, map_id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
import akka.actor.Props
|
||||
val obj = new Building(guid, map_id, zone, buildingType, definition)
|
||||
val obj = new Building(name, guid, map_id, zone, buildingType, definition)
|
||||
obj.Position = location
|
||||
obj.Actor = context.actorOf(Props(classOf[BuildingControl], obj), s"$map_id-$buildingType-building")
|
||||
obj
|
||||
}
|
||||
|
||||
def Structure(buildingType : StructureType.Value, location : Vector3)(guid : Int, map_id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
def Structure(buildingType : StructureType.Value, location : Vector3)(name : String, guid : Int, map_id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
import akka.actor.Props
|
||||
|
||||
val obj = new Building(guid, map_id, zone, buildingType, GlobalDefinitions.building)
|
||||
val obj = new Building(name, guid, map_id, zone, buildingType, GlobalDefinitions.building)
|
||||
obj.Position = location
|
||||
obj.Actor = context.actorOf(Props(classOf[BuildingControl], obj), s"$map_id-$buildingType-building")
|
||||
obj
|
||||
}
|
||||
|
||||
def Structure(buildingType : StructureType.Value)(guid: Int, map_id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
def Structure(buildingType : StructureType.Value)(name : String, guid: Int, map_id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
import akka.actor.Props
|
||||
val obj = new Building(guid, map_id, zone, buildingType, GlobalDefinitions.building)
|
||||
val obj = new Building(name, guid, map_id, zone, buildingType, GlobalDefinitions.building)
|
||||
obj.Actor = context.actorOf(Props(classOf[BuildingControl], obj), s"$map_id-$buildingType-building")
|
||||
obj
|
||||
}
|
||||
|
||||
def Structure(buildingType : StructureType.Value, buildingDefinition : ObjectDefinition, location : Vector3)(guid: Int, id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
def Structure(buildingType : StructureType.Value, buildingDefinition : ObjectDefinition, location : Vector3)(name: String, guid: Int, id : Int, zone : Zone, context : ActorContext) : Building = {
|
||||
import akka.actor.Props
|
||||
val obj = new Building(guid, id, zone, buildingType, buildingDefinition)
|
||||
val obj = new Building(name, guid, id, zone, buildingType, buildingDefinition)
|
||||
obj.Position = location
|
||||
obj.Actor = context.actorOf(Props(classOf[BuildingControl], obj), s"$id-$buildingType-building")
|
||||
obj
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import net.psforever.objects.zones.Zone
|
|||
* @see `Building`
|
||||
* @param constructor a curried function that eventually constructs a `Building` object
|
||||
*/
|
||||
class FoundationBuilder(private val constructor : (Int, Int, Zone, ActorContext)=>Building) {
|
||||
def Build(guid : Int, map_id: Int, zone : Zone)(implicit context : ActorContext = null) : Building = {
|
||||
val obj : Building = constructor(guid, map_id, zone, context)
|
||||
class FoundationBuilder(private val constructor : (String, Int, Int, Zone, ActorContext)=>Building) {
|
||||
def Build(name: String, guid : Int, map_id: Int, zone : Zone)(implicit context : ActorContext = null) : Building = {
|
||||
val obj : Building = constructor(name, guid, map_id, zone, context)
|
||||
obj
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ object FoundationBuilder {
|
|||
* @param constructor a curried function that eventually constructs a `Building` object
|
||||
* @return a `FoundationBuilder` object
|
||||
*/
|
||||
def apply(constructor : (Int, Int, Zone, ActorContext)=>Building) : FoundationBuilder = {
|
||||
def apply(constructor : (String, Int, Int, Zone, ActorContext)=>Building) : FoundationBuilder = {
|
||||
new FoundationBuilder(constructor)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import net.psforever.types.{PlanetSideEmpire, Vector3}
|
|||
|
||||
import scala.collection.mutable
|
||||
|
||||
class WarpGate(building_guid : Int, map_id : Int, zone : Zone, buildingDefinition : ObjectDefinition with SpawnPointDefinition)
|
||||
extends Building(building_guid, map_id, zone, StructureType.WarpGate, buildingDefinition)
|
||||
class WarpGate(name : String, building_guid : Int, map_id : Int, zone : Zone, buildingDefinition : ObjectDefinition with SpawnPointDefinition)
|
||||
extends Building(name, building_guid, map_id, zone, StructureType.WarpGate, buildingDefinition)
|
||||
with SpawnPoint {
|
||||
/** can this building be used as an active warp gate */
|
||||
private var active : Boolean = true
|
||||
|
|
@ -160,28 +160,28 @@ class WarpGate(building_guid : Int, map_id : Int, zone : Zone, buildingDefinitio
|
|||
}
|
||||
|
||||
object WarpGate {
|
||||
def apply(guid : Int, map_id : Int, zone : Zone, buildingDefinition : ObjectDefinition with SpawnPointDefinition) : WarpGate = {
|
||||
new WarpGate(guid, map_id, zone, buildingDefinition)
|
||||
def apply(name : String, guid : Int, map_id : Int, zone : Zone, buildingDefinition : ObjectDefinition with SpawnPointDefinition) : WarpGate = {
|
||||
new WarpGate(name, guid, map_id, zone, buildingDefinition)
|
||||
}
|
||||
|
||||
def Structure(guid : Int, map_id : Int, zone : Zone, context : ActorContext) : WarpGate = {
|
||||
def Structure(name : String, guid : Int, map_id : Int, zone : Zone, context : ActorContext) : WarpGate = {
|
||||
import akka.actor.Props
|
||||
val obj = new WarpGate(guid, map_id, zone, GlobalDefinitions.warpgate)
|
||||
val obj = new WarpGate(name, guid, map_id, zone, GlobalDefinitions.warpgate)
|
||||
obj.Actor = context.actorOf(Props(classOf[BuildingControl], obj), s"$map_id-gate")
|
||||
obj
|
||||
}
|
||||
|
||||
def Structure(location : Vector3)(guid : Int, map_id : Int, zone : Zone, context : ActorContext) : WarpGate = {
|
||||
def Structure(location : Vector3)(name : String, guid : Int, map_id : Int, zone : Zone, context : ActorContext) : WarpGate = {
|
||||
import akka.actor.Props
|
||||
val obj = new WarpGate(guid, map_id, zone, GlobalDefinitions.warpgate)
|
||||
val obj = new WarpGate(name, guid, map_id, zone, GlobalDefinitions.warpgate)
|
||||
obj.Position = location
|
||||
obj.Actor = context.actorOf(Props(classOf[BuildingControl], obj), s"$map_id-gate")
|
||||
obj
|
||||
}
|
||||
|
||||
def Structure(location : Vector3, buildingDefinition : ObjectDefinition with SpawnPointDefinition)(guid : Int, map_id : Int, zone : Zone, context : ActorContext) : WarpGate = {
|
||||
def Structure(location : Vector3, buildingDefinition : ObjectDefinition with SpawnPointDefinition)(name : String, guid : Int, map_id : Int, zone : Zone, context : ActorContext) : WarpGate = {
|
||||
import akka.actor.Props
|
||||
val obj = new WarpGate(guid, map_id, zone, buildingDefinition)
|
||||
val obj = new WarpGate(name, guid, map_id, zone, buildingDefinition)
|
||||
obj.Position = location
|
||||
obj.Actor = context.actorOf(Props(classOf[BuildingControl], obj), s"$map_id-gate")
|
||||
obj
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ import scala.collection.mutable.ListBuffer
|
|||
import scala.collection.immutable.{Map => PairMap}
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import scalax.collection.Graph
|
||||
import scalax.collection.GraphPredef._, scalax.collection.GraphEdge._
|
||||
|
||||
/**
|
||||
* A server object representing the one-landmass planets as well as the individual subterranean caverns.<br>
|
||||
* <br>
|
||||
|
|
@ -81,6 +84,9 @@ class Zone(private val zoneId : String, zoneMap : ZoneMap, zoneNumber : Int) {
|
|||
private var population : ActorRef = ActorRef.noSender
|
||||
|
||||
private var buildings : PairMap[Int, Building] = PairMap.empty[Int, Building]
|
||||
|
||||
private var lattice : Graph[Building, UnDiEdge] = Graph()
|
||||
|
||||
/** key - spawn zone id, value - buildings belonging to spawn zone */
|
||||
private var spawnGroups : Map[Building, List[SpawnPoint]] = PairMap[Building, List[SpawnPoint]]()
|
||||
/** */
|
||||
|
|
@ -134,6 +140,7 @@ class Zone(private val zoneId : String, zoneMap : ZoneMap, zoneNumber : Int) {
|
|||
BuildLocalObjects(context, guid)
|
||||
BuildSupportObjects()
|
||||
MakeBuildings(context)
|
||||
MakeLattice()
|
||||
AssignAmenities()
|
||||
CreateSpawnGroups()
|
||||
}
|
||||
|
|
@ -337,10 +344,18 @@ class Zone(private val zoneId : String, zoneMap : ZoneMap, zoneNumber : Int) {
|
|||
buildings.get(id)
|
||||
}
|
||||
|
||||
def Building(name : String) : Option[Building] = {
|
||||
buildings.values.find(_.Name == name)
|
||||
}
|
||||
|
||||
def BuildingByMapId(map_id : Int) : Option[Building] = {
|
||||
buildings.values.find(_.MapId == map_id)
|
||||
}
|
||||
|
||||
def Lattice : Graph[Building, UnDiEdge] = {
|
||||
lattice
|
||||
}
|
||||
|
||||
private def BuildLocalObjects(implicit context : ActorContext, guid : NumberPoolHub) : Unit = {
|
||||
Map.LocalObjects.foreach({ builderObject => builderObject.Build })
|
||||
}
|
||||
|
|
@ -379,7 +394,7 @@ class Zone(private val zoneId : String, zoneMap : ZoneMap, zoneNumber : Int) {
|
|||
|
||||
private def MakeBuildings(implicit context : ActorContext) : PairMap[Int, Building] = {
|
||||
val buildingList = Map.LocalBuildings
|
||||
buildings = buildingList.map({case((building_guid, map_id), constructor) => building_guid -> constructor.Build(building_guid, map_id, this) })
|
||||
buildings = buildingList.map({case((name, building_guid, map_id), constructor) => building_guid -> constructor.Build(name, building_guid, map_id, this) })
|
||||
buildings
|
||||
}
|
||||
|
||||
|
|
@ -413,6 +428,22 @@ class Zone(private val zoneId : String, zoneMap : ZoneMap, zoneNumber : Int) {
|
|||
}
|
||||
}
|
||||
|
||||
private def MakeLattice(): Unit = {
|
||||
Map.LatticeLink.foreach({ case(source, target) =>
|
||||
val sourceBuilding = Building(source) match {
|
||||
case Some(building) => building
|
||||
case _ => throw new NoSuchElementException(s"Can't create lattice link between ${source} ${target}. Source is missing")
|
||||
}
|
||||
|
||||
val targetBuilding = Building(target) match {
|
||||
case Some(building) => building
|
||||
case _ => throw new NoSuchElementException(s"Can't create lattice link between ${source} ${target}. Target is missing")
|
||||
}
|
||||
|
||||
lattice += sourceBuilding~targetBuilding
|
||||
})
|
||||
}
|
||||
|
||||
private def CreateSpawnGroups() : Unit = {
|
||||
buildings.values
|
||||
.filterNot { _.Position == Vector3.Zero }
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package net.psforever.objects.zones
|
|||
|
||||
import net.psforever.objects.serverobject.structures.FoundationBuilder
|
||||
import net.psforever.objects.serverobject.{PlanetSideServerObject, ServerObjectBuilder}
|
||||
import scalax.collection.Graph
|
||||
import scalax.collection.GraphPredef._, scalax.collection.GraphEdge._
|
||||
|
||||
/**
|
||||
* The fixed instantiation and relation of a series of server objects.<br>
|
||||
|
|
@ -32,7 +34,8 @@ class ZoneMap(private val name : String) {
|
|||
private var linkTerminalInterface : Map[Int, Int] = Map()
|
||||
private var linkDoorLock : Map[Int, Int] = Map()
|
||||
private var linkObjectBase : Map[Int, Int] = Map()
|
||||
private var buildings : Map[(Int, Int), FoundationBuilder] = Map()
|
||||
private var buildings : Map[(String, Int, Int), FoundationBuilder] = Map()
|
||||
private var lattice: Set[(String, String)] = Set()
|
||||
private var checksum : Long = 0
|
||||
|
||||
def Name : String = name
|
||||
|
|
@ -87,11 +90,11 @@ class ZoneMap(private val name : String) {
|
|||
localObjects.size
|
||||
}
|
||||
|
||||
def LocalBuildings : Map[(Int, Int), FoundationBuilder] = buildings
|
||||
def LocalBuildings : Map[(String, Int, Int), FoundationBuilder] = buildings
|
||||
|
||||
def LocalBuilding(building_guid : Int, map_id : Int, constructor : FoundationBuilder) : Int = {
|
||||
def LocalBuilding(name : String, building_guid : Int, map_id : Int, constructor : FoundationBuilder) : Int = {
|
||||
if(building_guid > 0) {
|
||||
buildings = buildings ++ Map((building_guid, map_id) -> constructor)
|
||||
buildings = buildings ++ Map((name, building_guid, map_id) -> constructor)
|
||||
}
|
||||
buildings.size
|
||||
}
|
||||
|
|
@ -125,4 +128,10 @@ class ZoneMap(private val name : String) {
|
|||
def TurretToWeapon(turret_guid : Int, weapon_guid : Int) : Unit = {
|
||||
linkTurretWeapon = linkTurretWeapon ++ Map(turret_guid -> weapon_guid)
|
||||
}
|
||||
|
||||
def LatticeLink : Set[(String, String)] = lattice
|
||||
|
||||
def LatticeLink(source : String, target: String) : Unit = {
|
||||
lattice = lattice ++ Set((source, target))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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