From e51e970e512426d020bd1955580c381bcecec4cd Mon Sep 17 00:00:00 2001 From: Jakob Gillich Date: Tue, 26 May 2020 22:16:22 +0200 Subject: [PATCH] Update to Scala 2.13 & Akka 2.6.5 (#461) * update scala to 2.13 & update dependencies * fix test * import scodec-akka * scala 2.13 fixes * Work around futures not completing when awaited within object constructor Co-authored-by: Mazo --- .travis.yml | 4 +- Dockerfile | 17 ++- build.sbt | 38 +++--- .../scodec/interop/akka/PrivacyHelper.java | 13 +++ .../scala/scodec/interop/akka/package.scala | 16 +++ .../services/teamwork/SquadService.scala | 1 + .../teamwork/SquadServiceResponse.scala | 1 + common/src/test/scala/objects/ZoneTest.scala | 2 +- .../src/main/scala/LoginSessionActor.scala | 6 +- pslogin/src/main/scala/Maps.scala | 110 ++++++------------ .../src/main/scala/WorldSessionActor.scala | 10 +- pslogin/src/main/scala/Zones.scala | 48 ++++---- 12 files changed, 127 insertions(+), 139 deletions(-) create mode 100644 common/src/main/java/scodec/interop/akka/PrivacyHelper.java create mode 100644 common/src/main/scala/scodec/interop/akka/package.scala diff --git a/.travis.yml b/.travis.yml index 1e9d7303..21ab6c07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ jdk: oraclejdk8 dist: trusty scala: - - 2.11.8 + - 2.13.2 env: - SBT_COMMAND="test:compile quiet:test packArchiveZip" - SBT_COMMAND="coverage test:compile quiet:test coverageReport" @@ -21,7 +21,7 @@ before_script: - wget https://github.com/psforever/PSCrypto/releases/download/v1.1/pscrypto-lib-1.1.zip - unzip pscrypto-lib-1.1.zip script: - - sbt ++$TRAVIS_SCALA_VERSION $SBT_COMMAND + - sbt ++$TRAVIS_SCALA_VERSION $SBT_COMMAND after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/Dockerfile b/Dockerfile index 277197fe..147edd8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,16 @@ -FROM hseeberger/scala-sbt +FROM mozilla/sbt:8u232_1.3.8 EXPOSE 51000 EXPOSE 51001 +EXPOSE 51002 -# Download Login Server and pscrypto -RUN wget https://github.com/psforever/PSF-LoginServer/archive/master.zip && \ - unzip master.zip && rm master.zip && \ - cd PSF-LoginServer-master && \ - wget https://github.com/psforever/PSCrypto/releases/download/v1.1/pscrypto-lib-1.1.zip && \ +COPY . /PSF-LoginServer + +WORKDIR /PSF-LoginServer + +RUN wget https://github.com/psforever/PSCrypto/releases/download/v1.1/pscrypto-lib-1.1.zip && \ unzip pscrypto-lib-1.1.zip && rm pscrypto-lib-1.1.zip -WORKDIR /root/PSF-LoginServer-master - -# Download Scala Deps RUN sbt compile -# Run login server CMD ["sbt", "pslogin/run"] diff --git a/build.sbt b/build.sbt index 7e3106c7..4dd903cd 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import xerial.sbt.pack.PackPlugin._ lazy val commonSettings = Seq( organization := "net.psforever", version := "1.0.2-SNAPSHOT", - scalaVersion := "2.11.8", + scalaVersion := "2.13.2", scalacOptions := Seq("-unchecked", "-feature", "-deprecation", "-encoding", "utf8", "-language:postfixOps"), // Quiet test options @@ -28,27 +28,27 @@ lazy val commonSettings = Seq( classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat, resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", libraryDependencies ++= Seq( - "com.typesafe.akka" %% "akka-actor" % "2.4.4", - "com.typesafe.akka" %% "akka-testkit" % "2.4.8" % "test", - "com.typesafe.scala-logging" %% "scala-logging" % "3.1.0", - "org.specs2" %% "specs2-core" % "3.8.3" % "test", - "org.scalatest" %% "scalatest" % "3.0.1" % "test", - "org.scodec" %% "scodec-core" % "1.10.0", - "org.scodec" %% "scodec-akka" % "0.2.0", - "net.java.dev.jna" % "jna" % "4.2.1", - "com.typesafe.akka" %% "akka-slf4j" % "2.4.4", - "ch.qos.logback" % "logback-classic" % "1.1.7", - "org.log4s" %% "log4s" % "1.3.0", + "com.typesafe.akka" %% "akka-actor" % "2.6.5", + "com.typesafe.akka" %% "akka-testkit" % "2.6.5" % "test", + "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2", + "org.specs2" %% "specs2-core" % "4.9.4" % "test", + "org.scalatest" %% "scalatest" % "3.1.2" % "test", + "org.scodec" %% "scodec-core" % "1.11.7", + "net.java.dev.jna" % "jna" % "5.5.0", + "com.typesafe.akka" %% "akka-slf4j" % "2.6.5", + "ch.qos.logback" % "logback-classic" % "1.2.3", + "org.log4s" %% "log4s" % "1.8.2", "org.fusesource.jansi" % "jansi" % "1.12", - "org.scoverage" %% "scalac-scoverage-plugin" % "1.1.1", - "com.github.nscala-time" %% "nscala-time" % "2.12.0", - "com.github.mauricio" %% "postgresql-async" % "0.2.21", - "com.github.t3hnar" %% "scala-bcrypt" % "3.1", - "org.ini4j" % "ini4j" % "0.5.4", - "org.scala-graph" %% "graph-core" % "1.12.5", - "io.kamon" %% "kamon-bundle" % "2.1.0", + "org.scoverage" %% "scalac-scoverage-plugin" % "1.4.1", + "com.github.nscala-time" %% "nscala-time" % "2.24.0", + "com.github.postgresql-async" %% "postgresql-async" % "0.3.0", + "com.github.t3hnar" %% "scala-bcrypt" % "4.1", + "org.ini4j" % "ini4j" % "0.5.4", + "org.scala-graph" %% "graph-core" % "1.13.1", + "io.kamon" %% "kamon-bundle" % "2.1.0", "io.kamon" %% "kamon-apm-reporter" % "2.1.0", "org.json4s" %% "json4s-native" % "3.6.8", + "com.typesafe.akka" %% "akka-stream" % "2.6.5", ), ) diff --git a/common/src/main/java/scodec/interop/akka/PrivacyHelper.java b/common/src/main/java/scodec/interop/akka/PrivacyHelper.java new file mode 100644 index 00000000..1862a167 --- /dev/null +++ b/common/src/main/java/scodec/interop/akka/PrivacyHelper.java @@ -0,0 +1,13 @@ +package scodec.interop.akka; + +import java.nio.ByteBuffer; + +import akka.util.ByteString.ByteString1C; + +interface PrivacyHelper { + + static ByteString1C createByteString1C(byte[] array) { + return new ByteString1C(array); + } + +} \ No newline at end of file diff --git a/common/src/main/scala/scodec/interop/akka/package.scala b/common/src/main/scala/scodec/interop/akka/package.scala new file mode 100644 index 00000000..5cd0f1de --- /dev/null +++ b/common/src/main/scala/scodec/interop/akka/package.scala @@ -0,0 +1,16 @@ +package scodec.interop + +import scodec.bits.ByteVector + +import _root_.akka.util.ByteString + +package object akka { + + implicit class EnrichedByteString(val value: ByteString) extends AnyVal { + def toByteVector: ByteVector = ByteVector.viewAt((idx: Long) => value(idx.toInt), value.size.toLong) + } + + implicit class EnrichedByteVector(val value: ByteVector) extends AnyVal { + def toByteString: ByteString = PrivacyHelper.createByteString1C(value.toArray) + } +} \ No newline at end of file diff --git a/common/src/main/scala/services/teamwork/SquadService.scala b/common/src/main/scala/services/teamwork/SquadService.scala index 334455aa..233eee1e 100644 --- a/common/src/main/scala/services/teamwork/SquadService.scala +++ b/common/src/main/scala/services/teamwork/SquadService.scala @@ -10,6 +10,7 @@ import net.psforever.objects.zones.Zone import net.psforever.packet.game._ import net.psforever.types._ import services.{GenericEventBus, Service} +import services.teamwork.SquadAction import scala.collection.concurrent.TrieMap import scala.collection.mutable diff --git a/common/src/main/scala/services/teamwork/SquadServiceResponse.scala b/common/src/main/scala/services/teamwork/SquadServiceResponse.scala index 992905a6..59a3edd2 100644 --- a/common/src/main/scala/services/teamwork/SquadServiceResponse.scala +++ b/common/src/main/scala/services/teamwork/SquadServiceResponse.scala @@ -5,6 +5,7 @@ import net.psforever.objects.teamwork.Squad import net.psforever.packet.game._ import net.psforever.types.{PlanetSideGUID, SquadResponseType, SquadWaypoints} import services.GenericEventBusMsg +import services.teamwork.SquadAction final case class SquadServiceResponse(toChannel : String, exclude : Iterable[Long], response : SquadResponse.Response) extends GenericEventBusMsg diff --git a/common/src/test/scala/objects/ZoneTest.scala b/common/src/test/scala/objects/ZoneTest.scala index b92bc1dd..3bea483b 100644 --- a/common/src/test/scala/objects/ZoneTest.scala +++ b/common/src/test/scala/objects/ZoneTest.scala @@ -41,7 +41,7 @@ class ZoneTest extends Specification { "associates objects to bases (doesn't check numbers)" in { val map = new ZoneMap("map13") - map.ObjectToBuilding mustEqual Nil + map.ObjectToBuilding mustEqual Map.empty map.ObjectToBuilding(1, 2) map.ObjectToBuilding mustEqual Map(1 -> 2) map.ObjectToBuilding(3, 4) diff --git a/pslogin/src/main/scala/LoginSessionActor.scala b/pslogin/src/main/scala/LoginSessionActor.scala index 8e90c8e3..4d629268 100644 --- a/pslogin/src/main/scala/LoginSessionActor.scala +++ b/pslogin/src/main/scala/LoginSessionActor.scala @@ -153,7 +153,7 @@ class LoginSessionActor extends Actor with MDCContextAware { Database.getConnection.connect.onComplete { case Success(connection) => Database.query(connection.sendPreparedStatement( - "SELECT id, passhash, inactive, gm FROM accounts where username=?", Array(username) + "SELECT id, passhash, inactive, gm FROM accounts where username=?", List(username) )).onComplete { case Success(queryResult) => context.become(startAccountAuthentication) @@ -223,7 +223,7 @@ class LoginSessionActor extends Actor with MDCContextAware { connection.get.inTransaction { c => c.sendPreparedStatement( "INSERT INTO accounts (username, passhash) VALUES(?,?) RETURNING id", - Array(username, bcryptPassword) + List(username, bcryptPassword) ) }.onComplete { case Success(insertResult) => @@ -274,7 +274,7 @@ class LoginSessionActor extends Actor with MDCContextAware { connection.get.inTransaction { c => c.sendPreparedStatement( "INSERT INTO logins (account_id, login_time, ip_address, canonical_hostName, hostname, port) VALUES(?,?,?,?,?,?)", - Array(accountId, new java.sql.Timestamp(System.currentTimeMillis), ipAddress, canonicalHostName, hostName, port) + List(accountId, new java.sql.Timestamp(System.currentTimeMillis), ipAddress, canonicalHostName, hostName, port) ) }.onComplete { _ => diff --git a/pslogin/src/main/scala/Maps.scala b/pslogin/src/main/scala/Maps.scala index 8fc2f064..08e6f4b3 100644 --- a/pslogin/src/main/scala/Maps.scala +++ b/pslogin/src/main/scala/Maps.scala @@ -4,63 +4,25 @@ import net.psforever.objects.ballistics.Projectile import net.psforever.objects.zones.ZoneMap import zonemaps._ -import scala.concurrent.duration._ -import scala.concurrent.{Await, Future} +import scala.concurrent.Future +import scala.util.Success object Maps { import scala.concurrent.ExecutionContext.Implicits.global - val map1f = Future { Map01.ZoneMap } - val map2f = Future { Map02.ZoneMap } - val map3f = Future { Map03.ZoneMap } - val map4f = Future { Map04.ZoneMap } - val map5f = Future { Map05.ZoneMap } - val map6f = Future { Map06.ZoneMap } - val map7f = Future { Map07.ZoneMap } - val map8f = Future { Map08.ZoneMap } - val map9f = Future { Map09.ZoneMap } - val map10f = Future { Map10.ZoneMap } - val map11f = Future { Map11.ZoneMap } - val map12f = Future { Map12.ZoneMap } - val map13f = Future { Map13.ZoneMap } - val ugd01f = Future { Ugd01.ZoneMap } - val ugd02f = Future { Ugd02.ZoneMap } - val ugd03f = Future { Ugd03.ZoneMap } - val ugd04f = Future { Ugd04.ZoneMap } - val ugd05f = Future { Ugd05.ZoneMap } - val ugd06f = Future { Ugd06.ZoneMap } - val map96f = Future { Map96.ZoneMap } - val map97f = Future { Map97.ZoneMap } - val map98f = Future { Map98.ZoneMap } - val map99f = Future { Map99.ZoneMap } - - val map1 = Await.result(map1f, 30 seconds) - val map2 = Await.result(map2f, 30 seconds) - val map3 = Await.result(map3f, 30 seconds) - val map4 = Await.result(map4f, 30 seconds) - val map5 = Await.result(map5f, 30 seconds) - val map6 = Await.result(map6f, 30 seconds) - val map7 = Await.result(map7f, 30 seconds) - val map8 = Await.result(map8f, 30 seconds) - val map9 = Await.result(map9f, 30 seconds) - val map10 = Await.result(map10f, 30 seconds) - val map11 = Await.result(map11f, 30 seconds) - val map12 = Await.result(map12f, 30 seconds) - val map13 = Await.result(map13f, 30 seconds) - - Projectiles(map1) - Projectiles(map2) - Projectiles(map3) - Projectiles(map4) - Projectiles(map5) - Projectiles(map6) - Projectiles(map7) - Projectiles(map8) - Projectiles(map9) - Projectiles(map10) - Projectiles(map11) - Projectiles(map12) - Projectiles(map13) + val map01 = InitZoneMap(Future { Map01.ZoneMap }) + val map02 = InitZoneMap(Future { Map02.ZoneMap }) + val map03 = InitZoneMap(Future { Map03.ZoneMap }) + val map04 = InitZoneMap(Future { Map04.ZoneMap }) + val map05 = InitZoneMap(Future { Map05.ZoneMap }) + val map06 = InitZoneMap(Future { Map06.ZoneMap }) + val map07 = InitZoneMap(Future { Map07.ZoneMap }) + val map08 = InitZoneMap(Future { Map08.ZoneMap }) + val map09 = InitZoneMap(Future { Map09.ZoneMap }) + val map10 = InitZoneMap(Future { Map10.ZoneMap }) + val map11 = InitZoneMap(Future { Map11.ZoneMap }) + val map12 = InitZoneMap(Future { Map12.ZoneMap }) + val map13 = InitZoneMap(Future { Map13.ZoneMap }) val map14 = new ZoneMap("map14") { Projectiles(this) @@ -74,33 +36,29 @@ object Maps { Projectiles(this) } - val ugd01 = Await.result(ugd01f, 30 seconds) - val ugd02 = Await.result(ugd02f, 30 seconds) - val ugd03 = Await.result(ugd03f, 30 seconds) - val ugd04 = Await.result(ugd04f, 30 seconds) - val ugd05 = Await.result(ugd05f, 30 seconds) - val ugd06 = Await.result(ugd06f, 30 seconds) + val ugd01 = InitZoneMap(Future { Ugd01.ZoneMap }) + val ugd02 = InitZoneMap(Future { Ugd02.ZoneMap }) + val ugd03 = InitZoneMap(Future { Ugd03.ZoneMap }) + val ugd04 = InitZoneMap(Future { Ugd04.ZoneMap }) + val ugd05 = InitZoneMap(Future { Ugd05.ZoneMap }) + val ugd06 = InitZoneMap(Future { Ugd06.ZoneMap }) - Projectiles(ugd01) - Projectiles(ugd02) - Projectiles(ugd03) - Projectiles(ugd04) - Projectiles(ugd05) - Projectiles(ugd06) - - val map96 = Await.result(map96f, 30 seconds) - val map97 = Await.result(map97f, 30 seconds) - val map98 = Await.result(map98f, 30 seconds) - val map99 = Await.result(map99f, 30 seconds) - - Projectiles(map96) - Projectiles(map97) - Projectiles(map98) - Projectiles(map99) + val map96 = InitZoneMap(Future { Map96.ZoneMap }) + val map97 = InitZoneMap(Future { Map97.ZoneMap }) + val map98 = InitZoneMap(Future { Map98.ZoneMap }) + val map99 = InitZoneMap(Future { Map99.ZoneMap }) def Projectiles(zmap: ZoneMap): Unit = { (Projectile.BaseUID until Projectile.RangeUID) foreach { zmap.LocalObject(_, LocalProjectile.Constructor) } } -} + + def InitZoneMap(future : Future[ZoneMap]): Future[ZoneMap] = { + future onComplete { + case Success(x) => Projectiles(x) + } + + future + } +} \ No newline at end of file diff --git a/pslogin/src/main/scala/WorldSessionActor.scala b/pslogin/src/main/scala/WorldSessionActor.scala index ae5f4300..6c2aa689 100644 --- a/pslogin/src/main/scala/WorldSessionActor.scala +++ b/pslogin/src/main/scala/WorldSessionActor.scala @@ -691,7 +691,7 @@ class WorldSessionActor extends Actor c => c.sendPreparedStatement( "INSERT INTO characters (name, account_id, faction_id, gender_id, head_id, voice_id) VALUES(?,?,?,?,?,?) RETURNING id", - Array(name, account.AccountId, empire.id, gender.id, head, voice.id) + List(name, account.AccountId, empire.id, gender.id, head, voice.id) ) }.onComplete { case scala.util.Success(insertResult) => @@ -1786,7 +1786,7 @@ class WorldSessionActor extends Actor Database.getConnection.connect.onComplete { case scala.util.Success(connection) => Database.query(connection.sendPreparedStatement( - "UPDATE characters SET last_login = ? where id=?", Array(new java.sql.Timestamp(System.currentTimeMillis), charId) + "UPDATE characters SET last_login = ? where id=?", List(new java.sql.Timestamp(System.currentTimeMillis), charId) )).onComplete { case _ => if(connection.isConnected) connection.disconnect @@ -3954,7 +3954,7 @@ class WorldSessionActor extends Actor Database.getConnection.connect.onComplete { case scala.util.Success(connection) => Database.query(connection.sendPreparedStatement( - "SELECT account_id FROM characters where name ILIKE ? AND deleted = false", Array(name) + "SELECT account_id FROM characters where name ILIKE ? AND deleted = false", List(name) )).onComplete { case scala.util.Success(queryResult) => if(connection.isConnected) connection.disconnect @@ -10472,7 +10472,7 @@ class WorldSessionActor extends Actor queryResult match { case row: ArrayRowData => // Update connection.sendPreparedStatement( - "UPDATE loadouts SET exosuit_id=?, name=?, items=? where id=?", Array(exosuitId, label, clob.drop(1), row(0)) + "UPDATE loadouts SET exosuit_id=?, name=?, items=? where id=?", List(exosuitId, label, clob.drop(1), row(0)) ).onComplete { case _ => if(connection.isConnected) connection.disconnect @@ -10481,7 +10481,7 @@ class WorldSessionActor extends Actor case _ => // Save connection.sendPreparedStatement( "INSERT INTO loadouts (characters_id, loadout_number, exosuit_id, name, items) VALUES(?,?,?,?,?) RETURNING id", - Array(charId, line, exosuitId, label, clob.drop(1)) + List(charId, line, exosuitId, label, clob.drop(1)) ).onComplete { case _ => if(connection.isConnected) connection.disconnect diff --git a/pslogin/src/main/scala/Zones.scala b/pslogin/src/main/scala/Zones.scala index eb3d91b0..c2ca2170 100644 --- a/pslogin/src/main/scala/Zones.scala +++ b/pslogin/src/main/scala/Zones.scala @@ -6,9 +6,11 @@ import net.psforever.objects.serverobject.structures.WarpGate import net.psforever.objects.zones.Zone import net.psforever.types.PlanetSideEmpire +import scala.concurrent.duration._ +import scala.concurrent.Await object Zones { - val z1 = new Zone("z1", Maps.map1, 1) { + val z1 = new Zone("z1", Await.result(Maps.map01, 30 seconds), 1) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -18,7 +20,7 @@ object Zones { } } - val z2 = new Zone("z2", Maps.map2, 2) { + val z2 = new Zone("z2", Await.result(Maps.map02, 30 seconds), 2) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -28,7 +30,7 @@ object Zones { } } - val z3 = new Zone("z3", Maps.map3, 3) { + val z3 = new Zone("z3", Await.result(Maps.map03, 30 seconds), 3) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -38,7 +40,7 @@ object Zones { } } - val z4 = new Zone("z4", Maps.map4, 4) { + val z4 = new Zone("z4", Await.result(Maps.map04, 30 seconds), 4) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -110,7 +112,7 @@ object Zones { } } - val z5 = new Zone("z5", Maps.map5, 5) { + val z5 = new Zone("z5", Await.result(Maps.map05, 30 seconds), 5) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -120,7 +122,7 @@ object Zones { } } - val z6 = new Zone("z6", Maps.map6, 6) { + val z6 = new Zone("z6", Await.result(Maps.map06, 30 seconds), 6) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -135,7 +137,7 @@ object Zones { } } - val z7 = new Zone("z7", Maps.map7, 7) { + val z7 = new Zone("z7", Await.result(Maps.map07, 30 seconds), 7) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -145,7 +147,7 @@ object Zones { } } - val z8 = new Zone("z8", Maps.map8, 8) { + val z8 = new Zone("z8", Await.result(Maps.map08, 30 seconds), 8) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -155,7 +157,7 @@ object Zones { } } - val z9 = new Zone("z9", Maps.map9, 9) { + val z9 = new Zone("z9", Await.result(Maps.map09, 30 seconds), 9) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -165,7 +167,7 @@ object Zones { } } - val z10 = new Zone("z10", Maps.map10, 10) { + val z10 = new Zone("z10", Await.result(Maps.map10, 30 seconds), 10) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -175,7 +177,7 @@ object Zones { } } - val home1 = new Zone("home1", Maps.map11, 11){ + val home1 = new Zone("home1", Await.result(Maps.map11, 30 seconds), 11){ override def Init(implicit context : ActorContext) : Unit = { super.Init(context) @@ -186,7 +188,7 @@ object Zones { } } - val home2 = new Zone("home2", Maps.map12, 12){ + val home2 = new Zone("home2", Await.result(Maps.map12, 30 seconds), 12){ override def Init(implicit context : ActorContext) : Unit = { super.Init(context) @@ -197,7 +199,7 @@ object Zones { } } - val home3 = new Zone("home3", Maps.map13, 13) { + val home3 = new Zone("home3", Await.result(Maps.map13, 30 seconds), 13) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) @@ -226,7 +228,7 @@ object Zones { val tzcovs = new Zone("tzcovs", Maps.map16, 22) - val c1 = new Zone("c1", Maps.ugd01, 23) { + val c1 = new Zone("c1", Await.result(Maps.ugd01, 30 seconds), 23) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -236,7 +238,7 @@ object Zones { } } - val c2 = new Zone("c2", Maps.ugd02, 24) { + val c2 = new Zone("c2", Await.result(Maps.ugd02, 30 seconds), 24) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -246,7 +248,7 @@ object Zones { } } - val c3 = new Zone("c3", Maps.ugd03, 25) { + val c3 = new Zone("c3", Await.result(Maps.ugd03, 30 seconds), 25) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -256,7 +258,7 @@ object Zones { } } - val c4 = new Zone("c4", Maps.ugd04, 26) { + val c4 = new Zone("c4", Await.result(Maps.ugd04, 30 seconds), 26) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -266,7 +268,7 @@ object Zones { } } - val c5 = new Zone("c5", Maps.ugd05, 27) { + val c5 = new Zone("c5", Await.result(Maps.ugd05, 30 seconds), 27) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -276,7 +278,7 @@ object Zones { } } - val c6 = new Zone("c6", Maps.ugd06, 28) { + val c6 = new Zone("c6", Await.result(Maps.ugd06, 30 seconds), 28) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -286,7 +288,7 @@ object Zones { } } - val i1 = new Zone("i1", Maps.map99, 29) { + val i1 = new Zone("i1", Await.result(Maps.map99, 30 seconds), 29) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -296,7 +298,7 @@ object Zones { } } - val i2 = new Zone("i2", Maps.map98, 30) { + val i2 = new Zone("i2", Await.result(Maps.map98, 30 seconds), 30) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -306,7 +308,7 @@ object Zones { } } - val i3 = new Zone("i3", Maps.map97, 31) { + val i3 = new Zone("i3", Await.result(Maps.map97, 30 seconds), 31) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80) @@ -316,7 +318,7 @@ object Zones { } } - val i4 = new Zone("i4", Maps.map96, 32) { + val i4 = new Zone("i4", Await.result(Maps.map96, 30 seconds), 32) { override def Init(implicit context : ActorContext) : Unit = { super.Init(context) HotSpotCoordinateFunction = Zones.HotSpots.StandardRemapping(Map.Scale, 80, 80)