From ed67525242e3a060645766e79a501d2f762186da Mon Sep 17 00:00:00 2001 From: Yannik <80621863+vaporvee@users.noreply.github.com> Date: Tue, 16 May 2023 21:53:21 +0200 Subject: [PATCH] added custom nodes --- .../bin/windows/discord_game_sdk_binding.dll | Bin 209408 -> 209408 bytes .../discord_game_sdk_binding_debug.dll | Bin 212480 -> 212480 bytes .../addons/discord-sdk-gd/nodes/Debug.tscn | 623 ++++++++++++++++++ .../nodes/DiscordSDKLoader.tscn | 7 + .../discord-sdk-gd/nodes}/assets/Checked.svg | 0 .../nodes}/assets/Checked.svg.import | 6 +- .../discord-sdk-gd/nodes/assets/Debug.svg | 10 + .../nodes}/assets/Debug.svg.import | 8 +- .../discord-sdk-gd/nodes/assets/Group_1.svg | 4 + .../nodes/assets/Group_1.svg.import} | 8 +- .../nodes}/assets/Unchecked.svg | 0 .../nodes}/assets/Unchecked.svg.import | 6 +- .../nodes}/assets/flow_spritesheet.png | Bin .../nodes}/assets/flow_spritesheet.png.import | 6 +- .../discord-sdk-gd/nodes/core_updater.gd | 5 + project/addons/discord-sdk-gd/nodes/debug.gd | 7 + project/addons/discord-sdk-gd/plugin.gd | 24 +- project/addons/discord-sdk-gd/sdk_utility.gd | 4 - project/assets/Core Updater.png | Bin 6544 -> 0 bytes project/assets/Core Updater.png.import | 34 - project/assets/Core Updater.svg | 6 - project/assets/Debug.png | Bin 5312 -> 0 bytes project/assets/Debug.png.import | 34 - project/assets/Debug.svg | 5 - project/main.gd | 56 +- project/main.tscn | 585 +--------------- project/project.godot | 2 +- src/discordgodot.cpp | 2 +- 28 files changed, 714 insertions(+), 728 deletions(-) create mode 100644 project/addons/discord-sdk-gd/nodes/Debug.tscn create mode 100644 project/addons/discord-sdk-gd/nodes/DiscordSDKLoader.tscn rename project/{ => addons/discord-sdk-gd/nodes}/assets/Checked.svg (100%) rename project/{ => addons/discord-sdk-gd/nodes}/assets/Checked.svg.import (73%) create mode 100644 project/addons/discord-sdk-gd/nodes/assets/Debug.svg rename project/{ => addons/discord-sdk-gd/nodes}/assets/Debug.svg.import (71%) create mode 100644 project/addons/discord-sdk-gd/nodes/assets/Group_1.svg rename project/{assets/Core Updater.svg.import => addons/discord-sdk-gd/nodes/assets/Group_1.svg.import} (70%) rename project/{ => addons/discord-sdk-gd/nodes}/assets/Unchecked.svg (100%) rename project/{ => addons/discord-sdk-gd/nodes}/assets/Unchecked.svg.import (73%) rename project/{ => addons/discord-sdk-gd/nodes}/assets/flow_spritesheet.png (100%) rename project/{ => addons/discord-sdk-gd/nodes}/assets/flow_spritesheet.png.import (68%) create mode 100644 project/addons/discord-sdk-gd/nodes/core_updater.gd create mode 100644 project/addons/discord-sdk-gd/nodes/debug.gd delete mode 100644 project/addons/discord-sdk-gd/sdk_utility.gd delete mode 100644 project/assets/Core Updater.png delete mode 100644 project/assets/Core Updater.png.import delete mode 100644 project/assets/Core Updater.svg delete mode 100644 project/assets/Debug.png delete mode 100644 project/assets/Debug.png.import delete mode 100644 project/assets/Debug.svg diff --git a/project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll b/project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll index bf52a6dbb889904e5e4f47b485f337b1e33b61f9..08d6d838b038585210bfa696bff8cfaecd3bdb1a 100644 GIT binary patch delta 45 zcmZp8!qf1CX8|MAs+*gc7^~(p{kYa#w_tnS0>*bY85y?cRxy2-1Ilero5?h51_0mI B6$tbT$hZu$0i%NgtLFfweLFwv=hs3;_62 B71jU% delta 45 zcmZqp!_)AGX8|Kq`QFV;jIWk4)x2naw|x7%<&1TA7b0k diff --git a/project/addons/discord-sdk-gd/nodes/Debug.tscn b/project/addons/discord-sdk-gd/nodes/Debug.tscn new file mode 100644 index 0000000..8d5fabf --- /dev/null +++ b/project/addons/discord-sdk-gd/nodes/Debug.tscn @@ -0,0 +1,623 @@ +[gd_scene load_steps=68 format=3 uid="uid://c1slhdnlsv2qt"] + +[ext_resource type="Texture2D" uid="uid://cq8lwj2matk6x" path="res://addons/discord-sdk-gd/nodes/assets/flow_spritesheet.png" id="4_gvc3o"] + +[sub_resource type="GDScript" id="GDScript_ak1tp"] +resource_name = "Debug" +script/source = "extends Node + +func _ready(): + discord_sdk.connect(\"activity_join_request\",_on_activity_join_request) + +func _process(_delta): + if(discord_sdk.get_is_discord_working()): + $AnimatedSprite2D.play(\"default\") + debug_text_update() + else: + $AnimatedSprite2D.stop() + $AnimatedSprite2D.animation = \"gray\" + debug_text_update() + +func debug_text_update(): + $Info.text = \"Application ID : {id} +Details: {details} +State: {state} + +Large image key: {lkey} +Large image text: {ltext} +Small image key: {skey} +Small image text: {stext} + +Start timestamp: {stimestamp} +End timestamp: {etimestamp} + +Party ID: {partyid} +Current party size: {cpartysize} +Max party size: {mpartysize} +Match secret: {msecret} +Join secret: {jsecret} +Spectate secret: {ssecret} +Is party public: {ppublic} (needs to be activated in Discord client settings) + +Is instanced: {instanced} +\" + $Info.text = $Info.text.replace(\"{ppublic}\",str(discord_sdk.is_public_party)).replace(\"{instanced}\",str(discord_sdk.instanced)).replace(\"{ssecret}\",discord_sdk.spectate_secret).replace(\"{jsecret}\",discord_sdk.join_secret).replace(\"{msecret}\",discord_sdk.match_secret).replace(\"{mpartysize}\",str(discord_sdk.max_party_size)).replace(\"{cpartysize}\",str(discord_sdk.current_party_size)).replace(\"{partyid}\",discord_sdk.party_id).replace(\"{id}\",str(discord_sdk.app_id)).replace(\"{details}\",discord_sdk.details).replace(\"{state}\",discord_sdk.state).replace(\"{lkey}\",discord_sdk.large_image).replace(\"{ltext}\",discord_sdk.large_image_text).replace(\"{skey}\",discord_sdk.small_image).replace(\"{stext}\",discord_sdk.small_image_text).replace(\"{stimestamp}\",str(discord_sdk.start_timestamp)).replace(\"{etimestamp}\",str(discord_sdk.end_timestamp)) + +var user_request = {}; + +func _on_activity_join_request(user_requesting): + print(user_requesting) + user_request = user_requesting + +func _on_button_pressed(): + if(!user_request.is_empty()): + discord_sdk.accept_join_request(user_request.id) + +func _on_line_edit_text_submitted(new_text): + discord_sdk.send_invite(int(new_text),true,\"this is a test invite sent from godot\") + +func _on_line_edit_2_text_submitted(new_text): + discord_sdk.accept_invite(int(new_text)) + +func _on_button_2_pressed(): + print(discord_sdk.get_current_user()) + +func _on_check_button_toggled(button_pressed): + if(button_pressed): + debug_text_update() + else: + discord_sdk.clear() + debug_text_update() + +" + +[sub_resource type="AtlasTexture" id="AtlasTexture_85oj4"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vv4mb"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kwv3j"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ij57t"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_w2du1"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4pma1"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fcoqp"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tjcb7"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_oudh8"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_csja0"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0xbpk"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p84pv"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1gjwh"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mrm73"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8rkne"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 1536, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_c15qo"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 1536, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_74tpk"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 1536, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v5nxq"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 1536, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0mf44"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 1536, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kb0hn"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 2048, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_o22ug"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 2048, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_21q7w"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 2048, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gitfl"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 2048, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8hg1o"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 2048, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_niuoc"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 2560, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mt5ft"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 2560, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ub7uo"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 2560, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2uxnl"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 2560, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bh4ts"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 2560, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lcu0i"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 3072, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mmqt1"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 3072, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_orode"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 3072, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ricn8"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 3072, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6ftll"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 3072, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fm4jy"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 3584, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7qcot"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 3584, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2y47g"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 3584, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gpr0t"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 3584, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nn332"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 3584, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jg384"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 4096, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g0wvw"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 4096, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e6fmf"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 4096, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_n1rtv"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 4096, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_365g3"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 4096, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_frkrx"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 4608, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j8adw"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 4608, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_76fh7"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 4608, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gmmrx"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 4608, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rlh42"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 4608, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wijf7"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 5120, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2n5hs"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 5120, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yrp6k"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 5120, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_w411h"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 5120, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pe7po"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 5120, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sr5kq"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 5632, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kgesr"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 5632, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vfk6x"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 5632, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4d1t3"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 5632, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6bexm"] +atlas = ExtResource("4_gvc3o") +region = Rect2(2048, 5632, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tadlo"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 6144, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g2h20"] +atlas = ExtResource("4_gvc3o") +region = Rect2(512, 6144, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x351d"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1024, 6144, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0jq3r"] +atlas = ExtResource("4_gvc3o") +region = Rect2(1536, 6144, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1eeyl"] +atlas = ExtResource("4_gvc3o") +region = Rect2(0, 0, 512, 512) + +[sub_resource type="SpriteFrames" id="SpriteFrames_kudgl"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_85oj4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vv4mb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kwv3j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ij57t") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_w2du1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4pma1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fcoqp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tjcb7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_oudh8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_csja0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0xbpk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p84pv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1gjwh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mrm73") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8rkne") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_c15qo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_74tpk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_v5nxq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0mf44") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kb0hn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_o22ug") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_21q7w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gitfl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8hg1o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_niuoc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mt5ft") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ub7uo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2uxnl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bh4ts") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lcu0i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mmqt1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_orode") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ricn8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6ftll") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fm4jy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7qcot") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2y47g") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gpr0t") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nn332") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jg384") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g0wvw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_e6fmf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_n1rtv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_365g3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_frkrx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_j8adw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_76fh7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gmmrx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rlh42") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wijf7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2n5hs") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yrp6k") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_w411h") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pe7po") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sr5kq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kgesr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vfk6x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4d1t3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6bexm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tadlo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g2h20") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x351d") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0jq3r") +}], +"loop": true, +"name": &"default", +"speed": 30.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_1eeyl") +}], +"loop": true, +"name": &"gray", +"speed": 5.0 +}] + +[node name="DebugNodeGroup" type="Node"] +editor_description = "This is a Debug Node wich will show (only if the project runs) some usefull info and buttons/input" +script = SubResource("GDScript_ak1tp") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +position = Vector2(389, 477.375) +scale = Vector2(0.14209, 0.14209) +sprite_frames = SubResource("SpriteFrames_kudgl") +frame_progress = 0.417812 + +[node name="Info" type="RichTextLabel" parent="."] +offset_left = 7.0 +offset_top = 6.0 +offset_right = 424.0 +offset_bottom = 312.0 +theme_override_font_sizes/normal_font_size = 14 +text = "Application ID : {id} +Details: {details} +State: {state} + +Large image key: {lkey} +Large image text: {ltext} +Small image key: {skey} +Small image text: {stext} + +Start timestamp: {stimestamp} +End timestamp: {etimestamp} + +Party ID: {partyid} +Current party size: {cpartysize} +Max party size: {mpartysize} +Match secret: {msecret} +Join secret: {jsecret} +Spectate secret: {ssecret} +Is party public: {ppublic} (needs to be activated in Discord client settings) + +Is instanced: {instanced} +" +fit_content = true + +[node name="PrintCurrentUserOnConsole" type="Button" parent="."] +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 7.0 +offset_top = 141.375 +offset_right = 240.0 +offset_bottom = 174.375 +grow_vertical = 2 +text = "Print current user on console" + +[node name="AcceptInviteRequest" type="Button" parent="."] +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 7.0 +offset_top = 178.875 +offset_right = 149.0 +offset_bottom = 209.875 +grow_vertical = 2 +text = "ACCEPT REQUEST" + +[node name="InviteWithUserID" type="LineEdit" parent="."] +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 6.0 +offset_top = 215.375 +offset_right = 205.0 +offset_bottom = 246.375 +grow_vertical = 2 +size_flags_horizontal = 0 +placeholder_text = "Invite with user_id here" + +[node name="AcceptWithUserID" type="LineEdit" parent="."] +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 6.0 +offset_top = 250.875 +offset_right = 255.0 +offset_bottom = 281.875 +grow_vertical = 2 +placeholder_text = "Accept Invite with user_id here" + +[connection signal="pressed" from="PrintCurrentUserOnConsole" to="." method="_on_button_2_pressed"] +[connection signal="pressed" from="AcceptInviteRequest" to="." method="_on_button_pressed"] +[connection signal="text_submitted" from="InviteWithUserID" to="." method="_on_line_edit_text_submitted"] +[connection signal="text_submitted" from="AcceptWithUserID" to="." method="_on_line_edit_2_text_submitted"] diff --git a/project/addons/discord-sdk-gd/nodes/DiscordSDKLoader.tscn b/project/addons/discord-sdk-gd/nodes/DiscordSDKLoader.tscn new file mode 100644 index 0000000..3900184 --- /dev/null +++ b/project/addons/discord-sdk-gd/nodes/DiscordSDKLoader.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=3 uid="uid://dkbtuqbtdlqnk"] + +[ext_resource type="Script" path="res://addons/discord-sdk-gd/nodes/core_updater.gd" id="1_8fjwg"] + +[node name="DiscordSDKLoader" type="Node"] +editor_description = "This always needs to run in the background if you want to comunicate with the discord client." +script = ExtResource("1_8fjwg") diff --git a/project/assets/Checked.svg b/project/addons/discord-sdk-gd/nodes/assets/Checked.svg similarity index 100% rename from project/assets/Checked.svg rename to project/addons/discord-sdk-gd/nodes/assets/Checked.svg diff --git a/project/assets/Checked.svg.import b/project/addons/discord-sdk-gd/nodes/assets/Checked.svg.import similarity index 73% rename from project/assets/Checked.svg.import rename to project/addons/discord-sdk-gd/nodes/assets/Checked.svg.import index d124dbf..bc9fc5a 100644 --- a/project/assets/Checked.svg.import +++ b/project/addons/discord-sdk-gd/nodes/assets/Checked.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dnfq6kug4x6o2" -path="res://.godot/imported/Checked.svg-f72e721c76a88d84ce4de3fd19f840d5.ctex" +path="res://.godot/imported/Checked.svg-152467b95b56fa0b9944b5cc25700916.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/Checked.svg" -dest_files=["res://.godot/imported/Checked.svg-f72e721c76a88d84ce4de3fd19f840d5.ctex"] +source_file="res://addons/discord-sdk-gd/nodes/assets/Checked.svg" +dest_files=["res://.godot/imported/Checked.svg-152467b95b56fa0b9944b5cc25700916.ctex"] [params] diff --git a/project/addons/discord-sdk-gd/nodes/assets/Debug.svg b/project/addons/discord-sdk-gd/nodes/assets/Debug.svg new file mode 100644 index 0000000..7987166 --- /dev/null +++ b/project/addons/discord-sdk-gd/nodes/assets/Debug.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/project/assets/Debug.svg.import b/project/addons/discord-sdk-gd/nodes/assets/Debug.svg.import similarity index 71% rename from project/assets/Debug.svg.import rename to project/addons/discord-sdk-gd/nodes/assets/Debug.svg.import index d7a25d4..8326210 100644 --- a/project/assets/Debug.svg.import +++ b/project/addons/discord-sdk-gd/nodes/assets/Debug.svg.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://d1dntlgjiapde" -path="res://.godot/imported/Debug.svg-dbd0299514a2ed7480404c509868c103.ctex" +uid="uid://ufh1hha1ehui" +path="res://.godot/imported/Debug.svg-c87ff9d4b4b0e718ec457560f6c420dc.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/Debug.svg" -dest_files=["res://.godot/imported/Debug.svg-dbd0299514a2ed7480404c509868c103.ctex"] +source_file="res://addons/discord-sdk-gd/nodes/assets/Debug.svg" +dest_files=["res://.godot/imported/Debug.svg-c87ff9d4b4b0e718ec457560f6c420dc.ctex"] [params] diff --git a/project/addons/discord-sdk-gd/nodes/assets/Group_1.svg b/project/addons/discord-sdk-gd/nodes/assets/Group_1.svg new file mode 100644 index 0000000..d01f59d --- /dev/null +++ b/project/addons/discord-sdk-gd/nodes/assets/Group_1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/project/assets/Core Updater.svg.import b/project/addons/discord-sdk-gd/nodes/assets/Group_1.svg.import similarity index 70% rename from project/assets/Core Updater.svg.import rename to project/addons/discord-sdk-gd/nodes/assets/Group_1.svg.import index bb6f9d1..69adaea 100644 --- a/project/assets/Core Updater.svg.import +++ b/project/addons/discord-sdk-gd/nodes/assets/Group_1.svg.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://2no2ced378ds" -path="res://.godot/imported/Core Updater.svg-75aabb825d7cf085efdd2bf5760ba312.ctex" +uid="uid://c70jidlptani4" +path="res://.godot/imported/Group_1.svg-8cf36058739c5884a9a47a4dfa7d001a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/Core Updater.svg" -dest_files=["res://.godot/imported/Core Updater.svg-75aabb825d7cf085efdd2bf5760ba312.ctex"] +source_file="res://addons/discord-sdk-gd/nodes/assets/Group_1.svg" +dest_files=["res://.godot/imported/Group_1.svg-8cf36058739c5884a9a47a4dfa7d001a.ctex"] [params] diff --git a/project/assets/Unchecked.svg b/project/addons/discord-sdk-gd/nodes/assets/Unchecked.svg similarity index 100% rename from project/assets/Unchecked.svg rename to project/addons/discord-sdk-gd/nodes/assets/Unchecked.svg diff --git a/project/assets/Unchecked.svg.import b/project/addons/discord-sdk-gd/nodes/assets/Unchecked.svg.import similarity index 73% rename from project/assets/Unchecked.svg.import rename to project/addons/discord-sdk-gd/nodes/assets/Unchecked.svg.import index c6ca33e..43b3409 100644 --- a/project/assets/Unchecked.svg.import +++ b/project/addons/discord-sdk-gd/nodes/assets/Unchecked.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://compmm3kviqqe" -path="res://.godot/imported/Unchecked.svg-766fb74b3cafb9a423726f8edb81f7ad.ctex" +path="res://.godot/imported/Unchecked.svg-91cff67e13e7a1508fbc6a949f5f5f52.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/Unchecked.svg" -dest_files=["res://.godot/imported/Unchecked.svg-766fb74b3cafb9a423726f8edb81f7ad.ctex"] +source_file="res://addons/discord-sdk-gd/nodes/assets/Unchecked.svg" +dest_files=["res://.godot/imported/Unchecked.svg-91cff67e13e7a1508fbc6a949f5f5f52.ctex"] [params] diff --git a/project/assets/flow_spritesheet.png b/project/addons/discord-sdk-gd/nodes/assets/flow_spritesheet.png similarity index 100% rename from project/assets/flow_spritesheet.png rename to project/addons/discord-sdk-gd/nodes/assets/flow_spritesheet.png diff --git a/project/assets/flow_spritesheet.png.import b/project/addons/discord-sdk-gd/nodes/assets/flow_spritesheet.png.import similarity index 68% rename from project/assets/flow_spritesheet.png.import rename to project/addons/discord-sdk-gd/nodes/assets/flow_spritesheet.png.import index 69d5e6c..5bf804a 100644 --- a/project/assets/flow_spritesheet.png.import +++ b/project/addons/discord-sdk-gd/nodes/assets/flow_spritesheet.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cq8lwj2matk6x" -path="res://.godot/imported/flow_spritesheet.png-18c39eee2431173a526b9028a5ff4994.ctex" +path="res://.godot/imported/flow_spritesheet.png-4637bb4103771b4d4bbc78a0bb858512.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/flow_spritesheet.png" -dest_files=["res://.godot/imported/flow_spritesheet.png-18c39eee2431173a526b9028a5ff4994.ctex"] +source_file="res://addons/discord-sdk-gd/nodes/assets/flow_spritesheet.png" +dest_files=["res://.godot/imported/flow_spritesheet.png-4637bb4103771b4d4bbc78a0bb858512.ctex"] [params] diff --git a/project/addons/discord-sdk-gd/nodes/core_updater.gd b/project/addons/discord-sdk-gd/nodes/core_updater.gd new file mode 100644 index 0000000..a7ae363 --- /dev/null +++ b/project/addons/discord-sdk-gd/nodes/core_updater.gd @@ -0,0 +1,5 @@ +## This always needs to run in the background if you want to comunicate with the discord client. +extends Node + +func _process(delta) -> void: + discord_sdk.coreupdate() diff --git a/project/addons/discord-sdk-gd/nodes/debug.gd b/project/addons/discord-sdk-gd/nodes/debug.gd new file mode 100644 index 0000000..8d5d03d --- /dev/null +++ b/project/addons/discord-sdk-gd/nodes/debug.gd @@ -0,0 +1,7 @@ +## This is a Debug Node wich will show (only if the project runs) some usefull info and buttons/input +extends Node + +const DebugNodeGroup = preload("res://addons/discord-sdk-gd/nodes/Debug.tscn") + +func _ready(): + add_child(DebugNodeGroup.instantiate()) diff --git a/project/addons/discord-sdk-gd/plugin.gd b/project/addons/discord-sdk-gd/plugin.gd index 12cf41b..b258011 100644 --- a/project/addons/discord-sdk-gd/plugin.gd +++ b/project/addons/discord-sdk-gd/plugin.gd @@ -1,13 +1,27 @@ @tool extends EditorPlugin -const ExportPlugin = preload("export.gd") +const DiscordSDKLoader = preload("res://addons/discord-sdk-gd/nodes/core_updater.gd") +const DiscordSDKLoader_icon = preload("res://addons/discord-sdk-gd/nodes/assets/Group_1.svg") +var loaded_DiscordSDKLoader = DiscordSDKLoader.new() + +const DiscordSDKDebug = preload("res://addons/discord-sdk-gd/nodes/debug.gd") +const DiscordSDKDebug_icon = preload("res://addons/discord-sdk-gd/nodes/assets/Debug.svg") +var loaded_DiscordSDKDebug = DiscordSDKDebug.new() + + +const ExportPlugin = preload("res://addons/discord-sdk-gd/export.gd") var loaded_exportplugin = ExportPlugin.new() -func _enter_tree(): - add_autoload_singleton("updater_discordsdk", "res://addons/discord-sdk-gd/sdk_utility.gd") - add_export_plugin(loaded_exportplugin) +func _enter_tree(): + add_custom_type("DiscordSDKLoader","Node",DiscordSDKLoader,DiscordSDKLoader_icon) + add_custom_type("DiscordSDKDebug","Node",DiscordSDKDebug,DiscordSDKDebug_icon) + add_autoload_singleton("DiscordSDKLoader", "res://addons/discord-sdk-gd/nodes/DiscordSDKLoader.tscn") + add_export_plugin(loaded_exportplugin) + func disable_plugin(): - remove_autoload_singleton("updater_discordsdk") + remove_custom_type("DiscordSDKLoader") + remove_custom_type("DiscordSDKDebug") + remove_autoload_singleton("DiscordSDKLoader") remove_export_plugin(loaded_exportplugin) diff --git a/project/addons/discord-sdk-gd/sdk_utility.gd b/project/addons/discord-sdk-gd/sdk_utility.gd deleted file mode 100644 index be8b542..0000000 --- a/project/addons/discord-sdk-gd/sdk_utility.gd +++ /dev/null @@ -1,4 +0,0 @@ -extends Node - -func _process(delta) -> void: - discord_sdk.coreupdate() diff --git a/project/assets/Core Updater.png b/project/assets/Core Updater.png deleted file mode 100644 index 1370f0222647961a6218b1caf6a3d41ca587e2b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6544 zcmeHr`#)4`^#8N>Y#F!M=rEOLjO(EjQR#x&hY?CBp*qTtTbC1Eq^rGk5jEmer+ZN< z9Ym#4C=(jGp^Hl?)ClRqgzOkIpJ#i$zTdy#^ZNeuo!86Dde&agTJQBd>silQPpZGK zr;g@CO#pz7x0i4U04O9;z#a$x4QzWo4F74wc`e@zfR+LChk(;(jUf}+yu{ND6x2@s z34@d`AR+3tk7>xBD|etqWH^s7o0^4FXk=f_Ez_Y7?YBu z`QL_B-QROH5oq#%`A6Mdn#6ynES8;#Hz`QgHc?jR90Ht{(f2QISCVbpIU?c&>T$I= zx2;e)yu9WWpSZGhD1E5HoBsLpzU;nLy6fmP32_Gni&vzR?6z5C`3|+%8wV*nmbMT8 zVfUfY>@OeQ)5SvIt`ERJYoz7lTk8BqV)@hsHlR{&$wChl32xb<#(Mxrsj`%{=_4V> zAW58%$IisB?;Pqb0xnSU)F4L{wDNDksN$RYxC?MI?6W)hg5A~Si?1cVYwW2$1WKTO z$2C&H)RA;@Ay$6?fRlgDQ(hR~Q~`uwr3RoWA)$k6ifK`aA%4 zv$iVoN_@XO*~!m}K|wougqdi49DwfMf5~H0DLw>0j7e;Se267vkuP~ zhXBJzv>$<)!$bGTUTL6@yf6R+zM*aR?l#)b2NOak-?Y3JwC3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Wu zvYqFvJ~+I+C{YQX`GA4fldJOL_-J#6T>T>-Oly}vtkuFL)f|%Nini|&f-V>vXE6y7 zf*eSdVG=?JxDHC<9VVfKAQs9cq9PGLYm1cYwHFxwX@JDf{$=BDEYrQ@4#XXOqG){2 zNa=}6nzaT8X8OowdnK_0lhg~nxEP>h#5c{K*p212U`Z7$B z^o~t&QmK7Q|8hzj`{ao0mFH^i^c%1IC14TrF#;13WsNdb_p4r%h{6bSA+ZZ8aYXcR zTo0c14qqUgk3EASWuXUfeWV`-)9)B@Nhs0o8BUU`FE9msOVsk#L{(*MPRm}isZ2!^ysxT<~llxkCDER>+!h^DJTcOix zXcn6?Or^B!m0%spTg=Z=m+AI7A{q90Jv2sBup?$SQ;?c~WF*C7`}&$Bg&dL!(4c&F z{pjonn$TmEM8e6@`ry>EsasdAOe`uhMOO?~(5$nIK!gyx6(l3$KKX)nAC%_^^8jnT z8;H324p!LU44h+Q2kUpK!vd>^zuYR z$`#E~iBatyVB_0t~>}bz{_KJ+SNbHkkU5PCjU^=^LZWL36V|?%yzI3pLvzgq2a+SlcER zNZw)K+)UiR$*S1R6S~PfDu8DTK>gDXPV-2e4;{5v+S+JVl?SMAVH%I4j5Rq9LTaj+ zg|31~!lFIks-~O(BE1|BiT8b&{*aI6!1&n+?jIP|Ye%+j{|%(PybM_I**l@PyU_1! rmtSXYWV04$MNq(d#1Q=N|LA%ZE6SwvqpUcii_z}w;VUd~6YcpQu - - - - - diff --git a/project/assets/Debug.png b/project/assets/Debug.png deleted file mode 100644 index 9ecdfa8d8d3a5008b68f24956f96afb62a2fc558..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5312 zcmd5=c{tQ-`+sH(#*(pQi84w!g=0%}rfdmW4@E*5RElgVN@AprtSL)m8AVaq%0ZSf zBMOC4_GOHatl0+5Fyno6e%J5c_rLdj=eoYv_qm_te(t%S&wW3i`y2hIwdpo~X?_5} zw&P~Tb^st@6A92f@Wr^^#ey$Bf3wqp00@X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prOC! zSDOoqBZIk9-xWh)4Gp-y?Ajapt#x4L{K1+IU-8QoGovzN@wcn#LK>LIr)jUO%D&6! z3C03~$WL~6q=2mwIlEk=BP_PApX2I{+rIR=UB^~yNb63crRg8eUV82tw!U}O zYE}I*5||V^Yy6~Y`JfvIyft2(5x(5@JX=k>TD|W&%dr( y)wGaWKf2+*&OchM%(WzIws8G7KeoZWvo?7RL+FY>5&rwOEIEG6+PK&VfBRnpzDyPX diff --git a/project/assets/Debug.png.import b/project/assets/Debug.png.import deleted file mode 100644 index b2ab25d..0000000 --- a/project/assets/Debug.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://b5dn3rnp5eqqp" -path="res://.godot/imported/Debug.png-81b23c4a8a55e89d458626f08de3d2fb.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://assets/Debug.png" -dest_files=["res://.godot/imported/Debug.png-81b23c4a8a55e89d458626f08de3d2fb.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/project/assets/Debug.svg b/project/assets/Debug.svg deleted file mode 100644 index 33eef54..0000000 --- a/project/assets/Debug.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/project/main.gd b/project/main.gd index 78c02c1..eae9e10 100644 --- a/project/main.gd +++ b/project/main.gd @@ -1,20 +1,11 @@ extends Node -var invite_pfp - func _ready(): set_activity() discord_sdk.connect("activity_join_request",_on_activity_join_request) discord_sdk.connect("activity_join",_on_activity_join) discord_sdk.connect("activity_spectate",_on_activity_spectate) -func _process(_delta): - if(discord_sdk.get_is_discord_working()): - $AnimatedSprite2D.play("default") - else: - $AnimatedSprite2D.stop() - $AnimatedSprite2D.animation = "gray" - func set_activity(): discord_sdk.app_id = 1099618430065324082 discord_sdk.details = "A demo activity by vaporvee#1231" @@ -42,32 +33,6 @@ func set_activity(): discord_sdk.register_command("C:\\Users\\yanni\\Desktop\\demo\\discord_sdk.exe") #discord_sdk.register_steam(1389990) discord_sdk.refresh() - debug_text_update() - -func debug_text_update(): - $Info.text = "Application ID : {id} -Details: {details} -State: {state} - -Large image key: {lkey} -Large image text: {ltext} -Small image key: {skey} -Small image text: {stext} - -Start timestamp: {stimestamp} -End timestamp: {etimestamp} - -Party ID: {partyid} -Current party size: {cpartysize} -Max party size: {mpartysize} -Match secret: {msecret} -Join secret: {jsecret} -Spectate secret: {ssecret} -Is party public: {ppublic} (needs to be activated in Discord client settings) - -Is instanced: {instanced} -" - $Info.text = $Info.text.replace("{ppublic}",str(discord_sdk.is_public_party)).replace("{instanced}",str(discord_sdk.instanced)).replace("{ssecret}",discord_sdk.spectate_secret).replace("{jsecret}",discord_sdk.join_secret).replace("{msecret}",discord_sdk.match_secret).replace("{mpartysize}",str(discord_sdk.max_party_size)).replace("{cpartysize}",str(discord_sdk.current_party_size)).replace("{partyid}",discord_sdk.party_id).replace("{id}",str(discord_sdk.app_id)).replace("{details}",discord_sdk.details).replace("{state}",discord_sdk.state).replace("{lkey}",discord_sdk.large_image).replace("{ltext}",discord_sdk.large_image_text).replace("{skey}",discord_sdk.small_image).replace("{stext}",discord_sdk.small_image_text).replace("{stimestamp}",str(discord_sdk.start_timestamp)).replace("{etimestamp}",str(discord_sdk.end_timestamp)) var user_request = {}; @@ -83,29 +48,12 @@ func _on_activity_join(secret): discord_sdk.join_secret = secret discord_sdk.spectate_secret = secret.replace("j_","s_") discord_sdk.refresh() - $Info.text = $Info.text.replace("{ssecret}",discord_sdk.spectate_secret).replace("{jsecret}",discord_sdk.join_secret).replace("{msecret}",discord_sdk.match_secret).replace("{mpartysize}",str(discord_sdk.max_party_size)).replace("{cpartysize}",str(discord_sdk.current_party_size)).replace("{partyid}",discord_sdk.party_id).replace("{discordinfo}",str(discord_sdk.get_is_discord_working())).replace("{id}",str(discord_sdk.app_id)).replace("{details}",discord_sdk.details).replace("{state}",discord_sdk.state).replace("{lkey}",discord_sdk.large_image).replace("{ltext}",discord_sdk.large_image_text).replace("{skey}",discord_sdk.small_image).replace("{stext}",discord_sdk.small_image_text).replace("{stimestamp}",str(discord_sdk.start_timestamp)).replace("{etimestamp}",str(discord_sdk.end_timestamp)) - debug_text_update() func _on_activity_spectate(secret): print(secret) - -func _on_check_button_toggled(button_pressed): + +func _on_toggle_sdk_toggled(button_pressed): if(button_pressed): set_activity() - debug_text_update() else: discord_sdk.clear() - debug_text_update() - -func _on_button_pressed(): - if(!user_request.is_empty()): - discord_sdk.accept_join_request(user_request.id) - -func _on_line_edit_text_submitted(new_text): - discord_sdk.send_invite(int(new_text),true,"this is a test invite sent from godot") - -func _on_line_edit_2_text_submitted(new_text): - discord_sdk.accept_invite(int(new_text)) - -func _on_button_2_pressed(): - print(discord_sdk.get_current_user()) diff --git a/project/main.tscn b/project/main.tscn index 9bb7800..5d6c8ba 100644 --- a/project/main.tscn +++ b/project/main.tscn @@ -1,473 +1,12 @@ -[gd_scene load_steps=72 format=3 uid="uid://dmx2xuigcpvt4"] +[gd_scene load_steps=7 format=3 uid="uid://dyc3kseph4el7"] [ext_resource type="Script" path="res://main.gd" id="1_kl8ri"] [ext_resource type="Texture2D" uid="uid://b3qm246m7pnsx" path="res://assets/Logo_V2.png" id="2_gd222"] -[ext_resource type="Texture2D" uid="uid://dnfq6kug4x6o2" path="res://assets/Checked.svg" id="3_ny5eu"] -[ext_resource type="Texture2D" uid="uid://compmm3kviqqe" path="res://assets/Unchecked.svg" id="4_xydmq"] -[ext_resource type="Texture2D" uid="uid://cq8lwj2matk6x" path="res://assets/flow_spritesheet.png" id="5_iiu0s"] +[ext_resource type="Texture2D" uid="uid://dnfq6kug4x6o2" path="res://addons/discord-sdk-gd/nodes/assets/Checked.svg" id="3_wajuo"] +[ext_resource type="Texture2D" uid="uid://compmm3kviqqe" path="res://addons/discord-sdk-gd/nodes/assets/Unchecked.svg" id="4_8hvtu"] +[ext_resource type="Script" path="res://addons/discord-sdk-gd/nodes/debug.gd" id="6_ujijw"] -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1w3f4"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_85oj4"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vv4mb"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kwv3j"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ij57t"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_w2du1"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_4pma1"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_fcoqp"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_tjcb7"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_oudh8"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_csja0"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 1024, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0xbpk"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 1024, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_p84pv"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 1024, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_1gjwh"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 1024, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mrm73"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 1024, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8rkne"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 1536, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_c15qo"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 1536, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_74tpk"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 1536, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_v5nxq"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 1536, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0mf44"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 1536, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kb0hn"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 2048, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_o22ug"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 2048, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_21q7w"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 2048, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_gitfl"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 2048, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8hg1o"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 2048, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_niuoc"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 2560, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mt5ft"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 2560, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ub7uo"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 2560, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_2uxnl"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 2560, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_bh4ts"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 2560, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_lcu0i"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 3072, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mmqt1"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 3072, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_orode"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 3072, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ricn8"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 3072, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6ftll"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 3072, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_fm4jy"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 3584, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7qcot"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 3584, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_2y47g"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 3584, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_gpr0t"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 3584, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_nn332"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 3584, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_jg384"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 4096, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_g0wvw"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 4096, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_e6fmf"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 4096, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_n1rtv"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 4096, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_365g3"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 4096, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_frkrx"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 4608, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_j8adw"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 4608, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_76fh7"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 4608, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_gmmrx"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 4608, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rlh42"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 4608, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_wijf7"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 5120, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_2n5hs"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 5120, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_yrp6k"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 5120, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_w411h"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 5120, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_pe7po"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 5120, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_sr5kq"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 5632, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kgesr"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 5632, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vfk6x"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 5632, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_4d1t3"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 5632, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6bexm"] -atlas = ExtResource("5_iiu0s") -region = Rect2(2048, 5632, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_tadlo"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 6144, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_g2h20"] -atlas = ExtResource("5_iiu0s") -region = Rect2(512, 6144, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_x351d"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1024, 6144, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0jq3r"] -atlas = ExtResource("5_iiu0s") -region = Rect2(1536, 6144, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_1eeyl"] -atlas = ExtResource("5_iiu0s") -region = Rect2(0, 0, 512, 512) - -[sub_resource type="SpriteFrames" id="SpriteFrames_kudgl"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_85oj4") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vv4mb") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kwv3j") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ij57t") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_w2du1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_4pma1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_fcoqp") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_tjcb7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_oudh8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_csja0") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0xbpk") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_p84pv") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_1gjwh") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mrm73") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8rkne") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_c15qo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_74tpk") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_v5nxq") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0mf44") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kb0hn") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_o22ug") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_21q7w") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_gitfl") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8hg1o") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_niuoc") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mt5ft") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ub7uo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_2uxnl") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_bh4ts") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_lcu0i") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mmqt1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_orode") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ricn8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6ftll") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_fm4jy") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_7qcot") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_2y47g") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_gpr0t") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_nn332") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_jg384") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_g0wvw") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_e6fmf") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_n1rtv") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_365g3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_frkrx") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_j8adw") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_76fh7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_gmmrx") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rlh42") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_wijf7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_2n5hs") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_yrp6k") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_w411h") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_pe7po") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_sr5kq") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kgesr") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vfk6x") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_4d1t3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6bexm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_tadlo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_g2h20") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_x351d") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0jq3r") -}], -"loop": true, -"name": &"default", -"speed": 30.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_1eeyl") -}], -"loop": true, -"name": &"gray", -"speed": 5.0 -}] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_phc3u"] [node name="Node" type="Node"] script = ExtResource("1_kl8ri") @@ -505,110 +44,22 @@ size_flags_vertical = 4 bbcode_enabled = true text = "[center][font s=60]DiscordSDK Test" -[node name="Info" type="RichTextLabel" parent="."] -offset_left = 7.0 -offset_top = 6.0 -offset_right = 424.0 -offset_bottom = 312.0 -text = "Application ID : {id} -Details: {details} -State: {state} +[node name="DiscordSDKDebug" type="Node" parent="."] +script = ExtResource("6_ujijw") -Large image key: {lkey} -Large image text: {ltext} -Small image key: {skey} -Small image text: {stext} - -Start timestamp: {stimestamp} -End timestamp: {etimestamp} - -Party ID: {partyid} -Current party size: {cpartysize} -Max party size: {mpartysize} -Match secret: {msecret} -Join secret: {jsecret} -Spectate secret: {ssecret} -Is party public: {ppublic} (needs to be activated in Discord client settings) - -Is instanced: {instanced} -" - -[node name="CheckButton" type="CheckButton" parent="."] -anchors_preset = 1 -anchor_left = 1.0 -anchor_right = 1.0 -offset_left = -128.0 -offset_top = 26.0 -offset_right = 718.0 -offset_bottom = 534.0 -grow_horizontal = 0 -scale = Vector2(0.05, 0.05) -theme_override_icons/checked = ExtResource("3_ny5eu") -theme_override_icons/unchecked = ExtResource("4_xydmq") -theme_override_styles/focus = SubResource("StyleBoxEmpty_1w3f4") -button_pressed = true - -[node name="Button" type="Button" parent="."] -anchors_preset = -1 -anchor_left = 0.437 -anchor_top = 0.844 -anchor_right = 0.562 -anchor_bottom = 0.892 -offset_left = 0.575989 -offset_top = 0.0879517 -offset_right = -1.42395 -offset_bottom = -0.0159912 -grow_horizontal = 2 -grow_vertical = 0 -text = "ACCEPT REQUEST" - -[node name="LineEdit" type="LineEdit" parent="."] -anchors_preset = -1 -anchor_left = 0.416 -anchor_top = 0.904 -anchor_right = 0.584 -anchor_bottom = 0.952 -offset_left = 0.268005 -offset_top = -4.79205 -offset_right = -0.268066 -offset_bottom = -4.896 -grow_horizontal = 2 -grow_vertical = 0 -placeholder_text = "Invite with user_id here" - -[node name="LineEdit2" type="LineEdit" parent="."] -anchors_preset = 7 -anchor_left = 0.5 -anchor_top = 1.0 -anchor_right = 0.5 -anchor_bottom = 1.0 -offset_left = -124.0 -offset_top = -33.0 -offset_right = 125.0 -offset_bottom = -2.0 -grow_horizontal = 2 -grow_vertical = 0 -placeholder_text = "Accept Invite with user_id here" - -[node name="Button2" type="Button" parent="."] +[node name="ToggleSDK" type="CheckButton" parent="."] anchors_preset = 4 anchor_top = 0.5 anchor_bottom = 0.5 -offset_left = 3.0 -offset_top = -4.0 -offset_right = 139.0 -offset_bottom = 29.0 +offset_left = 293.0 +offset_top = 142.375 +offset_right = 1139.0 +offset_bottom = 650.375 grow_vertical = 2 -text = "Print current user on console" +scale = Vector2(0.05, 0.05) +theme_override_icons/checked = ExtResource("3_wajuo") +theme_override_icons/unchecked = ExtResource("4_8hvtu") +theme_override_styles/focus = SubResource("StyleBoxEmpty_phc3u") +button_pressed = true -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] -position = Vector2(1115.38, 36.875) -scale = Vector2(0.14209, 0.14209) -sprite_frames = SubResource("SpriteFrames_kudgl") -frame_progress = 0.417812 - -[connection signal="toggled" from="CheckButton" to="." method="_on_check_button_toggled"] -[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] -[connection signal="text_submitted" from="LineEdit" to="." method="_on_line_edit_text_submitted"] -[connection signal="text_submitted" from="LineEdit2" to="." method="_on_line_edit_2_text_submitted"] -[connection signal="pressed" from="Button2" to="." method="_on_button_2_pressed"] +[connection signal="toggled" from="ToggleSDK" to="." method="_on_toggle_sdk_toggled"] diff --git a/project/project.godot b/project/project.godot index 9c69244..3fb3f9f 100644 --- a/project/project.godot +++ b/project/project.godot @@ -20,7 +20,7 @@ config/icon="res://assets/Logo_V2.png" [autoload] -updater_discordsdk="*res://addons/discord-sdk-gd/sdk_utility.gd" +DiscordSDKLoader="*res://addons/discord-sdk-gd/nodes/DiscordSDKLoader.tscn" [display] diff --git a/src/discordgodot.cpp b/src/discordgodot.cpp index ec6729c..ee52c92 100644 --- a/src/discordgodot.cpp +++ b/src/discordgodot.cpp @@ -238,7 +238,7 @@ void discord_sdk::clear() small_image_text = ""; start_timestamp = 0; end_timestamp = 0; - party_id = "-"; + party_id = ""; current_party_size = 0; max_party_size = 0; match_secret = "";