From 9d9ee1d2299af046f4cbb66f87c65511af30e45f Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Sun, 8 Mar 2026 01:37:51 +0100 Subject: [PATCH] add nexus api key to root config --- src/types/root_config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/types/root_config.rs b/src/types/root_config.rs index dc532f5..843649f 100644 --- a/src/types/root_config.rs +++ b/src/types/root_config.rs @@ -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, + #[serde(default)] instances: HashMap, @@ -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)]