/// <summary> /// Adds a new outfit. /// </summary> /// <param name="outfit"></param> public void AddOutfit(WearableOutfit outfit) { if (!_outfits.Exists(o => o.Id == outfit.Id)) { _outfits.Add(outfit); } }
/// <summary> /// Applies all the wearables which are contained inside an outfit. /// </summary> /// <param name="outfitName"></param> public void ApplyOutfit(string outfitName) { WearableOutfit outfit = _outfits.Find(o => o.Name == outfitName); if (outfit != null) { //First remove all existing wearables. RemoveAllWearables(false, false); foreach (Guid wearableId in outfit.Wearables) { Wearable wearable = _wearables.Find(w => w.Id == wearableId); if (wearable != null) { ApplyWearable(wearable); } } } }