public void SafeIntersection(CharacterFlags other) { int gender = Gender & other.Gender; int generalAge = GeneralAge & other.GeneralAge; int ethnicity = Ethnicity & other.Ethnicity; int occupation = Occupation & other.Occupation; int credentials1 = Credentials1 & other.Credentials1; int credentials2 = Credentials2 & other.Credentials2; int credentials3 = Credentials3 & other.Credentials3; int credentials4 = Credentials4 & other.Credentials4; int credentials5 = Credentials5 & other.Credentials5; int faction = Faction & other.Faction; int region = Region & other.Region; int alignment = Alignment & other.Alignment; int wealth = Wealth & other.Wealth; Gender = (gender > 0) ? gender : Gender; GeneralAge = (generalAge > 0) ? generalAge : GeneralAge; Ethnicity = (ethnicity > 0) ? ethnicity : Ethnicity; Occupation = (occupation > 0) ? occupation : Occupation; Credentials1 = (credentials1 > 0) ? credentials1 : Credentials1; Credentials2 = (credentials2 > 0) ? credentials2 : Credentials2; Credentials3 = (credentials3 > 0) ? credentials3 : Credentials3; Credentials4 = (credentials4 > 0) ? credentials4 : Credentials4; Credentials5 = (credentials5 > 0) ? credentials5 : Credentials5; Faction = (faction > 0) ? faction : Faction; Region = (region > 0) ? region : Region; Alignment = (alignment > 0) ? alignment : Alignment; Wealth = (wealth > 0) ? wealth : Wealth; }
public bool Check(CharacterFlags anyOfThese) { return(Flags.Check(CharacterBodyLayout, anyOfThese.CharacterBodyLayout, Flags.CheckType.MatchAny) && Flags.Check(Alignment, anyOfThese.Alignment, Flags.CheckType.MatchAny) && Flags.Check(Ethnicity, anyOfThese.Ethnicity, Flags.CheckType.MatchAny) && Flags.Check(Faction, anyOfThese.Faction, Flags.CheckType.MatchAny) && Flags.Check(Gender, anyOfThese.Gender, Flags.CheckType.MatchAny) && Flags.Check(GeneralAge, anyOfThese.GeneralAge, Flags.CheckType.MatchAny) && Flags.Check(Occupation, anyOfThese.Occupation, Flags.CheckType.MatchAny) && Flags.Check(Region, anyOfThese.Region, Flags.CheckType.MatchAny)); }
public void Intersection(CharacterFlags other) { Gender = Gender & other.Gender; GeneralAge = GeneralAge & other.GeneralAge; Ethnicity = Ethnicity & other.Ethnicity; Occupation = Occupation & other.Occupation; Credentials1 = Credentials1 & other.Credentials1; Credentials2 = Credentials2 & other.Credentials2; Credentials3 = Credentials3 & other.Credentials3; Credentials4 = Credentials4 & other.Credentials4; Credentials5 = Credentials5 & other.Credentials5; Faction = Faction & other.Faction; Region = Region & other.Region; Alignment = Alignment & other.Alignment; Wealth = Wealth & other.Wealth; }
public void Union(CharacterFlags other) { Gender = Gender | other.Gender; GeneralAge = GeneralAge | other.GeneralAge; Ethnicity = Ethnicity | other.Ethnicity; Occupation = Occupation | other.Occupation; Credentials1 = Credentials1 | other.Credentials1; Credentials2 = Credentials2 | other.Credentials2; Credentials3 = Credentials3 | other.Credentials3; Credentials4 = Credentials4 | other.Credentials4; Credentials5 = Credentials5 | other.Credentials5; Faction = Faction | other.Faction; Region = Region | other.Region; Alignment = Alignment | other.Alignment; Wealth = Wealth | other.Wealth; }
public void Generate(CharacterFlags combinedFlags) { GenericIdentifier = "Settler"; return; }