diff --git a/README.md b/README.md index c685ab1..a8d39ec 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,10 @@ git submodule update --init # Addon Usage :rocket: 1. [Download the addon](https://github.com/vaporvee/discord-sdk-godot/releases/latest/download/ADDON-Discord-SDK-Godot.zip/) 2. Put the `discord-sdk-gd/` folder in a `addons/` folder in your Godot project -3. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". (if it doesn't show up reopen the 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 +3. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". (if it doesn't show up restart your project and try again) +4. Restart your project +5. Create an Application under https://discord.com/developers/applications and get the Application ID +6. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys ```gdscript extends Node @@ -26,7 +27,7 @@ func _ready(): 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 = 2492978400 # "15:41 left" (but currently 31. 12. 2048 in unix time) + # Discord_Activity.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time Discord_Activity.refresh() # Always refresh after changing the values! diff --git a/project/addons/discord-sdk-gd/export.gd b/project/addons/discord-sdk-gd/export.gd index 1bb5f82..5ef7180 100644 --- a/project/addons/discord-sdk-gd/export.gd +++ b/project/addons/discord-sdk-gd/export.gd @@ -2,9 +2,9 @@ extends EditorExportPlugin func _export_file(path, type, features): - if path[2] == "windows": + if features[2] == "windows": add_shared_object("res://addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll",[],"/") - elif path[2] == "linux": + elif features[2] == "linux": add_shared_object("res://addons/discord-sdk-gd/bin/linux/discord_game_sdk.so",[],"/") - elif path[2] == "macos": + elif features[2] == "macos": add_shared_object("res://addons/discord-sdk-gd/bin/macos/discord_game_sdk.dylib",[],"/") diff --git a/project/addons/discord-sdk-gd/plugin.gd b/project/addons/discord-sdk-gd/plugin.gd index 077b619..c9fbd5f 100644 --- a/project/addons/discord-sdk-gd/plugin.gd +++ b/project/addons/discord-sdk-gd/plugin.gd @@ -8,8 +8,6 @@ func _enter_tree(): add_autoload_singleton("discord_coreupdater", "res://addons/discord-sdk-gd/discord_coreupdater.gd") add_export_plugin(loaded_exportplugin) - - func disable_plugin(): remove_autoload_singleton("discord_coreupdater") remove_export_plugin(loaded_exportplugin)