Merge branch 'dev' into main
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,17 +1,25 @@
|
||||
extends Node
|
||||
|
||||
func _ready():
|
||||
Discord_Activity.app_id = 1099618430065324082 # Application ID
|
||||
print("Discord working: " + str(Discord_Activity.get_is_discord_working())) # A boolean if everything worked
|
||||
Discord_Activity.details = "A demo activity by vaporvee#1231"
|
||||
Discord_Activity.state = "Checkpoint 23/23"
|
||||
|
||||
Discord_Activity.large_image = "game" # Image key from "Art Assets"
|
||||
Discord_Activity.large_image_text = "Try it now!"
|
||||
Discord_Activity.small_image = "boss" # Image key from "Art Assets"
|
||||
Discord_Activity.small_image_text = "Fighting the end boss! D:"
|
||||
|
||||
Discord_Activity.start_timestamp = int(Time.get_unix_time_from_system()) # "02:41 elapsed"
|
||||
# Discord_Activity.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time
|
||||
# 1. Put the addons/ folder in your Godot project
|
||||
# 2. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". (if it doesn't show up restart your project and try again)
|
||||
# 3. Restart your project
|
||||
# 4. Create an Application under https://discord.com/developers/applications and get the Application ID
|
||||
# 5. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys
|
||||
|
||||
Discord_Activity.refresh() # Always refresh after changing the values!
|
||||
#SELECT THE TEXT WITH YOUR MOUSE AND CTR + K TO UNCOMMENT THE FOLLOWING
|
||||
|
||||
#func _ready():
|
||||
# Discord_SDK.app_id = 1099618430065324082 # Application ID
|
||||
# print("Discord working: " + str(Discord_SDK.get_is_discord_working())) # A boolean if everything worked
|
||||
# Discord_SDK.details = "A demo activity by vaporvee#1231"
|
||||
# Discord_SDK.state = "Checkpoint 23/23"
|
||||
#
|
||||
# Discord_SDK.large_image = "game" # Image key from "Art Assets"
|
||||
# Discord_SDK.large_image_text = "Try it now!"
|
||||
# Discord_SDK.small_image = "boss" # Image key from "Art Assets"
|
||||
# Discord_SDK.small_image_text = "Fighting the end boss! D:"
|
||||
#
|
||||
# Discord_SDK.start_timestamp = int(Time.get_unix_time_from_system()) # "02:41 elapsed"
|
||||
# Discord_SDK.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time
|
||||
#
|
||||
# Discord_SDK.refresh() # Always refresh after changing the values!
|
||||
|
@@ -5,9 +5,9 @@ const ExportPlugin = preload("res://addons/discord-sdk-gd/export.gd")
|
||||
var loaded_exportplugin = ExportPlugin.new()
|
||||
|
||||
func _enter_tree():
|
||||
add_autoload_singleton("discord_coreupdater", "res://addons/discord-sdk-gd/discord_coreupdater.gd")
|
||||
add_autoload_singleton("updater_discordsdk", "res://addons/discord-sdk-gd/sdk_utility.gd")
|
||||
add_export_plugin(loaded_exportplugin)
|
||||
|
||||
func disable_plugin():
|
||||
remove_autoload_singleton("discord_coreupdater")
|
||||
remove_autoload_singleton("updater_discordsdk")
|
||||
remove_export_plugin(loaded_exportplugin)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
extends Node
|
||||
|
||||
func _process(delta):
|
||||
Discord_Activity.coreupdate()
|
||||
Discord_SDK.coreupdate()
|
@@ -8,7 +8,7 @@ custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../demo/Discord_Activity.exe"
|
||||
export_path="../../demo/Discord_SDK.exe"
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
encrypt_pck=false
|
||||
|
@@ -1,18 +1,20 @@
|
||||
extends Node
|
||||
|
||||
func _ready():
|
||||
Discord_Activity.app_id = 1099618430065324082
|
||||
Discord_Activity.details = "A demo activity by vaporvee#1231"
|
||||
Discord_Activity.state = "Checkpoint 23/23"
|
||||
|
||||
Discord_Activity.large_image = "game"
|
||||
Discord_Activity.large_image_text = "Try it now!"
|
||||
Discord_Activity.small_image = "boss"
|
||||
Discord_Activity.small_image_text = "Fighting the end boss! D:"
|
||||
|
||||
Discord_Activity.start_timestamp = int(Time.get_unix_time_from_system())
|
||||
# Discord_Activity.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time
|
||||
|
||||
Discord_Activity.refresh()
|
||||
|
||||
$Info.text = $Info.text.replace("{isdiscordworking}",str(Discord_Activity.get_is_discord_working())).replace("{id}",str(Discord_Activity.app_id)).replace("{details}",Discord_Activity.details).replace("{state}",Discord_Activity.state).replace("{lkey}",Discord_Activity.large_image).replace("{ltext}",Discord_Activity.large_image_text).replace("{skey}",Discord_Activity.small_image).replace("{stext}",Discord_Activity.small_image_text).replace("{stimestamp}",str(Discord_Activity.start_timestamp)).replace("{etimestamp}",str(Discord_Activity.end_timestamp))
|
||||
Discord_SDK.app_id = 1099618430065324082
|
||||
Discord_SDK.debug()
|
||||
# Discord_SDK.app_id = 1099618430065324082
|
||||
# Discord_SDK.details = "A demo activity by vaporvee#1231"
|
||||
# Discord_SDK.state = "Checkpoint 23/23"
|
||||
#
|
||||
# Discord_SDK.large_image = "game"
|
||||
# Discord_SDK.large_image_text = "Try it now!"
|
||||
# Discord_SDK.small_image = "boss"
|
||||
# Discord_SDK.small_image_text = "Fighting the end boss! D:"
|
||||
#
|
||||
# #Discord_SDK.start_timestamp = int(Time.get_unix_time_from_system())
|
||||
# Discord_SDK.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time
|
||||
#
|
||||
# Discord_SDK.refresh()
|
||||
#
|
||||
# $Info.text = $Info.text.replace("{discordinfo}",str(Discord_SDK.get_is_discord_working())).replace("{id}",str(Discord_SDK.app_id)).replace("{details}",Discord_SDK.details).replace("{state}",Discord_SDK.state).replace("{lkey}",Discord_SDK.large_image).replace("{ltext}",Discord_SDK.large_image_text).replace("{skey}",Discord_SDK.small_image).replace("{stext}",Discord_SDK.small_image_text).replace("{stimestamp}",str(Discord_SDK.start_timestamp)).replace("{etimestamp}",str(Discord_SDK.end_timestamp))
|
||||
|
@@ -46,7 +46,7 @@ offset_left = 7.0
|
||||
offset_top = 6.0
|
||||
offset_right = 514.0
|
||||
offset_bottom = 722.0
|
||||
text = "Is Discord working: {isdiscordworking}
|
||||
text = "Discord working: {discordinfo}
|
||||
|
||||
Application ID : {id}
|
||||
Details: {details}
|
||||
|
@@ -20,7 +20,7 @@ config/icon="res://assets/Logo_V2.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
discord_coreupdater="*res://addons/discord-sdk-gd/discord_coreupdater.gd"
|
||||
updater_discordsdk="*res://addons/discord-sdk-gd/sdk_utility.gd"
|
||||
|
||||
[dotnet]
|
||||
|
||||
@@ -30,6 +30,10 @@ project/assembly_name="GDExtension Test Project"
|
||||
|
||||
enabled=PackedStringArray("res://addons/discord-sdk-gd/plugin.cfg")
|
||||
|
||||
[filesystem]
|
||||
|
||||
import/blender/enabled=false
|
||||
|
||||
[native_extensions]
|
||||
|
||||
paths=["res://example.gdextension"]
|
||||
|
Reference in New Issue
Block a user