protected override bool Allow(SimDescription sim, ref CASParts.Key outfitKey, ref bool alternate, ref CASParts.Key displayKey) { displayKey = new CASParts.Key(sCategories[outfitKey.GetIndex()], 0); outfitKey = new CASParts.Key(Dresser.GetStoreOutfitKey(sCategories[outfitKey.GetIndex()], sim.IsUsingMaternityOutfits)); alternate = true; if (CASParts.GetOutfit(sim, outfitKey, true) == null) return false; 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 Load(CASParts.Key key) { Dictionary<int, SavedOutfit> indices; if (!mOutfits.TryGetValue(key.mCategory, out indices)) { return null; } SavedOutfit outfit; if (!indices.TryGetValue(key.GetIndex(), out outfit)) { return null; } return outfit; }
public static void SwitchNoSpin(Sim ths, CASParts.Key key) { SwitchNoSpinTaskB.Perform(ths, key.mCategory, key.GetIndex(ths.SimDescription, false)); }