add nexus api key to root config
This commit is contained in:
@@ -5,6 +5,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use log::debug;
|
use log::debug;
|
||||||
|
use quick_xml::se;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
use crate::types::{ConfigReadWriteError, ModConfig, game::Game, modded_instance::ModdedInstance};
|
use crate::types::{ConfigReadWriteError, ModConfig, game::Game, modded_instance::ModdedInstance};
|
||||||
@@ -18,6 +19,8 @@ pub struct RootConfig {
|
|||||||
/// Where all mods are stored
|
/// Where all mods are stored
|
||||||
mod_location: PathBuf,
|
mod_location: PathBuf,
|
||||||
|
|
||||||
|
nexus_api_key: Option<String>,
|
||||||
|
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
instances: HashMap<String, InstancePointer>,
|
instances: HashMap<String, InstancePointer>,
|
||||||
|
|
||||||
@@ -72,6 +75,10 @@ impl RootConfig {
|
|||||||
pub fn mod_location(&self) -> &Path {
|
pub fn mod_location(&self) -> &Path {
|
||||||
&self.mod_location
|
&self.mod_location
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn nexus_api_key(&self) -> Option<&str> {
|
||||||
|
self.nexus_api_key.as_deref()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
|
|||||||
Reference in New Issue
Block a user