fix missing GameType in root_config game

This commit is contained in:
2026-03-20 13:10:07 +01:00
parent fcc65f68bb
commit afc3f68f36
3 changed files with 49 additions and 7 deletions

View File

@@ -19,10 +19,10 @@ pub struct Game {
}
impl Game {
pub fn new(path: impl AsRef<Path>) -> Self {
pub fn new(path: impl AsRef<Path>, game_type: GameType) -> Self {
Self {
path: path.as_ref().to_owned(),
kind: GameType::default(),
kind: game_type,
}
}
@@ -45,4 +45,8 @@ impl Game {
pub fn install_location(&self) -> &Path {
&self.path
}
pub fn game_type(&self) -> GameType {
self.kind.clone()
}
}