public ColorStore(SavedOutfit outfit) { if (outfit != null) { mHairPreset = outfit.GetPreset(BodyTypes.Hair); mBeardPreset = outfit.GetPreset(BodyTypes.Beard); mEyebrowsPreset = outfit.GetPreset(BodyTypes.Eyebrows); mBodyHairPreset = outfit.GetPreset(BodyTypes.BodyHairUpperChest); } }
public bool Apply(SimBuilder builder, CASParts.Key key, bool applyHairColor, IEnumerable <BodyTypes> types, IEnumerable <BodyTypes> notTypes) { SavedOutfit outfit = Load(key); if (outfit == null) { return(false); } outfit.Apply(builder, applyHairColor, types, notTypes); return(true); }
public bool ApplyColors(SimDescriptionCore sim, CASParts.Key key) { SavedOutfit outfit = Load(key); if (outfit == null) { return(false); } outfit.mStore.Apply(sim); return(true); }
public SavedOutfit Store(CASParts.Key key, SavedOutfit outfit) { Dictionary <int, SavedOutfit> indices; if (!mOutfits.TryGetValue(key.mCategory, out indices)) { indices = new Dictionary <int, SavedOutfit>(); mOutfits.Add(key.mCategory, indices); } indices[key.GetIndex()] = outfit; return(outfit); }
public SavedOutfit Replace(CASParts.Key key, SimBuilder builder, bool applyHairColor) { if (!applyHairColor) { SavedOutfit oldOutfit = Load(key); if (oldOutfit != null) { oldOutfit.mStore.Apply(builder); } } return(Store(key, new SavedOutfit(builder))); }
public Key(CASParts.Key key, SavedOutfit outfit) { mKey = key; mOutfit = outfit; }
public SavedOutfit Store(CASParts.Key key, SavedOutfit outfit) { Dictionary<int, SavedOutfit> indices; if (!mOutfits.TryGetValue(key.mCategory, out indices)) { indices = new Dictionary<int, SavedOutfit>(); mOutfits.Add(key.mCategory, indices); } indices[key.GetIndex()] = outfit; return outfit; }