From 4df3c3ad192bb6aa1f1fa60cc4d212851fed1814 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:35:32 +0100 Subject: [PATCH] refactor: Rename consts to specifically specify Titanfall2 (#10) Renames `TITANFALL_STEAM_ID` to `TITANFALL2_STEAM_ID` `TITANFALL_ORIGIN_IDS` to `TITANFALL2_ORIGIN_IDS` --- src/core/utils.rs | 4 ++-- src/lib.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/utils.rs b/src/core/utils.rs index 88a9c18..c02cd3e 100644 --- a/src/core/utils.rs +++ b/src/core/utils.rs @@ -276,7 +276,7 @@ pub(crate) mod steam { use std::path::PathBuf; use steamlocate::SteamDir; - use crate::TITANFALL_STEAM_ID; + use crate::TITANFALL2_STEAM_ID; /// Returns the path to the Steam installation if it exists #[must_use] @@ -297,7 +297,7 @@ pub(crate) mod steam { #[must_use] pub fn titanfall() -> Option { let mut steamdir = SteamDir::locate()?; - Some(steamdir.app(&TITANFALL_STEAM_ID)?.path.clone()) + Some(steamdir.app(&TITANFALL2_STEAM_ID)?.path.clone()) } } diff --git a/src/lib.rs b/src/lib.rs index ed2927c..15db8d5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,8 +25,8 @@ pub const CORE_MODS: [&str; 3] = [ "northstar.client", ]; -pub const TITANFALL_STEAM_ID: u32 = 1237970; -pub const TITANFALL_ORIGIN_IDS: [&str; 2] = ["Origin.OFR.50.0001452", "Origin.OFR.50.0001456"]; +pub const TITANFALL2_STEAM_ID: u32 = 1237970; +pub const TITANFALL2_ORIGIN_IDS: [&str; 2] = ["Origin.OFR.50.0001452", "Origin.OFR.50.0001456"]; // Important functions and structs pub mod prelude { @@ -44,5 +44,5 @@ pub mod prelude { pub use crate::core::{steam_dir, steam_libraries, titanfall}; pub use crate::error::ThermiteError; pub use crate::CORE_MODS; - pub use crate::TITANFALL_STEAM_ID; + pub use crate::TITANFALL2_STEAM_ID; }