From 210555d7a56806d6477d351973ef25e00199cba7 Mon Sep 17 00:00:00 2001 From: vaporvee Date: Sun, 17 Dec 2023 17:32:07 +0100 Subject: [PATCH] fixed typo and renamed autoload (1.0.1) --- .github/ISSUE_TEMPLATE/BUG.yml | 1 + .../discord-sdk-gd/nodes/discord_autoload.gd | 1 - project/addons/discord-sdk-gd/plugin.cfg | 2 +- project/addons/discord-sdk-gd/plugin.gd | 8 +++--- .../addons/discord-sdk-gd/restart_window.tscn | 27 ++++--------------- project/project.godot | 2 +- 6 files changed, 12 insertions(+), 29 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG.yml b/.github/ISSUE_TEMPLATE/BUG.yml index cc2a2f4..51c6042 100644 --- a/.github/ISSUE_TEMPLATE/BUG.yml +++ b/.github/ISSUE_TEMPLATE/BUG.yml @@ -23,6 +23,7 @@ body: label: Version description: What version of the Discord Game SDK Godot plugin are you running? options: + - 1.0.1 - 1.0.0 - 0.3.2 - 0.3.1 diff --git a/project/addons/discord-sdk-gd/nodes/discord_autoload.gd b/project/addons/discord-sdk-gd/nodes/discord_autoload.gd index 81a5048..f47afc2 100644 --- a/project/addons/discord-sdk-gd/nodes/discord_autoload.gd +++ b/project/addons/discord-sdk-gd/nodes/discord_autoload.gd @@ -6,7 +6,6 @@ ## @tutorial: https://github.com/vaporvee/discord-sdk-godot/wiki @tool extends Node -class_name DiscordSDKLoaderAutoload func _process(_delta) -> void: if GDExtensionManager.get_loaded_extensions().has("res://addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension"): diff --git a/project/addons/discord-sdk-gd/plugin.cfg b/project/addons/discord-sdk-gd/plugin.cfg index e707fbf..7c91611 100644 --- a/project/addons/discord-sdk-gd/plugin.cfg +++ b/project/addons/discord-sdk-gd/plugin.cfg @@ -3,5 +3,5 @@ name="DiscordSDK" description="Discord Game SDK support for GDScript in Godot" author="vaporvee" -version="1.0.0" +version="1.0.1" script="plugin.gd" diff --git a/project/addons/discord-sdk-gd/plugin.gd b/project/addons/discord-sdk-gd/plugin.gd index bcc1450..ab9209d 100644 --- a/project/addons/discord-sdk-gd/plugin.gd +++ b/project/addons/discord-sdk-gd/plugin.gd @@ -15,18 +15,18 @@ func _enter_tree() -> void: 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("DiscordSDKAutoload","res://addons/discord-sdk-gd/nodes/discord_autoload.gd") + 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 THE RED ERROR MESSAGES BEFORE THE SECOND RESTART!") + print("IGNORE RED ERROR MESSAGES BEFORE THE SECOND RESTART!") func _disable_plugin() -> void: - remove_autoload_singleton("DiscordSDKAutoload") + remove_autoload_singleton("DiscordSDKLoader") FileAccess.open("res://addons/discord-sdk-gd/bin/.gdignore",FileAccess.WRITE) remove_custom_type("DiscordSDKDebug") ProjectSettings.clear("DiscordSDK/EditorPresence/enabled") - push_warning("Please restart the editor to dully disable the DiscordSDK plugin") + push_warning("Please restart the editor to fully disable the DiscordSDK plugin") func save_and_restart() -> void: EditorInterface.save_all_scenes() diff --git a/project/addons/discord-sdk-gd/restart_window.tscn b/project/addons/discord-sdk-gd/restart_window.tscn index 39dc299..b145429 100644 --- a/project/addons/discord-sdk-gd/restart_window.tscn +++ b/project/addons/discord-sdk-gd/restart_window.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://byc4c6d5tpomq"] +[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"] @@ -7,25 +7,9 @@ [sub_resource type="Theme" id="Theme_swwco"] Button/styles/focus = SubResource("StyleBoxEmpty_1t7mm") -[sub_resource type="GDScript" id="GDScript_7v43l"] -resource_name = "RestartWindow" -script/source = "extends ConfirmationDialog - - -func _ready(): - canceled.connect(_on_canceled) - confirmed.connect(_on_confirmed) - -func _on_canceled(): - EditorInterface.restart_editor(false) - -func _on_confirmed(): - EditorInterface.restart_editor(true) -" - [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5vqdt"] -[sub_resource type="Image" id="Image_wf00a"] +[sub_resource type="Image" id="Image_6icdx"] 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", @@ -35,7 +19,7 @@ data = { } [sub_resource type="ImageTexture" id="ImageTexture_gdtpn"] -image = SubResource("Image_wf00a") +image = SubResource("Image_6icdx") [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7v0rg"] @@ -49,15 +33,14 @@ unresizable = true theme = SubResource("Theme_swwco") ok_button_text = "Restart" cancel_button_text = "Save and restart" -script = SubResource("GDScript_7v43l") [node name="Panel" type="Panel" parent="."] anchors_preset = 5 anchor_left = 0.5 anchor_right = 0.5 -offset_left = 8.0 +offset_left = -207.0 offset_top = 8.0 -offset_right = 422.0 +offset_right = 207.0 offset_bottom = 451.0 grow_horizontal = 2 mouse_filter = 1 diff --git a/project/project.godot b/project/project.godot index d070e30..9649c03 100644 --- a/project/project.godot +++ b/project/project.godot @@ -21,7 +21,7 @@ config/icon="res://assets/Logo_V2.png" [autoload] -DiscordSDKAutoload="*res://addons/discord-sdk-gd/nodes/discord_autoload.gd" +DiscordSDKLoader="*res://addons/discord-sdk-gd/nodes/discord_autoload.gd" [display]