progress towards multi-server handling

- bump some versions
- validate Factorio server ID & token
-
This commit is contained in:
Adam 2022-08-28 19:37:49 +02:00
parent 3821996eeb
commit 4bc46f9753
28 changed files with 577 additions and 139 deletions

View file

@ -158,7 +158,13 @@ class FactorioMap {
companion object {
const val DYNAMIC_RELOAD_ATT = "dynamic-reload"
private fun tileLayerUrlTemplate(layer: ServerMapTileLayer): String =
"/kafkatorio/data/servers/syslog-test/map/layers/${layer.dir}/s1/z{z}/x{x}/y{y}.png"
private val serverName: String
get() = window.location.pathname
.substringAfter("kafkatorio/data/servers/")
.substringBefore("/")
private fun tileLayerUrlTemplate(layer: ServerMapTileLayer): String {
return "/kafkatorio/data/servers/$serverName/map/layers/${layer.dir}/s1/z{z}/x{x}/y{y}.png"
}
}
}