Services here, too!

This commit is contained in:
Ottermandias 2023-04-23 19:50:51 +02:00
parent 1eb16b98a8
commit 85adc3626e
47 changed files with 1015 additions and 562 deletions

View file

@ -95,4 +95,14 @@ public static class CustomizeFlagExtensions
CustomizeFlag.FacePaintColor => CustomizeIndex.FacePaintColor,
_ => (CustomizeIndex)byte.MaxValue,
};
public static bool SetIfDifferent(ref this CustomizeFlag flags, CustomizeFlag flag, bool value)
{
var newValue = value ? flags | flag : flags & ~flag;
if (newValue == flags)
return false;
flags = newValue;
return true;
}
}