Updated Chat BB code to new Godot version

remotes/1705725415861086127/tmp_refs/heads/main
unfa 2021-09-19 22:30:58 +02:00
parent d1d723806e
commit c50ae045ec
1 changed files with 2 additions and 2 deletions

View File

@ -54,10 +54,10 @@ func _unhandled_input(_event) -> void:
# doesn't work over network due to missing RPC implementation in Godot 4
@rpc func chat_message(sender_pid: int, recipient_team, message: String) -> void:
var sender_info = main.player_list.get(sender_pid)
chat_history.append_bbcode('\n' + '[b][color=' + sender_info.color.to_html() +']' + str(sender_info.name) + '[/color][/b] : [i]' + message + '[/i]')
chat_history.append_text('\n' + '[b][color=' + sender_info.color.to_html() +']' + str(sender_info.name) + '[/color][/b] : [i]' + message + '[/i]')
@rpc func chat_notification(message: String) -> void:
chat_history.append_bbcode('\n · ' + '[i]' + message + '[/i]')
chat_history.append_text('\n · ' + '[i]' + message + '[/i]')
func _on_Editor_text_submitted(new_text):
# RPC is currently not implemented in the engine