diff --git a/addons/discord-sdk-gd/Debug.svg b/addons/discord-sdk-gd/Debug.svg new file mode 100644 index 0000000..7987166 --- /dev/null +++ b/addons/discord-sdk-gd/Debug.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/addons/discord-sdk-gd/Debug.svg.import b/addons/discord-sdk-gd/Debug.svg.import new file mode 100644 index 0000000..708694a --- /dev/null +++ b/addons/discord-sdk-gd/Debug.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ufh1hha1ehui" +path="res://.godot/imported/Debug.svg-97b25f5d09dbf04212867cd1a46cf368.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-sdk-gd/Debug.svg" +dest_files=["res://.godot/imported/Debug.svg-97b25f5d09dbf04212867cd1a46cf368.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/discord-sdk-gd/Logo_V2_No_Bg.png b/addons/discord-sdk-gd/Logo_V2_No_Bg.png new file mode 100644 index 0000000..fb6c700 Binary files /dev/null and b/addons/discord-sdk-gd/Logo_V2_No_Bg.png differ diff --git a/addons/discord-sdk-gd/Logo_V2_No_Bg.png.import b/addons/discord-sdk-gd/Logo_V2_No_Bg.png.import new file mode 100644 index 0000000..4d6ea22 --- /dev/null +++ b/addons/discord-sdk-gd/Logo_V2_No_Bg.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csl0e2px0cwc1" +path="res://.godot/imported/Logo_V2_No_Bg.png-9c8178062d6891c8370df63a912bd8e2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-sdk-gd/Logo_V2_No_Bg.png" +dest_files=["res://.godot/imported/Logo_V2_No_Bg.png-9c8178062d6891c8370df63a912bd8e2.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/addons/discord-sdk-gd/READ_ME_PLEASE.txt b/addons/discord-sdk-gd/READ_ME_PLEASE.txt new file mode 100644 index 0000000..e070946 --- /dev/null +++ b/addons/discord-sdk-gd/READ_ME_PLEASE.txt @@ -0,0 +1,7 @@ +MINIMUM GODOT VERSION: 4.2 + +PLEASE ACTIVATE THE PLUGIN UNDER Project -> Project Settings... -> Plugins -> DiscordSDK -> Status +IGNORE THE RED ERRORS ON THE FIRST 2 RESTARTS +READ THE TUTORIAL LINKED IN THE WINDOW THAT WILL OPEN ON PLUGIN ENABLE + +If nothing works, enable the plugin and delete /addons/discord-sdk-gd/bin/.gdignore diff --git a/addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension b/addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension new file mode 100644 index 0000000..1cdc0de --- /dev/null +++ b/addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension @@ -0,0 +1,34 @@ +[configuration] + +entry_symbol = "discordsdkgd_library_init" +compatibility_minimum = 4.2 + +[libraries] + +macos.debug.x86_64 = "macos/libdiscord_game_sdk_binding_debug.dylib" +macos.release.x86_64 = "macos/libdiscord_game_sdk_binding.dylib" +macos.debug.arm64 = "macos/libdiscord_game_sdk_binding_arm64_debug.dylib" +macos.release.arm64 = "macos/libdiscord_game_sdk_binding_arm64.dylib" +windows.debug.x86_64 = "windows/discord_game_sdk_binding_debug.dll" +windows.release.x86_64 = "windows/discord_game_sdk_binding.dll" +linux.debug.x86_64 = "linux/libdiscord_game_sdk_binding_debug.so" +linux.release.x86_64 = "linux/libdiscord_game_sdk_binding.so" +linux.debug.arm64 = "linux/libdiscord_game_sdk_binding_debug.so" +linux.release.arm64 = "linux/libdiscord_game_sdk_binding.so" +linux.debug.rv64 = "linux/libdiscord_game_sdk_binding_debug.so" +linux.release.rv64 = "linux/libdiscord_game_sdk_binding.so" + +[dependencies] + +macos.debug.x86_64 = { "macos/libdiscord_game_sdk.dylib": "" } +macos.release.x86_64 = { "macos/libdiscord_game_sdk.dylib": "" } +macos.debug.arm64 = { "macos/libdiscord_game_sdk_aarch64": "" } +macos.release.arm64 = { "macos/libdiscord_game_sdk_aarch64": "" } +windows.debug.x86_64 = { "windows/discord_game_sdk.dll": "" } +windows.release.x86_64 = { "windows/discord_game_sdk.dll": "" } +linux.debug.x86_64 = { "linux/libdiscord_game_sdk.so": "" } +linux.release.x86_64 = { "linux/libdiscord_game_sdk.so": "" } +linux.debug.arm64 = { "linux/libdiscord_game_sdk.so": "" } +linux.release.arm64 = { "linux/libdiscord_game_sdk.so": "" } +linux.debug.rv64 = { "linux/libdiscord_game_sdk.so": "" } +linux.release.rv64 = { "linux/libdiscord_game_sdk.so": "" } diff --git a/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk.so b/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk.so new file mode 100644 index 0000000..9dacf94 Binary files /dev/null and b/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk.so differ diff --git a/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk_binding.so b/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk_binding.so new file mode 100644 index 0000000..b0d258d Binary files /dev/null and b/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk_binding.so differ diff --git a/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk_binding_debug.so b/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk_binding_debug.so new file mode 100644 index 0000000..1437c08 Binary files /dev/null and b/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk_binding_debug.so differ diff --git a/addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll b/addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll new file mode 100644 index 0000000..be946ea Binary files /dev/null and b/addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll differ diff --git a/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll b/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll new file mode 100644 index 0000000..df0c1e6 Binary files /dev/null and b/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll differ diff --git a/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding_debug.dll b/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding_debug.dll new file mode 100644 index 0000000..6b7f5f8 Binary files /dev/null and b/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding_debug.dll differ diff --git a/addons/discord-sdk-gd/bin/windows/discord_game_sdk_x86.dll b/addons/discord-sdk-gd/bin/windows/discord_game_sdk_x86.dll new file mode 100644 index 0000000..45b9bb1 Binary files /dev/null and b/addons/discord-sdk-gd/bin/windows/discord_game_sdk_x86.dll differ diff --git a/addons/discord-sdk-gd/bin/windows/~discord_game_sdk_binding_debug.dll b/addons/discord-sdk-gd/bin/windows/~discord_game_sdk_binding_debug.dll new file mode 100644 index 0000000..6b7f5f8 Binary files /dev/null and b/addons/discord-sdk-gd/bin/windows/~discord_game_sdk_binding_debug.dll differ diff --git a/addons/discord-sdk-gd/example.gd b/addons/discord-sdk-gd/example.gd new file mode 100644 index 0000000..04f4c91 --- /dev/null +++ b/addons/discord-sdk-gd/example.gd @@ -0,0 +1,38 @@ +class_name DiscordSDKTutorial +extends Node + +## 1. Put the addons/ folder in your Godot project[br] +## 2. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". [br](if it doesn't show up restart your project and try again)[br] +## 3. Restart your project[br] +## 4. Create an Application under https://discord.com/developers/applications and get the Application ID br] +## 5. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys[br] +## +## This is your [code]_ready()[/code] function wich could be anywhere +## [codeblock] +## func _ready(): +## # Application ID +## DiscordSDK.app_id = 1099618430065324082 +## # this is boolean if everything worked +## print("Discord working: " + str(DiscordSDK.get_is_discord_working())) +## # Set the first custom text row of the activity here +## DiscordSDK.details = "A demo activity by vaporvee#1231" +## # Set the second custom text row of the activity here +## DiscordSDK.state = "Checkpoint 23/23" +## # Image key for small image from "Art Assets" from the Discord Developer website +## DiscordSDK.large_image = "game" +## # Tooltip text for the large image +## DiscordSDK.large_image_text = "Try it now!" +## # Image key for large image from "Art Assets" from the Discord Developer website +## DiscordSDK.small_image = "boss" +## # Tooltip text for the small image +## DiscordSDK.small_image_text = "Fighting the end boss! D:" +## # "02:41 elapsed" timestamp for the activity +## DiscordSDK.start_timestamp = int(Time.get_unix_time_from_system()) +## # "59:59 remaining" timestamp for the activity +## DiscordSDK.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 +## # Always refresh after changing the values! +## DiscordSDK.refresh() +## [/codeblock] +## +## @tutorial(More information here): https://github.com/vaporvee/discord-sdk-godot/wiki/Quick-start +## @tutorial(Make your Application ID and else here): https://discord.com/developers/applications diff --git a/addons/discord-sdk-gd/logo.png b/addons/discord-sdk-gd/logo.png new file mode 100644 index 0000000..fb6c700 Binary files /dev/null and b/addons/discord-sdk-gd/logo.png differ diff --git a/addons/discord-sdk-gd/logo.png.import b/addons/discord-sdk-gd/logo.png.import new file mode 100644 index 0000000..a6947aa --- /dev/null +++ b/addons/discord-sdk-gd/logo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csl0e2px0cwc1" +path="res://.godot/imported/logo.png-b59b4861dc0c64616d78af30082b08b5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-sdk-gd/logo.png" +dest_files=["res://.godot/imported/logo.png-b59b4861dc0c64616d78af30082b08b5.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/addons/discord-sdk-gd/nodes/Debug.tscn b/addons/discord-sdk-gd/nodes/Debug.tscn new file mode 100644 index 0000000..adf08fc --- /dev/null +++ b/addons/discord-sdk-gd/nodes/Debug.tscn @@ -0,0 +1,267 @@ +[gd_scene load_steps=9 format=3 uid="uid://c1slhdnlsv2qt"] + +[ext_resource type="Texture2D" uid="uid://dnfq6kug4x6o2" path="res://addons/discord-sdk-gd/nodes/assets/Checked.svg" id="2_q6tao"] +[ext_resource type="Texture2D" uid="uid://compmm3kviqqe" path="res://addons/discord-sdk-gd/nodes/assets/Unchecked.svg" id="3_5cyem"] +[ext_resource type="Texture2D" uid="uid://dtc6ckladq0td" path="res://addons/discord-sdk-gd/nodes/assets/circle.svg" id="3_goflf"] + +[sub_resource type="GDScript" id="GDScript_ak1tp"] +resource_name = "Debug" +script/source = "extends Node + +func _ready(): + DiscordSDK.connect(\"activity_join_request\",_on_activity_join_request) + +func _process(_delta): + if(DiscordSDK.get_is_discord_working()): + $Panel/TextureRect.self_modulate = Color(\"#3eff8d\") + $Panel/TextureRect/AnimationPlayer.play(\"pulsate\") + debug_text_update() + else: + $Panel/TextureRect.self_modulate = Color(\"#797979\") + $Panel/TextureRect/AnimationPlayer.stop() + debug_text_update() + + +func debug_text_update(): + $Panel/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} +\" + $Panel/Info.text = $Panel/Info.text.replace(\"{ppublic}\",str(DiscordSDK.is_public_party)).replace(\"{instanced}\",str(DiscordSDK.instanced)).replace(\"{ssecret}\",DiscordSDK.spectate_secret).replace(\"{jsecret}\",DiscordSDK.join_secret).replace(\"{msecret}\",DiscordSDK.match_secret).replace(\"{mpartysize}\",str(DiscordSDK.max_party_size)).replace(\"{cpartysize}\",str(DiscordSDK.current_party_size)).replace(\"{partyid}\",DiscordSDK.party_id).replace(\"{id}\",str(DiscordSDK.app_id)).replace(\"{details}\",DiscordSDK.details).replace(\"{state}\",DiscordSDK.state).replace(\"{lkey}\",DiscordSDK.large_image).replace(\"{ltext}\",DiscordSDK.large_image_text).replace(\"{skey}\",DiscordSDK.small_image).replace(\"{stext}\",DiscordSDK.small_image_text).replace(\"{stimestamp}\",str(DiscordSDK.start_timestamp)).replace(\"{etimestamp}\",str(DiscordSDK.end_timestamp)) + +var user_request = {}; + +func _on_activity_join_request(user_requesting): + print(user_requesting) + user_request = user_requesting + +func _on_accept_join_request_pressed(): + if(!user_request.is_empty()): + DiscordSDK.accept_join_request(user_request.id) + +func _on_invite_with_user_id_text_submitted(new_text): + DiscordSDK.send_invite(int(new_text),true,\"this is a test invite sent from godot\") + +func _on_accept_with_user_id_text_submitted(new_text): + DiscordSDK.accept_invite(int(new_text)) + +func _on_print_current_user_on_console_pressed(): + print(DiscordSDK.get_current_user()) + +func _on_toggle_sdk_toggled(button_pressed): + if(button_pressed): + DiscordSDK.unclear() + else: + DiscordSDK.clear(false) + +func _on_print_friends_pressed(): + print(DiscordSDK.get_all_relationships()) +" + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8abo6"] + +[sub_resource type="Animation" id="Animation_mmtmn"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0.4), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0.5, 0.5)] +} + +[sub_resource type="Animation" id="Animation_5u02v"] +resource_name = "pulsate" +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.5, 1), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(0.5, 0.5), Vector2(0.8, 0.8), Vector2(0.5, 0.5)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_a7ofc"] +_data = { +"RESET": SubResource("Animation_mmtmn"), +"pulsate": SubResource("Animation_5u02v") +} + +[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="Panel" type="Panel" parent="."] +anchors_preset = -1 +anchor_right = 0.373 +anchor_bottom = 1.0 +offset_left = -5.0 +offset_right = 0.303955 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Info" type="RichTextLabel" parent="Panel"] +layout_mode = 0 +offset_left = 12.0 +offset_top = 21.0 +offset_right = 429.0 +offset_bottom = 461.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="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 12.0 +offset_top = 138.375 +offset_right = 245.0 +offset_bottom = 171.375 +grow_vertical = 2 +text = "Print current user on console" + +[node name="PrintFriends" type="Button" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 12.0 +offset_top = 176.5 +offset_right = 204.0 +offset_bottom = 207.5 +grow_vertical = 2 +text = "Print friends on console" + +[node name="AcceptJoinRequest" type="Button" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 12.0 +offset_top = 212.875 +offset_right = 154.0 +offset_bottom = 243.875 +grow_vertical = 2 +text = "ACCEPT REQUEST" + +[node name="InviteWithUserID" type="LineEdit" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 11.0 +offset_top = 250.375 +offset_right = 210.0 +offset_bottom = 281.375 +grow_vertical = 2 +size_flags_horizontal = 0 +placeholder_text = "Invite with user_id here" + +[node name="AcceptWithUserID" type="LineEdit" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 11.0 +offset_top = 286.875 +offset_right = 260.0 +offset_bottom = 317.875 +grow_vertical = 2 +placeholder_text = "Accept Invite with user_id here" + +[node name="ToggleSDK" type="CheckButton" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 298.0 +offset_top = 157.375 +offset_right = 1144.0 +offset_bottom = 665.375 +grow_vertical = 2 +scale = Vector2(0.05, 0.05) +theme_override_icons/checked = ExtResource("2_q6tao") +theme_override_icons/unchecked = ExtResource("3_5cyem") +theme_override_styles/focus = SubResource("StyleBoxEmpty_8abo6") +button_pressed = true + +[node name="TextureRect" type="TextureRect" parent="Panel"] +self_modulate = Color(0.47451, 0.47451, 0.47451, 1) +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.88 +anchor_top = 0.762 +anchor_right = 0.88 +anchor_bottom = 0.762 +offset_left = -28.8 +offset_top = -28.776 +offset_right = 28.0841 +offset_bottom = 28.1082 +grow_horizontal = 2 +grow_vertical = 2 +scale = Vector2(0.5, 0.5) +pivot_offset = Vector2(29.0693, 29.0693) +texture = ExtResource("3_goflf") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="Panel/TextureRect"] +libraries = { +"": SubResource("AnimationLibrary_a7ofc") +} + +[connection signal="pressed" from="Panel/PrintCurrentUserOnConsole" to="." method="_on_print_current_user_on_console_pressed"] +[connection signal="pressed" from="Panel/PrintFriends" to="." method="_on_print_friends_pressed"] +[connection signal="pressed" from="Panel/AcceptJoinRequest" to="." method="_on_accept_join_request_pressed"] +[connection signal="text_submitted" from="Panel/InviteWithUserID" to="." method="_on_invite_with_user_id_text_submitted"] +[connection signal="text_submitted" from="Panel/AcceptWithUserID" to="." method="_on_accept_with_user_id_text_submitted"] +[connection signal="toggled" from="Panel/ToggleSDK" to="." method="_on_toggle_sdk_toggled"] diff --git a/addons/discord-sdk-gd/nodes/assets/Checked.svg b/addons/discord-sdk-gd/nodes/assets/Checked.svg new file mode 100644 index 0000000..d37a1c2 --- /dev/null +++ b/addons/discord-sdk-gd/nodes/assets/Checked.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/addons/discord-sdk-gd/nodes/assets/Checked.svg.import b/addons/discord-sdk-gd/nodes/assets/Checked.svg.import new file mode 100644 index 0000000..bc9fc5a --- /dev/null +++ b/addons/discord-sdk-gd/nodes/assets/Checked.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dnfq6kug4x6o2" +path="res://.godot/imported/Checked.svg-152467b95b56fa0b9944b5cc25700916.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-sdk-gd/nodes/assets/Checked.svg" +dest_files=["res://.godot/imported/Checked.svg-152467b95b56fa0b9944b5cc25700916.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/discord-sdk-gd/nodes/assets/Unchecked.svg b/addons/discord-sdk-gd/nodes/assets/Unchecked.svg new file mode 100644 index 0000000..58cb234 --- /dev/null +++ b/addons/discord-sdk-gd/nodes/assets/Unchecked.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/addons/discord-sdk-gd/nodes/assets/Unchecked.svg.import b/addons/discord-sdk-gd/nodes/assets/Unchecked.svg.import new file mode 100644 index 0000000..43b3409 --- /dev/null +++ b/addons/discord-sdk-gd/nodes/assets/Unchecked.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://compmm3kviqqe" +path="res://.godot/imported/Unchecked.svg-91cff67e13e7a1508fbc6a949f5f5f52.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-sdk-gd/nodes/assets/Unchecked.svg" +dest_files=["res://.godot/imported/Unchecked.svg-91cff67e13e7a1508fbc6a949f5f5f52.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/discord-sdk-gd/nodes/assets/circle.svg b/addons/discord-sdk-gd/nodes/assets/circle.svg new file mode 100644 index 0000000..acd3753 --- /dev/null +++ b/addons/discord-sdk-gd/nodes/assets/circle.svg @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/addons/discord-sdk-gd/nodes/assets/circle.svg.import b/addons/discord-sdk-gd/nodes/assets/circle.svg.import new file mode 100644 index 0000000..d7598a8 --- /dev/null +++ b/addons/discord-sdk-gd/nodes/assets/circle.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtc6ckladq0td" +path="res://.godot/imported/circle.svg-ca71b895eb1c5e7e6f2f2afe081d28dd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-sdk-gd/nodes/assets/circle.svg" +dest_files=["res://.godot/imported/circle.svg-ca71b895eb1c5e7e6f2f2afe081d28dd.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/discord-sdk-gd/nodes/debug.gd b/addons/discord-sdk-gd/nodes/debug.gd new file mode 100644 index 0000000..a4e8ee0 --- /dev/null +++ b/addons/discord-sdk-gd/nodes/debug.gd @@ -0,0 +1,11 @@ +## This is a Debug Node wich will show some usefull info and buttons/input +## +## The DiscordSDK Debug Node will show info about the current values of its variables and some buttons to change them. +## +## @tutorial: https://github.com/vaporvee/discord-sdk-godot/wiki +@tool +extends Node + +func _ready() -> void: + const DebugNodeGroup: PackedScene = preload("res://addons/discord-sdk-gd/nodes/Debug.tscn") + add_child(DebugNodeGroup.instantiate()) diff --git a/addons/discord-sdk-gd/nodes/discord_autoload.gd b/addons/discord-sdk-gd/nodes/discord_autoload.gd new file mode 100644 index 0000000..4a2b949 --- /dev/null +++ b/addons/discord-sdk-gd/nodes/discord_autoload.gd @@ -0,0 +1,20 @@ +## This is a GDscript Node wich gets automatically added as Autoload while installing the addon. +## +## It can run in the background to comunicate with Discord. +## You don't need to use it. If you remove it make sure to run [code]DiscordSDK.run_callbacks()[/code] in a [code]_process[/code] function. +## +## @tutorial: https://github.com/vaporvee/discord-sdk-godot/wiki +extends Node + +func _ready() -> void: + DiscordSDK.app_id = 1200457562877857912 + DiscordSDK.details = "A one week project by vaporvee" + DiscordSDK.state = "Having fun solving gravity puzzles" + + DiscordSDK.large_image = "icon" + DiscordSDK.large_image_text = "Now on itch.io" + + DiscordSDK.refresh() + +func _process(_delta) -> void: + DiscordSDK.run_callbacks() diff --git a/addons/discord-sdk-gd/plugin.cfg b/addons/discord-sdk-gd/plugin.cfg new file mode 100644 index 0000000..8e74e84 --- /dev/null +++ b/addons/discord-sdk-gd/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="DiscordSDK" +description="Discord Game SDK support for GDScript in Godot" +author="vaporvee" +version="1.1.0" +script="plugin.gd" diff --git a/addons/discord-sdk-gd/plugin.gd b/addons/discord-sdk-gd/plugin.gd new file mode 100644 index 0000000..a900280 --- /dev/null +++ b/addons/discord-sdk-gd/plugin.gd @@ -0,0 +1,57 @@ +@tool +extends EditorPlugin + +const DiscordSDKDebug = preload("res://addons/discord-sdk-gd/nodes/debug.gd") +const DiscordSDKDebug_icon = preload("res://addons/discord-sdk-gd/Debug.svg") +var loaded_DiscordSDKDebug = DiscordSDKDebug.new() +var restart_window: ConfirmationDialog = preload("res://addons/discord-sdk-gd/restart_window.tscn").instantiate() +var plugin_cfg: ConfigFile = ConfigFile.new() +const plugin_data_filename = "/plugin_data.cfg" + +func _enter_tree() -> void: + add_custom_type("DiscordSDKDebug","Node",DiscordSDKDebug,DiscordSDKDebug_icon) + EditorInterface.get_editor_settings().settings_changed.connect(_on_editor_settings_changed) + +func _ready() -> void: + await get_tree().create_timer(0.5).timeout + plugin_cfg.load(EditorInterface.get_editor_paths().get_data_dir() + plugin_data_filename) + if !EditorInterface.get_editor_settings().has_setting("DiscordSDK/EditorPresence/enabled"): + EditorInterface.get_editor_settings().set_setting("DiscordSDK/EditorPresence/enabled",plugin_cfg.get_value("Discord","editor_presence",false)) + +func _exit_tree(): + if EditorInterface.get_editor_settings().has_setting("DiscordSDK/EditorPresence/enabled"): + EditorInterface.get_editor_settings().erase("DiscordSDK/EditorPresence/enabled") + +func _enable_plugin() -> void: + if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/bin/.gdignore"): + DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/bin/.gdignore") + add_autoload_singleton("DiscordSDKLoader","res://addons/discord-sdk-gd/nodes/discord_autoload.gd") + restart_window.connect("confirmed", save_no_restart) + restart_window.connect("canceled", save_and_restart) + EditorInterface.popup_dialog_centered(restart_window) + print("IGNORE RED ERROR MESSAGES BEFORE THE SECOND RESTART!") + +func _disable_plugin() -> void: + remove_autoload_singleton("DiscordSDKLoader") + FileAccess.open("res://addons/discord-sdk-gd/bin/.gdignore",FileAccess.WRITE) + remove_custom_type("DiscordSDKDebug") + EditorInterface.get_editor_settings().erase("DiscordSDK/EditorPresence/enabled") + push_warning("Please restart the editor to fully disable the DiscordSDK plugin") + +func save_and_restart() -> void: + EditorInterface.save_all_scenes() + EditorInterface.restart_editor(true) + +func save_no_restart() -> void: + EditorInterface.restart_editor(false) + +var editor_presence: Node +func _on_editor_settings_changed() -> void: + plugin_cfg.set_value("Discord","editor_presence",EditorInterface.get_editor_settings().get_setting("DiscordSDK/EditorPresence/enabled")) + plugin_cfg.save(EditorInterface.get_editor_paths().get_data_dir() + plugin_data_filename) + if ClassDB.class_exists("EditorPresence") && editor_presence == null: + editor_presence = ClassDB.instantiate("EditorPresence") + if EditorInterface.get_editor_settings().has_setting("DiscordSDK/EditorPresence/enabled") && EditorInterface.get_editor_settings().get_setting("DiscordSDK/EditorPresence/enabled"): + add_child(editor_presence) + else: + editor_presence.queue_free() diff --git a/addons/discord-sdk-gd/restart_window.tscn b/addons/discord-sdk-gd/restart_window.tscn new file mode 100644 index 0000000..351e542 --- /dev/null +++ b/addons/discord-sdk-gd/restart_window.tscn @@ -0,0 +1,112 @@ +[gd_scene load_steps=8 format=3 uid="uid://byc4c6d5tpomq"] + +[ext_resource type="Texture2D" uid="uid://csl0e2px0cwc1" path="res://addons/discord-sdk-gd/Logo_V2_No_Bg.png" id="1_0svbg"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1t7mm"] + +[sub_resource type="Theme" id="Theme_swwco"] +Button/styles/focus = SubResource("StyleBoxEmpty_1t7mm") + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5vqdt"] + +[sub_resource type="Image" id="Image_vijyp"] +data = { +"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 168, 224, 224, 224, 233, 224, 224, 224, 236, 224, 224, 224, 170, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 234, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 239, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 168, 224, 224, 224, 255, 224, 224, 224, 186, 224, 224, 224, 32, 224, 224, 224, 33, 224, 224, 224, 187, 224, 224, 224, 255, 225, 225, 225, 167, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 255, 224, 224, 224, 234, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 229, 229, 229, 38, 224, 224, 224, 255, 224, 224, 224, 229, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 164, 224, 224, 224, 255, 224, 224, 224, 187, 225, 225, 225, 34, 227, 227, 227, 36, 224, 224, 224, 192, 224, 224, 224, 255, 224, 224, 224, 162, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 225, 225, 225, 215, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 229, 224, 224, 224, 32, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 224, 224, 224, 216, 224, 224, 224, 255, 224, 224, 224, 210, 224, 224, 224, 161, 224, 224, 224, 232, 224, 224, 224, 231, 225, 225, 225, 159, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 107, 224, 224, 224, 255, 224, 224, 224, 210, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 105, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 224, 224, 224, 130, 255, 255, 255, 1, 255, 255, 255, 1, 225, 225, 225, 134, 224, 224, 224, 224, 225, 225, 225, 223, 224, 224, 224, 132, 255, 255, 255, 1, 255, 255, 255, 6, 224, 224, 224, 137, 224, 224, 224, 231, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 130, 225, 225, 225, 133, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 129, 224, 224, 224, 137, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 220, 225, 225, 225, 223, 224, 224, 224, 255, 226, 226, 226, 61, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 222, 224, 224, 224, 231, 224, 224, 224, 255, 227, 227, 227, 62, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 222, 224, 224, 224, 255, 227, 227, 227, 63, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 230, 224, 224, 224, 255, 227, 227, 227, 63, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 127, 224, 224, 224, 129, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 126, 225, 225, 225, 135, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 1, 224, 224, 224, 128, 224, 224, 224, 220, 224, 224, 224, 219, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 5, 225, 225, 225, 134, 224, 224, 224, 229, 224, 224, 224, 255, 255, 255, 255, 0), +"format": "RGBA8", +"height": 16, +"mipmaps": false, +"width": 16 +} + +[sub_resource type="ImageTexture" id="ImageTexture_gdtpn"] +image = SubResource("Image_vijyp") + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7v0rg"] + +[node name="RestartWindow" type="ConfirmationDialog"] +title = "Restart required" +initial_position = 2 +size = Vector2i(430, 500) +visible = true +transient = false +unresizable = true +theme = SubResource("Theme_swwco") +ok_button_text = "Restart" +cancel_button_text = "Save and restart" + +[node name="Panel" type="Panel" parent="."] +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -207.0 +offset_top = 8.0 +offset_right = 207.0 +offset_bottom = 451.0 +grow_horizontal = 2 +mouse_filter = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="Panel"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -200.0 +offset_right = 200.0 +offset_bottom = 389.0 +grow_horizontal = 2 + +[node name="HSeparator" type="HSeparator" parent="Panel/VBoxContainer"] +layout_mode = 2 +mouse_filter = 1 +theme_override_constants/separation = 15 +theme_override_styles/separator = SubResource("StyleBoxEmpty_5vqdt") + +[node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_constants/separation = 10 + +[node name="DocsIcon" type="TextureRect" parent="Panel/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 4 +texture = SubResource("ImageTexture_gdtpn") +stretch_mode = 2 + +[node name="LinkButton" type="LinkButton" parent="Panel/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 8 +mouse_default_cursor_shape = 16 +theme_override_font_sizes/font_size = 24 +text = "HOW TO USE" +uri = "https://github.com/vaporvee/discord-sdk-godot/wiki" + +[node name="TextureRect" type="TextureRect" parent="Panel/VBoxContainer"] +custom_minimum_size = Vector2(128, 128) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 0 +texture = ExtResource("1_0svbg") +expand_mode = 1 + +[node name="RichTextLabel" type="RichTextLabel" parent="Panel/VBoxContainer"] +custom_minimum_size = Vector2(400, 250) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 0 +mouse_filter = 1 +theme_override_font_sizes/normal_font_size = 16 +theme_override_styles/normal = SubResource("StyleBoxEmpty_7v0rg") +bbcode_enabled = true +text = "[center]Thanks for enabling the +[rainbow]Discord Game SDK Plugin[/rainbow] +made by vaporvee. ❤️ + + +You need to [wave]restart[/wave] the editor to fully enable this plugin! +Do you want to [wave]save[/wave] your project before restarting? + +Error messages after the first two restarts are normal. Please ignore them!" diff --git a/export_presets.cfg b/export_presets.cfg index 352847f..6bc6447 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -98,3 +98,43 @@ progressive_web_app/icon_144x144="" progressive_web_app/icon_180x180="" progressive_web_app/icon_512x512="" progressive_web_app/background_color=Color(0, 0, 0, 1) + +[preset.2] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="C:/Users/yanni/Desktop/exports lol/project-thought-experiment.x86_64" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.2.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=true +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/architecture="x86_64" +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" diff --git a/project.godot b/project.godot index c3f51c2..911573b 100644 --- a/project.godot +++ b/project.godot @@ -22,6 +22,7 @@ config/icon="res://assets/textures/gui/pte_icon.svg" WindowManager="*res://scripts/autoloads/window_manager.gd" LevelManager="*res://scenes/autoloads/level_manager.tscn" +DiscordSDKLoader="*res://addons/discord-sdk-gd/nodes/discord_autoload.gd" [display] @@ -34,11 +35,12 @@ window/size/mode.release=4 [editor_plugins] -enabled=PackedStringArray() +enabled=PackedStringArray("res://addons/discord-sdk-gd/plugin.cfg") [file_customization] folder_colors={ +"res://addons/": "purple", "res://assets/": "pink", "res://assets/models/": "pink", "res://resources/": "yellow",