Add server synchronization feature.
This commit is contained in:
parent
53c6aede27
commit
fa49d8ed22
15 changed files with 154 additions and 48 deletions
|
|
@ -10,7 +10,7 @@ import com.pixelized.shared.lwa.protocol.rest.CharacterPreviewJson
|
|||
class CharacterSheetJsonFactory(
|
||||
private val v1: CharacterSheetJsonV1Factory,
|
||||
) {
|
||||
suspend fun convertFromJson(
|
||||
fun convertFromJson(
|
||||
json: CharacterSheetJson,
|
||||
): CharacterSheet {
|
||||
return when (json) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.pixelized.shared.lwa.usecase.CharacterSheetUseCase
|
|||
class CharacterSheetJsonV1Factory(
|
||||
private val characterSheetUseCase: CharacterSheetUseCase,
|
||||
) {
|
||||
suspend fun convertFromJson(
|
||||
fun convertFromJson(
|
||||
json: CharacterSheetJsonV1,
|
||||
): CharacterSheet = characterSheetUseCase.run {
|
||||
CharacterSheet(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
package com.pixelized.shared.lwa.protocol.websocket
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
sealed interface GameAdminEvent : SocketMessage {
|
||||
|
||||
@Serializable
|
||||
data class ServerSynchronization(override val timestamp: Long) : GameAdminEvent
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue