renamed sdk to rpc because the people think its the discord embedded sdk
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ufh1hha1ehui"
|
||||
path="res://.godot/imported/Debug.svg-97b25f5d09dbf04212867cd1a46cf368.ctex"
|
||||
path="res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/discord-sdk-gd/Debug.svg"
|
||||
dest_files=["res://.godot/imported/Debug.svg-97b25f5d09dbf04212867cd1a46cf368.ctex"]
|
||||
source_file="res://addons/discord-rpc-gd/Debug.svg"
|
||||
dest_files=["res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.ctex"]
|
||||
|
||||
[params]
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://csl0e2px0cwc1"
|
||||
path="res://.godot/imported/Logo_V2_No_Bg.png-9c8178062d6891c8370df63a912bd8e2.ctex"
|
||||
path="res://.godot/imported/Logo_V2_No_Bg.png-ed667fb599fe1e17ebcfc361ff7c9c93.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"]
|
||||
source_file="res://addons/discord-rpc-gd/Logo_V2_No_Bg.png"
|
||||
dest_files=["res://.godot/imported/Logo_V2_No_Bg.png-ed667fb599fe1e17ebcfc361ff7c9c93.ctex"]
|
||||
|
||||
[params]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
MINIMUM GODOT VERSION: 4.2
|
||||
|
||||
PLEASE ACTIVATE THE PLUGIN UNDER Project -> Project Settings... -> Plugins -> DiscordSDK -> Status
|
||||
PLEASE ACTIVATE THE PLUGIN UNDER Project -> Project Settings... -> Plugins -> DiscordRPC -> 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
|
||||
If nothing works, enable the plugin and delete /addons/discord-rpc-gd/bin/.gdignore
|
@@ -1,6 +1,6 @@
|
||||
[configuration]
|
||||
|
||||
entry_symbol = "discordsdkgd_library_init"
|
||||
entry_symbol = "discordrpcgd_library_init"
|
||||
compatibility_minimum = 4.1
|
||||
|
||||
[libraries]
|
@@ -1,8 +1,8 @@
|
||||
class_name DiscordSDKTutorial
|
||||
class_name DiscordRPCTutorial
|
||||
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]
|
||||
## 2. Enable the addon in your Project Settings under "Plugins" and "DiscordRPC". [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]
|
||||
@@ -11,28 +11,28 @@ extends Node
|
||||
## [codeblock]
|
||||
## func _ready():
|
||||
## # Application ID
|
||||
## DiscordSDK.app_id = 1099618430065324082
|
||||
## DiscordRPC.app_id = 1099618430065324082
|
||||
## # this is boolean if everything worked
|
||||
## print("Discord working: " + str(DiscordSDK.get_is_discord_working()))
|
||||
## print("Discord working: " + str(DiscordRPC.get_is_discord_working()))
|
||||
## # Set the first custom text row of the activity here
|
||||
## DiscordSDK.details = "A demo activity by vaporvee#1231"
|
||||
## DiscordRPC.details = "A demo activity by vaporvee#1231"
|
||||
## # Set the second custom text row of the activity here
|
||||
## DiscordSDK.state = "Checkpoint 23/23"
|
||||
## DiscordRPC.state = "Checkpoint 23/23"
|
||||
## # Image key for small image from "Art Assets" from the Discord Developer website
|
||||
## DiscordSDK.large_image = "game"
|
||||
## DiscordRPC.large_image = "game"
|
||||
## # Tooltip text for the large image
|
||||
## DiscordSDK.large_image_text = "Try it now!"
|
||||
## DiscordRPC.large_image_text = "Try it now!"
|
||||
## # Image key for large image from "Art Assets" from the Discord Developer website
|
||||
## DiscordSDK.small_image = "boss"
|
||||
## DiscordRPC.small_image = "boss"
|
||||
## # Tooltip text for the small image
|
||||
## DiscordSDK.small_image_text = "Fighting the end boss! D:"
|
||||
## DiscordRPC.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())
|
||||
## DiscordRPC.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
|
||||
## DiscordRPC.end_timestamp = int(Time.get_unix_time_from_system()) + 3600
|
||||
## # Always refresh after changing the values!
|
||||
## DiscordSDK.refresh()
|
||||
## DiscordRPC.refresh()
|
||||
## [/codeblock]
|
||||
##
|
||||
## @tutorial(More information here): https://github.com/vaporvee/discord-sdk-godot/wiki/Quick-start
|
||||
## @tutorial(More information here): https://github.com/vaporvee/discord-rpc-godot/wiki/Quick-start
|
||||
## @tutorial(Make your Application ID and else here): https://discord.com/developers/applications
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://csl0e2px0cwc1"
|
||||
path="res://.godot/imported/logo.png-b59b4861dc0c64616d78af30082b08b5.ctex"
|
||||
path="res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/discord-sdk-gd/logo.png"
|
||||
dest_files=["res://.godot/imported/logo.png-b59b4861dc0c64616d78af30082b08b5.ctex"]
|
||||
source_file="res://addons/discord-rpc-gd/logo.png"
|
||||
dest_files=["res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.ctex"]
|
||||
|
||||
[params]
|
||||
|
@@ -1,18 +1,18 @@
|
||||
[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"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnfq6kug4x6o2" path="res://addons/discord-rpc-gd/nodes/assets/Checked.svg" id="2_q6tao"]
|
||||
[ext_resource type="Texture2D" uid="uid://compmm3kviqqe" path="res://addons/discord-rpc-gd/nodes/assets/Unchecked.svg" id="3_5cyem"]
|
||||
[ext_resource type="Texture2D" uid="uid://dtc6ckladq0td" path="res://addons/discord-rpc-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)
|
||||
DiscordRPC.connect(\"activity_join_request\",_on_activity_join_request)
|
||||
|
||||
func _process(_delta):
|
||||
if(DiscordSDK.get_is_discord_working()):
|
||||
if(DiscordRPC.get_is_discord_working()):
|
||||
$Panel/TextureRect.self_modulate = Color(\"#3eff8d\")
|
||||
$Panel/TextureRect/AnimationPlayer.play(\"pulsate\")
|
||||
debug_text_update()
|
||||
@@ -45,7 +45,7 @@ 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))
|
||||
$Panel/Info.text = $Panel/Info.text.replace(\"{ppublic}\",str(DiscordRPC.is_public_party)).replace(\"{instanced}\",str(DiscordRPC.instanced)).replace(\"{ssecret}\",DiscordRPC.spectate_secret).replace(\"{jsecret}\",DiscordRPC.join_secret).replace(\"{msecret}\",DiscordRPC.match_secret).replace(\"{mpartysize}\",str(DiscordRPC.max_party_size)).replace(\"{cpartysize}\",str(DiscordRPC.current_party_size)).replace(\"{partyid}\",DiscordRPC.party_id).replace(\"{id}\",str(DiscordRPC.app_id)).replace(\"{details}\",DiscordRPC.details).replace(\"{state}\",DiscordRPC.state).replace(\"{lkey}\",DiscordRPC.large_image).replace(\"{ltext}\",DiscordRPC.large_image_text).replace(\"{skey}\",DiscordRPC.small_image).replace(\"{stext}\",DiscordRPC.small_image_text).replace(\"{stimestamp}\",str(DiscordRPC.start_timestamp)).replace(\"{etimestamp}\",str(DiscordRPC.end_timestamp))
|
||||
|
||||
var user_request = {};
|
||||
|
||||
@@ -55,25 +55,25 @@ func _on_activity_join_request(user_requesting):
|
||||
|
||||
func _on_accept_join_request_pressed():
|
||||
if(!user_request.is_empty()):
|
||||
DiscordSDK.accept_join_request(user_request.id)
|
||||
DiscordRPC.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\")
|
||||
DiscordRPC.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))
|
||||
DiscordRPC.accept_invite(int(new_text))
|
||||
|
||||
func _on_print_current_user_on_console_pressed():
|
||||
print(DiscordSDK.get_current_user())
|
||||
print(DiscordRPC.get_current_user())
|
||||
|
||||
func _on_toggle_sdk_toggled(button_pressed):
|
||||
if(button_pressed):
|
||||
DiscordSDK.unclear()
|
||||
DiscordRPC.unclear()
|
||||
else:
|
||||
DiscordSDK.clear(false)
|
||||
DiscordRPC.clear(false)
|
||||
|
||||
func _on_print_friends_pressed():
|
||||
print(DiscordSDK.get_all_relationships())
|
||||
print(DiscordRPC.get_all_relationships())
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8abo6"]
|
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dnfq6kug4x6o2"
|
||||
path="res://.godot/imported/Checked.svg-152467b95b56fa0b9944b5cc25700916.ctex"
|
||||
path="res://.godot/imported/Checked.svg-80704e37f30c24e2ec3dfc0955f5f21c.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"]
|
||||
source_file="res://addons/discord-rpc-gd/nodes/assets/Checked.svg"
|
||||
dest_files=["res://.godot/imported/Checked.svg-80704e37f30c24e2ec3dfc0955f5f21c.ctex"]
|
||||
|
||||
[params]
|
||||
|
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 942 B |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://compmm3kviqqe"
|
||||
path="res://.godot/imported/Unchecked.svg-91cff67e13e7a1508fbc6a949f5f5f52.ctex"
|
||||
path="res://.godot/imported/Unchecked.svg-b526adfd78f7b1577fc3c10a8ea626ee.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"]
|
||||
source_file="res://addons/discord-rpc-gd/nodes/assets/Unchecked.svg"
|
||||
dest_files=["res://.godot/imported/Unchecked.svg-b526adfd78f7b1577fc3c10a8ea626ee.ctex"]
|
||||
|
||||
[params]
|
||||
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 290 B |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dtc6ckladq0td"
|
||||
path="res://.godot/imported/circle.svg-ca71b895eb1c5e7e6f2f2afe081d28dd.ctex"
|
||||
path="res://.godot/imported/circle.svg-d0b0579c9433c6250a5869daf4f70024.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"]
|
||||
source_file="res://addons/discord-rpc-gd/nodes/assets/circle.svg"
|
||||
dest_files=["res://.godot/imported/circle.svg-d0b0579c9433c6250a5869daf4f70024.ctex"]
|
||||
|
||||
[params]
|
||||
|
@@ -1,11 +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.
|
||||
## The DiscordRPC 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
|
||||
## @tutorial: https://github.com/vaporvee/discord-rpc-godot/wiki
|
||||
@tool
|
||||
extends Node
|
||||
|
||||
func _ready() -> void:
|
||||
const DebugNodeGroup: PackedScene = preload("res://addons/discord-sdk-gd/nodes/Debug.tscn")
|
||||
const DebugNodeGroup: PackedScene = preload("res://addons/discord-rpc-gd/nodes/Debug.tscn")
|
||||
add_child(DebugNodeGroup.instantiate())
|
@@ -1,13 +1,13 @@
|
||||
## 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.
|
||||
## You don't need to use it. If you remove it make sure to run [code]DiscordRPC.run_callbacks()[/code] in a [code]_process[/code] function.
|
||||
##
|
||||
## @tutorial: https://github.com/vaporvee/discord-sdk-godot/wiki
|
||||
## @tutorial: https://github.com/vaporvee/discord-rpc-godot/wiki
|
||||
extends Node
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
func _process(_delta) -> void:
|
||||
DiscordSDK.run_callbacks()
|
||||
DiscordRPC.run_callbacks()
|
7
project/addons/discord-rpc-gd/plugin.cfg
Normal file
@@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
|
||||
name="DiscordRPC"
|
||||
description="Discord RPC Plugin for GDScript in Godot"
|
||||
author="vaporvee"
|
||||
version="1.2.0"
|
||||
script="plugin.gd"
|
@@ -1,42 +1,42 @@
|
||||
@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()
|
||||
const DiscordRPCDebug = preload("res://addons/discord-rpc-gd/nodes/debug.gd")
|
||||
const DiscordRPCDebug_icon = preload("res://addons/discord-rpc-gd/Debug.svg")
|
||||
var loaded_DiscordRPCDebug = DiscordRPCDebug.new()
|
||||
var restart_window: ConfirmationDialog = preload("res://addons/discord-rpc-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)
|
||||
add_custom_type("DiscordRPCDebug","Node",DiscordRPCDebug,DiscordRPCDebug_icon)
|
||||
get_editor_interface().get_editor_settings().settings_changed.connect(_on_editor_settings_changed)
|
||||
|
||||
func _ready() -> void:
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
plugin_cfg.load(get_editor_interface().get_editor_paths().get_data_dir() + plugin_data_filename)
|
||||
if !get_editor_interface().get_editor_settings().has_setting("DiscordSDK/EditorPresence/enabled"):
|
||||
get_editor_interface().get_editor_settings().set_setting("DiscordSDK/EditorPresence/enabled",plugin_cfg.get_value("Discord","editor_presence",false))
|
||||
if !get_editor_interface().get_editor_settings().has_setting("DiscordRPC/EditorPresence/enabled"):
|
||||
get_editor_interface().get_editor_settings().set_setting("DiscordRPC/EditorPresence/enabled",plugin_cfg.get_value("Discord","editor_presence",false))
|
||||
|
||||
func _exit_tree():
|
||||
if get_editor_interface().get_editor_settings().has_setting("DiscordSDK/EditorPresence/enabled"):
|
||||
get_editor_interface().get_editor_settings().erase("DiscordSDK/EditorPresence/enabled")
|
||||
if get_editor_interface().get_editor_settings().has_setting("DiscordRPC/EditorPresence/enabled"):
|
||||
get_editor_interface().get_editor_settings().erase("DiscordRPC/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")
|
||||
if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore"):
|
||||
DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore")
|
||||
add_autoload_singleton("DiscordRPCLoader","res://addons/discord-rpc-gd/nodes/discord_autoload.gd")
|
||||
restart_window.connect("confirmed", save_no_restart)
|
||||
restart_window.connect("canceled", save_and_restart)
|
||||
get_editor_interface().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")
|
||||
get_editor_interface().get_editor_settings().erase("DiscordSDK/EditorPresence/enabled")
|
||||
push_warning("Please restart the editor to fully disable the DiscordSDK plugin")
|
||||
remove_autoload_singleton("DiscordRPCLoader")
|
||||
FileAccess.open("res://addons/discord-rpc-gd/bin/.gdignore",FileAccess.WRITE)
|
||||
remove_custom_type("DiscordRPCDebug")
|
||||
get_editor_interface().get_editor_settings().erase("DiscordRPC/EditorPresence/enabled")
|
||||
push_warning("Please restart the editor to fully disable the DiscordRPC plugin")
|
||||
|
||||
func save_and_restart() -> void:
|
||||
get_editor_interface().restart_editor(true)
|
||||
@@ -46,11 +46,11 @@ func save_no_restart() -> void:
|
||||
|
||||
var editor_presence: Node
|
||||
func _on_editor_settings_changed() -> void:
|
||||
plugin_cfg.set_value("Discord","editor_presence",get_editor_interface().get_editor_settings().get_setting("DiscordSDK/EditorPresence/enabled"))
|
||||
plugin_cfg.set_value("Discord","editor_presence",get_editor_interface().get_editor_settings().get_setting("DiscordRPC/EditorPresence/enabled"))
|
||||
plugin_cfg.save(get_editor_interface().get_editor_paths().get_data_dir() + plugin_data_filename)
|
||||
if ClassDB.class_exists("EditorPresence") && editor_presence == null:
|
||||
editor_presence = ClassDB.instantiate("EditorPresence")
|
||||
if get_editor_interface().get_editor_settings().has_setting("DiscordSDK/EditorPresence/enabled") && get_editor_interface().get_editor_settings().get_setting("DiscordSDK/EditorPresence/enabled"):
|
||||
if get_editor_interface().get_editor_settings().has_setting("DiscordRPC/EditorPresence/enabled") && get_editor_interface().get_editor_settings().get_setting("DiscordRPC/EditorPresence/enabled"):
|
||||
add_child(editor_presence)
|
||||
else:
|
||||
editor_presence.queue_free()
|
@@ -1,6 +1,6 @@
|
||||
[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"]
|
||||
[ext_resource type="Texture2D" uid="uid://csl0e2px0cwc1" path="res://addons/discord-rpc-gd/Logo_V2_No_Bg.png" id="1_0svbg"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1t7mm"]
|
||||
|
||||
@@ -82,7 +82,7 @@ size_flags_vertical = 8
|
||||
mouse_default_cursor_shape = 16
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "HOW TO USE"
|
||||
uri = "https://vaporvee.com/docs/discord-sdk-godot#quick-start"
|
||||
uri = "https://vaporvee.com/docs/discord-rpc-godot#quick-start"
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(128, 128)
|
@@ -1,7 +0,0 @@
|
||||
[plugin]
|
||||
|
||||
name="DiscordSDK"
|
||||
description="Discord Game SDK support for GDScript in Godot"
|
||||
author="vaporvee"
|
||||
version="1.2.0"
|
||||
script="plugin.gd"
|