aboutsummaryrefslogtreecommitdiff
path: root/client/menu/chat/chat_open.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/chat/chat_open.gd')
-rw-r--r--client/menu/chat/chat_open.gd7
1 files changed, 3 insertions, 4 deletions
diff --git a/client/menu/chat/chat_open.gd b/client/menu/chat/chat_open.gd
index f5b93adf..576568ee 100644
--- a/client/menu/chat/chat_open.gd
+++ b/client/menu/chat/chat_open.gd
@@ -29,8 +29,8 @@ func _ready() -> void:
add_message(i[0], i[1])
game.text_message.connect(
- func message(player: int, text: String, _timeout_initial: float, _timeout_remaining: float):
- add_message(player, text)
+ func message(username: String, text: String, _timeout_initial: float, _timeout_remaining: float):
+ add_message(username, text)
)
func _input(event: InputEvent) -> void:
@@ -40,8 +40,7 @@ func _input(event: InputEvent) -> void:
exit()
super(event)
-func add_message(player: int, message: String):
- var username: String = game.players[player].username
+func add_message(username: String, message: String):
var chat_message: ChatMessage = CHAT_MESSAGE_SCENE.instantiate()
messages_container.add_child(chat_message)
chat_message.set_message("<%s>" % username, message)