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)); }