Skip to content

Commit

Permalink
fixed typo and renamed autoload (1.0.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaporvee committed Dec 17, 2023
1 parent e206b11 commit 210555d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/BUG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion project/addons/discord-sdk-gd/nodes/discord_autoload.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
2 changes: 1 addition & 1 deletion project/addons/discord-sdk-gd/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 4 additions & 4 deletions project/addons/discord-sdk-gd/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
27 changes: 5 additions & 22 deletions project/addons/discord-sdk-gd/restart_window.tscn
Original file line number Diff line number Diff line change
@@ -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"]

Expand All @@ -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",
Expand All @@ -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"]

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion project/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 210555d

Please sign in to comment.