renamed source to path in mod config

This commit is contained in:
2026-03-03 15:58:45 +01:00
parent a1256064fa
commit 50f16cd7a0

View File

@@ -44,7 +44,7 @@ impl RootConfig {
#[inline] #[inline]
pub fn get_mod_location(&self, mod_config: &ModConfig) -> PathBuf { pub fn get_mod_location(&self, mod_config: &ModConfig) -> PathBuf {
self.mod_location.join(mod_config.source.clone()) self.mod_location.join(mod_config.path.clone())
} }
pub fn get_mod_by_id(&self, id: &str) -> Option<ModConfig> { pub fn get_mod_by_id(&self, id: &str) -> Option<ModConfig> {
@@ -83,14 +83,14 @@ pub struct ModConfig {
pub id: String, pub id: String,
/// Relative to the mod_location from root config /// Relative to the mod_location from root config
pub source: PathBuf, pub path: PathBuf,
} }
impl ModConfig { impl ModConfig {
pub fn new(id: &str, source: impl AsRef<Path>) -> Self { pub fn new(id: &str, source: impl AsRef<Path>) -> Self {
Self { Self {
id: id.to_owned(), id: id.to_owned(),
source: source.as_ref().to_owned(), path: source.as_ref().to_owned(),
} }
} }
} }