add nexus api key to root config

This commit is contained in:
2026-03-08 01:37:51 +01:00
parent a78e517163
commit 9d9ee1d229

View File

@@ -5,6 +5,7 @@ use std::{
};
use log::debug;
use quick_xml::se;
use serde::Deserialize;
use crate::types::{ConfigReadWriteError, ModConfig, game::Game, modded_instance::ModdedInstance};
@@ -18,6 +19,8 @@ pub struct RootConfig {
/// Where all mods are stored
mod_location: PathBuf,
nexus_api_key: Option<String>,
#[serde(default)]
instances: HashMap<String, InstancePointer>,
@@ -72,6 +75,10 @@ impl RootConfig {
pub fn mod_location(&self) -> &Path {
&self.mod_location
}
pub fn nexus_api_key(&self) -> Option<&str> {
self.nexus_api_key.as_deref()
}
}
#[derive(Debug, Clone, Deserialize)]