From a0b2cecdb6f888484bcdcdb6fe2c74160057de9e Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:57:49 -0400 Subject: [PATCH 1/4] colors! --- Cargo.lock | 6 ++---- Cargo.toml | 3 ++- src/lib.rs | 9 +++++++-- src/presence.rs | 2 ++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0e25cc..7fd945f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -396,8 +396,7 @@ dependencies = [ [[package]] name = "rrplug" version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4beccc264275850d6526bc531934bbcb254b2350bb4a5723964ad6d95b4abd" +source = "git+https://github.com/R2NorthstarTools/rrplug.git?rev=e183295ec923a44427cdfac3d5c232853f48063d#e183295ec923a44427cdfac3d5c232853f48063d" dependencies = [ "bitflags", "log", @@ -411,8 +410,7 @@ dependencies = [ [[package]] name = "rrplug_proc" version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb023a15963bb3d031369610b680dc23c1bac985a3a352cacdd4cb9df9e038d0" +source = "git+https://github.com/R2NorthstarTools/rrplug.git?rev=e183295ec923a44427cdfac3d5c232853f48063d#e183295ec923a44427cdfac3d5c232853f48063d" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index b15103a..4c086d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rrplug = "4.0.0" +# rrplug = "4.0.0" +rrplug = { git = "https://github.com/R2NorthstarTools/rrplug.git", rev = "e183295ec923a44427cdfac3d5c232853f48063d" } discord-sdk = "0.3.2" tokio = "1.26.0" parking_lot = "0.12.1" diff --git a/src/lib.rs b/src/lib.rs index b0821e2..6b6241f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,8 +2,8 @@ use discord_sdk::activity::Secrets; use parking_lot::Mutex; -use rrplug::interfaces::manager::register_interface; use rrplug::prelude::*; +use rrplug::{bindings::plugin_abi::PluginColor, interfaces::manager::register_interface}; use tokio::runtime::Runtime; use crate::{ @@ -43,11 +43,16 @@ pub struct DiscordRpcPlugin { #[deny(non_snake_case)] impl Plugin for DiscordRpcPlugin { - const PLUGIN_INFO: PluginInfo = PluginInfo::new( + const PLUGIN_INFO: PluginInfo = PluginInfo::new_with_color( c"DISCORDRPC", c"DSCRD-RPC", c"DISCORDRPC", PluginContext::CLIENT, + PluginColor { + red: 0, + green: 0, + blue: 255, + }, ); fn new(_: bool) -> Self { diff --git a/src/presence.rs b/src/presence.rs index cea7f85..ccd4c91 100644 --- a/src/presence.rs +++ b/src/presence.rs @@ -35,6 +35,8 @@ pub fn run_presence_updates(sqvm: NonNull) { }; } +// "Localize_001" is a thing + /// function to pull presence from the sqvm since in runframe it's impossibke to get the output of a function back #[rrplug::sqfunction(VM = "UI | CLIENT", ExportName = "FetchPresence")] pub fn fetch_presence() -> Result<(), String> { From 8c4a530c48e390283e9be5d3615be025b83165f6 Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:05:19 -0400 Subject: [PATCH 2/4] purple color --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6b6241f..664cfe6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,9 +49,9 @@ impl Plugin for DiscordRpcPlugin { c"DISCORDRPC", PluginContext::CLIENT, PluginColor { - red: 0, - green: 0, - blue: 255, + red: 114, + green: 137, + blue: 218, }, ); From 35ba69eddc5c4ed9320248643e774c09d97f511b Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Sun, 13 Oct 2024 20:32:59 -0400 Subject: [PATCH 3/4] use new rrplug release --- Cargo.lock | 10 ++++++---- Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7fd945f..095cf8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -395,8 +395,9 @@ dependencies = [ [[package]] name = "rrplug" -version = "4.0.0" -source = "git+https://github.com/R2NorthstarTools/rrplug.git?rev=e183295ec923a44427cdfac3d5c232853f48063d#e183295ec923a44427cdfac3d5c232853f48063d" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a95b84e776830a5cb6074d943fee2c917882b67cbac6036f2e110126fb7d2689" dependencies = [ "bitflags", "log", @@ -409,8 +410,9 @@ dependencies = [ [[package]] name = "rrplug_proc" -version = "4.0.0" -source = "git+https://github.com/R2NorthstarTools/rrplug.git?rev=e183295ec923a44427cdfac3d5c232853f48063d#e183295ec923a44427cdfac3d5c232853f48063d" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b6d5c202326f080f0e89ff097656db412fc5aebecb09287a9283199b471f6b" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 4c086d2..881a425 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] # rrplug = "4.0.0" -rrplug = { git = "https://github.com/R2NorthstarTools/rrplug.git", rev = "e183295ec923a44427cdfac3d5c232853f48063d" } +rrplug = "=4.1.0" discord-sdk = "0.3.2" tokio = "1.26.0" parking_lot = "0.12.1" From 2278eebeef533eeffe542ae96c15d72318eb3e1e Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:39:39 -0400 Subject: [PATCH 4/4] remove comment out rrplug in cargo toml --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 881a425..3594b7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -# rrplug = "4.0.0" rrplug = "=4.1.0" discord-sdk = "0.3.2" tokio = "1.26.0"