Minimal cleanup on option descriptions.

This commit is contained in:
Ottermandias 2023-02-04 20:23:52 +01:00
parent 3dc04293eb
commit bb805345b1
6 changed files with 37 additions and 20 deletions

View file

@ -128,16 +128,12 @@ public sealed partial class Mod
{
var group = mod._groups[ groupIdx ];
var option = group[ optionIdx ];
if( option.Description == newDescription )
if( option.Description == newDescription || option is not SubMod s )
{
return;
}
var _ = option switch
{
SubMod s => s.Description = newDescription,
};
s.Description = newDescription;
ModOptionChanged.Invoke( ModOptionChangeType.DisplayChange, mod, groupIdx, optionIdx, -1 );
}