Added this wad.rs thingy
It'll hopefully let me get into more rust AND doom stuff
This commit is contained in:
10
src/infos.rs
10
src/infos.rs
@@ -34,26 +34,26 @@ impl CommandManager {
|
||||
}
|
||||
pub fn remove_iwad(&mut self) {
|
||||
self.iwad = None;
|
||||
self.generate_command_str();
|
||||
let _ = self.generate_command_str();
|
||||
}
|
||||
pub fn add_iwad(&mut self, iwad: &WadInfo) {
|
||||
self.iwad = Some(iwad.path.clone());
|
||||
self.generate_command_str();
|
||||
let _ = self.generate_command_str();
|
||||
}
|
||||
pub fn add_pwads(&mut self, pwads: &Vec<&WadInfo>) {
|
||||
self.pwads = Vec::new();
|
||||
for pwad in pwads {
|
||||
self.pwads.push(pwad.path.clone());
|
||||
self.generate_command_str();
|
||||
}
|
||||
let _ = self.generate_command_str();
|
||||
}
|
||||
pub fn add_launcher(&mut self, launcher: &LauncherInfo) {
|
||||
self.launcher = Some(launcher.path.clone());
|
||||
self.generate_command_str();
|
||||
let _ = self.generate_command_str();
|
||||
}
|
||||
pub fn remove_launcher(&mut self) {
|
||||
self.launcher = None;
|
||||
self.generate_command_str();
|
||||
let _ = self.generate_command_str();
|
||||
}
|
||||
pub fn generate_command(&self) -> Result<(String, Vec<String>), CommandErrors> {
|
||||
let launcher = if let Some(launcher) = &self.launcher {
|
||||
|
||||
Reference in New Issue
Block a user