public static bool CheckScent(UrbSubstanceTag Substance, UrbScentTag Scent) { if (SubstanceByScent.ContainsKey(Scent)) { return(SubstanceByScent[Scent].Contains(Substance)); } return(false); }
protected static bool UnregisterScent(UrbSubstanceTag Substance, UrbScentTag Scent) { if (SubstanceByScent.ContainsKey(Scent)) { if (SubstanceByScent[Scent].Contains(Substance)) { return(SubstanceByScent[Scent].Remove(Substance)); } } return(false); }
protected static bool RegisterScent(UrbSubstanceTag Substance, UrbScentTag Scent) { if (!SubstanceByScent.ContainsKey(Scent)) { SubstanceByScent.Add(Scent, new List <UrbSubstanceTag>()); } if (SubstanceByScent[Scent].Contains(Substance)) { return(false); } SubstanceByScent[Scent].Add(Substance); return(true); }