summaryrefslogtreecommitdiff
path: root/client/multiplayer.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/multiplayer.gd')
-rw-r--r--client/multiplayer.gd8
1 files changed, 3 insertions, 5 deletions
diff --git a/client/multiplayer.gd b/client/multiplayer.gd
index d8c6c1ff..168e62e6 100644
--- a/client/multiplayer.gd
+++ b/client/multiplayer.gd
@@ -85,10 +85,8 @@ func _process(_delta):
handle_packet(socket.get_packet())
elif state == WebSocketPeer.STATE_CLOSED:
var code = socket.get_close_code()
- var reason = socket.get_close_reason() if code == socket.STATE_CLOSED else tr("unavailable", "The reason for the websocket closing is unavailable")
- connection_closed.emit(
- tr("WebSocket closed with code: %d, reason %s. Clean: %s") % [code, reason, code != -1]
- )
+ var reason = socket.get_close_reason() if code == socket.STATE_CLOSED else tr("c.error.websocket.unavailable")
+ connection_closed.emit(tr("c.error.websocket") % [code, reason, code != -1])
self.queue_free()
func handle_packet(bytes: PackedByteArray):
@@ -108,7 +106,7 @@ func handle_packet(bytes: PackedByteArray):
if major != VERSION_MAJOR and minor >= VERSION_MINOR:
socket.close()
connected = false
- connection_closed.emit(tr("Server and client versions do not match. Server: %d.%d, Client: %d.%d.\nAre you sure the game is up to date?") % [major, minor, VERSION_MAJOR, VERSION_MINOR])
+ connection_closed.emit(tr("c.error.version_mismatch") % [major, minor, VERSION_MAJOR, VERSION_MINOR])
"data":
var item_names = decoded["data"]["item_names"]
var tile_names = decoded["data"]["tile_names"]