Skip to content

Commit

Permalink
continued making autoload and more obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
vaporvee committed Nov 30, 2023
1 parent dba8569 commit 6fd58b0
Show file tree
Hide file tree
Showing 26 changed files with 575 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"${default}",
"${workspaceFolder}/src/lib/godot-cpp/gen/include",
"${workspaceFolder}/src/lib/godot-cpp/include",
"${workspaceFolder}/src/lib/godot-cpp/gdextension"
"${workspaceFolder}/src/lib/godot-cpp/gdextension",
"${workspaceFolder}/src/lib/godot-cpp/gen/include"
],
"defines": [
"_DEBUG",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[configuration]

entry_symbol = "discordsdkgd_library_init"
compatibility_minimum = 4.1
compatibility_minimum = 4.2

[libraries]

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions project/addons/discord-sdk-gd/nodes/Debug.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func _process(_delta):
$Panel/TextureRect.self_modulate = Color(\"#797979\")
$Panel/TextureRect/AnimationPlayer.stop()
debug_text_update()


func debug_text_update():
$Panel/Info.text = \"Application ID : {id}
Expand Down
14 changes: 2 additions & 12 deletions project/addons/discord-sdk-gd/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,22 @@ var loaded_DiscordSDKDebug = DiscordSDKDebug.new()
var restart_window: Control = preload("res://addons/discord-sdk-gd/restart_window.tscn").instantiate()



func _enter_tree() -> void:
add_custom_type("DiscordSDKDebug","Node",DiscordSDKDebug,DiscordSDKDebug_icon)
add_autoload_singleton("DiscordSDKLoader", "res://addons/discord-sdk-gd/nodes/core_updater.gd")
ProjectSettings.set_setting("DiscordSDK/EditorPresence/enabled",false)
ProjectSettings.set_as_basic("DiscordSDK/EditorPresence/enabled",true)
ProjectSettings.set_initial_value("DiscordSDK/EditorPresence/enabled",false)
get_node("/root/").add_child(DiscordLoader.new())

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")
if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/nodes/.gdignore"):
DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/nodes/.gdignore")
add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR,restart_window)
restart_window.get_child(0).connect("canceled",save_restart)
restart_window.get_child(0).connect("confirmed",restart)

func _disable_plugin() -> void:
FileAccess.open("res://addons/discord-sdk-gd/bin/.gdignore",FileAccess.WRITE)
FileAccess.open("res://addons/discord-sdk-gd/nodes/.gdignore",FileAccess.WRITE)
push_warning("DiscordSDK Addon got disabled. PLEASE RESTART THE EDITOR!")
remove_autoload_singleton("DiscordSDKLoader")
remove_custom_type("DiscordSDKDebug")
ProjectSettings.clear("DiscordSDK/EditorPresence/enabled")

func save_restart() -> void:
get_editor_interface().restart_editor(true)

func restart() -> void:
get_editor_interface().restart_editor(false)
11 changes: 11 additions & 0 deletions project/addons/zylann.editor_debugger/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Editor debugger for Godot Engine
--------------------------------

Copyright (c) 2018 Marc Gilleron

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Loading

0 comments on commit 6fd58b0

Please sign in to comment.