mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-27 08:53:23 -04:00
reset rando context if current seed is deleted
This commit is contained in:
@@ -689,7 +689,11 @@ void delete_seed_callback(Pane& pane) {
|
||||
return !playerIsOnTitleScreen() || hash.ends_with(')');
|
||||
}
|
||||
})
|
||||
.on_pressed([entry, &pane] {
|
||||
.on_pressed([entry, &pane, hash] {
|
||||
// If the currently selected seed is deleted, reset the context
|
||||
if (randomizer_GetContext().mHash == hash) {
|
||||
randomizer_GetContext() = RandomizerContext{};
|
||||
}
|
||||
std::filesystem::remove_all(entry);
|
||||
delete_seed_callback(pane);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user