Make identically named options selectable, fix crash after deleting options.

This commit is contained in:
Ottermandias 2022-09-08 16:39:55 +02:00
parent f15c20a999
commit e9b12da97e
3 changed files with 20 additions and 5 deletions

View file

@ -70,7 +70,7 @@ public class ModSettings
var config = Settings[ groupIdx ];
Settings[ groupIdx ] = group.Type switch
{
SelectType.Single => config >= optionIdx ? Math.Max( 0, config - 1 ) : config,
SelectType.Single => config >= optionIdx ? (config > 1 ? config - 1 : 0) : config,
SelectType.Multi => RemoveBit( config, optionIdx ),
_ => config,
};