Skip to content

Commit

Permalink
Merge pull request #7 from cake4everyone/discord-presence
Browse files Browse the repository at this point in the history
Adding Discord Presence
  • Loading branch information
Kesuaheli authored Sep 15, 2024
2 parents 1239106 + 7fc36cb commit dd43ec6
Show file tree
Hide file tree
Showing 38 changed files with 917 additions and 34 deletions.
10 changes: 10 additions & 0 deletions addons/discord-rpc-gd/Debug.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions addons/discord-rpc-gd/Debug.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://ufh1hha1ehui"
path="res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/discord-rpc-gd/Debug.svg"
dest_files=["res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
Binary file added addons/discord-rpc-gd/Logo_V2_No_Bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions addons/discord-rpc-gd/Logo_V2_No_Bg.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://csl0e2px0cwc1"
path="res://.godot/imported/Logo_V2_No_Bg.png-ed667fb599fe1e17ebcfc361ff7c9c93.ctex"
metadata={
"vram_texture": false
}

[deps]

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]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
7 changes: 7 additions & 0 deletions addons/discord-rpc-gd/READ_ME_PLEASE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MINIMUM GODOT VERSION: 4.2

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-rpc-gd/bin/.gdignore
29 changes: 29 additions & 0 deletions addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[configuration]

entry_symbol = "discordrpcgd_library_init"
compatibility_minimum = 4.1

[libraries]

macos.debug = "macos/libdiscord_game_sdk_binding_debug.dylib"
macos.release = "macos/libdiscord_game_sdk_binding.dylib"
windows.debug.x86_64 = "windows/discord_game_sdk_binding_debug.dll"
windows.release.x86_64 = "windows/discord_game_sdk_binding.dll"
linux.debug.x86_64 = "linux/libdiscord_game_sdk_binding_debug.so"
linux.release.x86_64 = "linux/libdiscord_game_sdk_binding.so"
linux.debug.arm64 = "linux/libdiscord_game_sdk_binding_debug.so"
linux.release.arm64 = "linux/libdiscord_game_sdk_binding.so"
linux.debug.rv64 = "linux/libdiscord_game_sdk_binding_debug.so"
linux.release.rv64 = "linux/libdiscord_game_sdk_binding.so"

[dependencies]

macos = { "macos/libdiscord_game_sdk.dylib": "" }
windows.debug.x86_64 = { "windows/discord_game_sdk.dll": "" }
windows.release.x86_64 = { "windows/discord_game_sdk.dll": "" }
linux.debug.x86_64 = { "linux/libdiscord_game_sdk.so": "" }
linux.release.x86_64 = { "linux/libdiscord_game_sdk.so": "" }
linux.debug.arm64 = { "linux/libdiscord_game_sdk.so": "" }
linux.release.arm64 = { "linux/libdiscord_game_sdk.so": "" }
linux.debug.rv64 = { "linux/libdiscord_game_sdk.so": "" }
linux.release.rv64 = { "linux/libdiscord_game_sdk.so": "" }
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.
38 changes: 38 additions & 0 deletions addons/discord-rpc-gd/example.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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 "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]
##
## This is your [code]_ready()[/code] function wich could be anywhere
## [codeblock]
## func _ready():
## # Application ID
## DiscordRPC.app_id = 1099618430065324082
## # this is boolean if everything worked
## print("Discord working: " + str(DiscordRPC.get_is_discord_working()))
## # Set the first custom text row of the activity here
## DiscordRPC.details = "A demo activity by vaporvee#1231"
## # Set the second custom text row of the activity here
## DiscordRPC.state = "Checkpoint 23/23"
## # Image key for small image from "Art Assets" from the Discord Developer website
## DiscordRPC.large_image = "game"
## # Tooltip text for the large image
## DiscordRPC.large_image_text = "Try it now!"
## # Image key for large image from "Art Assets" from the Discord Developer website
## DiscordRPC.small_image = "boss"
## # Tooltip text for the small image
## DiscordRPC.small_image_text = "Fighting the end boss! D:"
## # "02:41 elapsed" timestamp for the activity
## DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system())
## # "59:59 remaining" timestamp for the activity
## DiscordRPC.end_timestamp = int(Time.get_unix_time_from_system()) + 3600
## # Always refresh after changing the values!
## DiscordRPC.refresh()
## [/codeblock]
##
## @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
Binary file added addons/discord-rpc-gd/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions addons/discord-rpc-gd/logo.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://csl0e2px0cwc1"
path="res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/discord-rpc-gd/logo.png"
dest_files=["res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Loading

0 comments on commit dd43ec6

Please sign in to comment.