Do never apply customize that's unavailable... hopefully.

This commit is contained in:
Ottermandias 2023-09-29 22:55:12 +02:00
parent 07f1b4f61c
commit a44eae4c1f
3 changed files with 5 additions and 0 deletions

View file

@ -397,6 +397,8 @@ public class DesignBase
design.SetApplyCustomize(idx, false);
}
}
design.ApplyCustomize &= set.SettingAvailable;
}
public void MigrateBase64(ItemManager items, HumanModelList humans, string base64)

View file

@ -306,6 +306,8 @@ public class DesignManager
/// <summary> Change whether to apply a specific customize value. </summary>
public void ChangeApplyCustomize(Design design, CustomizeIndex idx, bool value)
{
var set = _customizations.AwaitedService.GetList(design.DesignData.Customize.Clan, design.DesignData.Customize.Gender);
value &= set.IsAvailable(idx);
if (!design.SetApplyCustomize(idx, value))
return;

View file

@ -36,6 +36,7 @@ public sealed class CustomizationService : AsyncServiceWrapper<ICustomizationMan
}
var set = AwaitedService.GetList(ret.Clan, ret.Gender);
applyWhich &= set.SettingAvailable;
foreach (var index in CustomizationExtensions.AllBasic)
{
var flag = index.ToFlag();