Forgot to add fast monsters
This commit is contained in:
154
src/main.rs
154
src/main.rs
@@ -134,6 +134,9 @@ impl RustDoomLauncher {
|
|||||||
if self.respawning_monsters {
|
if self.respawning_monsters {
|
||||||
command.push("-respawn");
|
command.push("-respawn");
|
||||||
}
|
}
|
||||||
|
if self.fast_monsters {
|
||||||
|
command.push("-fast");
|
||||||
|
}
|
||||||
Ok((launcher.path.to_str().unwrap(), command))
|
Ok((launcher.path.to_str().unwrap(), command))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +197,6 @@ impl eframe::App for RustDoomLauncher {
|
|||||||
self.config_file_loaded = true;
|
self.config_file_loaded = true;
|
||||||
}
|
}
|
||||||
egui::containers::panel::CentralPanel::default().show(ctx, |ui| {
|
egui::containers::panel::CentralPanel::default().show(ctx, |ui| {
|
||||||
|
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.heading("RustDoomLauncher");
|
ui.heading("RustDoomLauncher");
|
||||||
let button = match self.launcher_and_iwad() {
|
let button = match self.launcher_and_iwad() {
|
||||||
@@ -356,83 +358,83 @@ impl eframe::App for RustDoomLauncher {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
egui::Window::new("Add WAD or Launcher")
|
egui::Window::new("Add WAD or Launcher")
|
||||||
.open(&mut self.add_stuff_window_displayed)
|
.open(&mut self.add_stuff_window_displayed)
|
||||||
.show(ctx, |ui| {
|
.show(ctx, |ui| {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
let name_label = ui.label("Name");
|
let name_label = ui.label("Name");
|
||||||
ui.text_edit_singleline(&mut self.name)
|
ui.text_edit_singleline(&mut self.name)
|
||||||
.labelled_by(name_label.id);
|
.labelled_by(name_label.id);
|
||||||
});
|
});
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.label("Path");
|
ui.label("Path");
|
||||||
ui.label(
|
ui.label(
|
||||||
self.selected_file_path
|
self.selected_file_path
|
||||||
.clone()
|
.clone()
|
||||||
.into_os_string()
|
.into_os_string()
|
||||||
.into_string()
|
.into_string()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
);
|
||||||
if ui.button("Find").clicked() {
|
if ui.button("Find").clicked() {
|
||||||
if let Some(path) = rfd::FileDialog::new().pick_file() {
|
if let Some(path) = rfd::FileDialog::new().pick_file() {
|
||||||
self.selected_file_path = path;
|
self.selected_file_path = path;
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
ui.horizontal(|ui| {
|
|
||||||
ui.label("What sort of file is it?");
|
|
||||||
if ui
|
|
||||||
.add(egui::SelectableLabel::new(
|
|
||||||
self.selected_file_type == FileType::Pwad,
|
|
||||||
"PWAD",
|
|
||||||
))
|
|
||||||
.clicked()
|
|
||||||
{
|
|
||||||
self.selected_file_type = FileType::Pwad
|
|
||||||
}
|
|
||||||
if ui
|
|
||||||
.add(egui::SelectableLabel::new(
|
|
||||||
self.selected_file_type == FileType::Iwad,
|
|
||||||
"IWAD",
|
|
||||||
))
|
|
||||||
.clicked()
|
|
||||||
{
|
|
||||||
self.selected_file_type = FileType::Iwad
|
|
||||||
}
|
|
||||||
if ui
|
|
||||||
.add(egui::SelectableLabel::new(
|
|
||||||
self.selected_file_type == FileType::Launcher,
|
|
||||||
"Launcher",
|
|
||||||
))
|
|
||||||
.clicked()
|
|
||||||
{
|
|
||||||
self.selected_file_type = FileType::Launcher
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if ui.button("Add!").clicked() {
|
|
||||||
if self.name.is_empty() || self.selected_file_path.as_os_str().is_empty() {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
match self.selected_file_type {
|
|
||||||
FileType::Iwad => {
|
|
||||||
self.all_iwads.push(WadInfo {
|
|
||||||
name: self.name.clone(),
|
|
||||||
path: self.selected_file_path.clone(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
FileType::Pwad => {
|
|
||||||
self.all_pwads.push(WadInfo {
|
|
||||||
name: self.name.clone(),
|
|
||||||
path: self.selected_file_path.clone(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
FileType::Launcher => {
|
|
||||||
self.all_launchers.push(LauncherInfo {
|
|
||||||
name: self.name.clone(),
|
|
||||||
path: self.selected_file_path.clone(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
ui.horizontal(|ui| {
|
||||||
|
ui.label("What sort of file is it?");
|
||||||
|
if ui
|
||||||
|
.add(egui::SelectableLabel::new(
|
||||||
|
self.selected_file_type == FileType::Pwad,
|
||||||
|
"PWAD",
|
||||||
|
))
|
||||||
|
.clicked()
|
||||||
|
{
|
||||||
|
self.selected_file_type = FileType::Pwad
|
||||||
|
}
|
||||||
|
if ui
|
||||||
|
.add(egui::SelectableLabel::new(
|
||||||
|
self.selected_file_type == FileType::Iwad,
|
||||||
|
"IWAD",
|
||||||
|
))
|
||||||
|
.clicked()
|
||||||
|
{
|
||||||
|
self.selected_file_type = FileType::Iwad
|
||||||
|
}
|
||||||
|
if ui
|
||||||
|
.add(egui::SelectableLabel::new(
|
||||||
|
self.selected_file_type == FileType::Launcher,
|
||||||
|
"Launcher",
|
||||||
|
))
|
||||||
|
.clicked()
|
||||||
|
{
|
||||||
|
self.selected_file_type = FileType::Launcher
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if ui.button("Add!").clicked() {
|
||||||
|
if self.name.is_empty() || self.selected_file_path.as_os_str().is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
match self.selected_file_type {
|
||||||
|
FileType::Iwad => {
|
||||||
|
self.all_iwads.push(WadInfo {
|
||||||
|
name: self.name.clone(),
|
||||||
|
path: self.selected_file_path.clone(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
FileType::Pwad => {
|
||||||
|
self.all_pwads.push(WadInfo {
|
||||||
|
name: self.name.clone(),
|
||||||
|
path: self.selected_file_path.clone(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
FileType::Launcher => {
|
||||||
|
self.all_launchers.push(LauncherInfo {
|
||||||
|
name: self.name.clone(),
|
||||||
|
path: self.selected_file_path.clone(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user