Ajout de l'intégration twitch

This commit is contained in:
2026-06-23 23:38:20 +02:00
parent 4f93f7acaf
commit fcf8bfaa45
12 changed files with 305 additions and 16 deletions

View File

@@ -0,0 +1,24 @@
extends Node
signal pseudo_gathered_updated(pseudos)
var pseudo_gathered : Array[String] = []
func _ready():
VerySimpleTwitch.chat_message_received.connect(_on_message_received)
GameInfo.settings_data.twitch_changed.connect(connect_to_twitch)
func connect_to_twitch(settings : SettingsData):
pseudo_gathered = []
pseudo_gathered_updated.emit(pseudo_gathered)
VerySimpleTwitch.end_chat_client()
if settings.activate_twitch_integration:
connect_to_twitch_account(settings.twitch_channel)
func connect_to_twitch_account(channel_name: String):
VerySimpleTwitch.login_chat_anon(channel_name)
func _on_message_received(chatter: VSTChatter):
if not chatter.login in pseudo_gathered:
pseudo_gathered.append(chatter.login)
pseudo_gathered_updated.emit(pseudo_gathered)

View File

@@ -0,0 +1 @@
uid://fm17qbe4kqqo