Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for log colours #26

Merged
merged 4 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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"
GeckoEidechse marked this conversation as resolved.
Show resolved Hide resolved
discord-sdk = "0.3.2"
tokio = "1.26.0"
parking_lot = "0.12.1"
Expand Down
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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: 114,
green: 137,
blue: 218,
},
);

fn new(_: bool) -> Self {
Expand Down
2 changes: 2 additions & 0 deletions src/presence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub fn run_presence_updates(sqvm: NonNull<HSquirrelVM>) {
};
}

// "Localize_001" is a thing

GeckoEidechse marked this conversation as resolved.
Show resolved Hide resolved
/// 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> {
Expand Down