forked from akanyan/STARTLINER
feat: amnet integration
This commit is contained in:
@ -2,16 +2,38 @@ use std::path::PathBuf;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use crate::pkg::PkgKey;
|
||||
|
||||
#[derive(Deserialize, Serialize, Clone)]
|
||||
pub enum Aime {
|
||||
BuiltIn,
|
||||
AMNet(PkgKey),
|
||||
Other(PkgKey),
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Clone)]
|
||||
pub struct AMNet {
|
||||
pub name: String,
|
||||
pub addr: String,
|
||||
pub physical: bool,
|
||||
}
|
||||
|
||||
impl Default for AMNet {
|
||||
fn default() -> Self {
|
||||
Self { name: Default::default(), addr: "http://+:6070".to_string(), physical: false }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Clone)]
|
||||
pub struct Segatools {
|
||||
pub target: PathBuf,
|
||||
pub hook: Option<PkgKey>,
|
||||
pub io: Option<PkgKey>,
|
||||
pub aime: Option<Aime>,
|
||||
pub amfs: PathBuf,
|
||||
pub option: PathBuf,
|
||||
pub appdata: PathBuf,
|
||||
pub enable_aime: bool,
|
||||
pub intel: bool,
|
||||
#[serde(default)]
|
||||
pub amnet: AMNet,
|
||||
}
|
||||
|
||||
impl Default for Segatools {
|
||||
@ -23,8 +45,9 @@ impl Default for Segatools {
|
||||
amfs: PathBuf::default(),
|
||||
option: PathBuf::default(),
|
||||
appdata: PathBuf::from("appdata"),
|
||||
enable_aime: false,
|
||||
intel: false
|
||||
aime: Some(Aime::BuiltIn),
|
||||
intel: false,
|
||||
amnet: AMNet::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user