Skip to content

Commit

Permalink
refactor: Rename consts to specifically specify Titanfall2 (#10)
Browse files Browse the repository at this point in the history
Renames
`TITANFALL_STEAM_ID` to `TITANFALL2_STEAM_ID`
`TITANFALL_ORIGIN_IDS` to `TITANFALL2_ORIGIN_IDS`
  • Loading branch information
GeckoEidechse authored Feb 1, 2024
1 parent bf17abe commit 4df3c3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -297,7 +297,7 @@ pub(crate) mod steam {
#[must_use]
pub fn titanfall() -> Option<PathBuf> {
let mut steamdir = SteamDir::locate()?;
Some(steamdir.app(&TITANFALL_STEAM_ID)?.path.clone())
Some(steamdir.app(&TITANFALL2_STEAM_ID)?.path.clone())
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}

0 comments on commit 4df3c3a

Please sign in to comment.