From 2d5117911c11fafc3c287e2ee74149f866c41954 Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Sun, 13 Dec 2020 01:39:06 +0100 Subject: Only transfer ownership to humans Resolve: https://github.com/joffrey-bion/seven-wonders/issues/73 --- .../kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw-client') diff --git a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt index 090d1ee2..5e627ecd 100644 --- a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt +++ b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt @@ -42,14 +42,14 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat suspend fun watchErrors(): Flow = stompSession.subscribe("/user/queue/errors", ErrorDTO.serializer()) - suspend fun chooseName(displayName: String, icon: Icon? = null): ConnectedPlayer { + suspend fun chooseName(displayName: String, icon: Icon? = null, isHuman: Boolean = true): ConnectedPlayer { val sub = stompSession.subscribe( destination = "/user/queue/nameChoice", deserializer = ConnectedPlayer.serializer(), ) stompSession.convertAndSend( destination = "/app/chooseName", - body = ChooseNameAction(displayName, icon), + body = ChooseNameAction(displayName, icon, isHuman), serializer = ChooseNameAction.serializer(), ) return sub.first() -- cgit