Darktide Mod Manager #39
1 changed files with 7 additions and 2 deletions
|
@ -185,8 +185,13 @@ impl State {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_mod(&mut self, info: ModInfo) {
|
pub fn add_mod(&mut self, info: ModInfo) {
|
||||||
self.mods.push_back(info);
|
if let Some(pos) = self.mods.index_of(&info) {
|
||||||
self.selected_mod_index = Some(self.mods.len() - 1);
|
self.mods.set(pos, info);
|
||||||
|
self.selected_mod_index = Some(pos);
|
||||||
|
} else {
|
||||||
|
self.mods.push_back(info);
|
||||||
|
self.selected_mod_index = Some(self.mods.len() - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn can_move_mod_down(&self) -> bool {
|
pub fn can_move_mod_down(&self) -> bool {
|
||||||
|
|
Loading…
Add table
Reference in a new issue