tidy up code
This commit is contained in:
parent
b0a6151c36
commit
2287582880
2 changed files with 1 additions and 23 deletions
|
|
@ -56,31 +56,9 @@ fun groupMapChunks(builder: StreamsBuilder): Topology {
|
|||
val mapChunksStream: KStream<FactorioServerId, MapChunkUpdate> = builder.streamPacketData()
|
||||
val protosStream: KStream<FactorioServerId, PrototypesUpdate> = builder.streamPacketData()
|
||||
|
||||
// val protosStream: KStream<FactorioServerId, KafkatorioPacket2> =
|
||||
// builder.stream<FactorioServerId?, KafkatorioPacket2?>(
|
||||
// prototypesTopicName,
|
||||
// consumedAs("consume.factorio-protos.all", jsonMapper.serde(), jsonMapper.serde())
|
||||
// ).filter { key: FactorioServerId?, value: KafkatorioPacket2? ->
|
||||
// key != null
|
||||
// && value != null
|
||||
// && value.data ==
|
||||
// }
|
||||
// .map
|
||||
|
||||
|
||||
val tileProtoColourDict: KTable<FactorioServerId, TileColourDict> =
|
||||
tileProtoColourDictionary(protosStream)
|
||||
|
||||
// val mapChunksUpdatesStream: KStream<FactorioServerId, FactorioEventUpdatePacket> =
|
||||
// builder.stream(
|
||||
// mapChunkUpdatesTopicName,
|
||||
// consumedAs(
|
||||
// "consume.map-chunk-updates",
|
||||
// jsonMapper.serde<FactorioServerId>(),
|
||||
// jsonMapper.serde<FactorioEventUpdatePacket>(),
|
||||
// )
|
||||
// )
|
||||
|
||||
val groupedMapChunkTiles: KTable<ServerMapChunkId, ServerMapChunkTiles<ColourHex>> =
|
||||
groupTilesIntoChunksWithColours(
|
||||
mapChunksStream,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable
|
|||
|
||||
@JvmInline
|
||||
@Serializable
|
||||
value class FactorioServerId(val id: String) {
|
||||
value class FactorioServerId(private val id: String) {
|
||||
override fun toString() = id
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue