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:
Mazo 2019-12-10 14:17:55 +00:00 committed by Fate-JH
parent 28beea4e30
commit 7b6063055a
36 changed files with 1335 additions and 932 deletions

View file

@ -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)
}
}
}