//////////////// internal void PopulateNames() { var dict = new Dictionary <string, ISet <int> >(); for (int i = 1; i < ProjectileLoader.ProjectileCount; i++) { string name = ProjectileAttributeHelpers.GetQualifiedName(i); if (dict.ContainsKey(name)) { dict[name].Add(i); } else { dict[name] = new HashSet <int>() { i }; } } this._DisplayNamesToIds = new ReadOnlyDictionaryOfSets <string, int>(dict); }
/// <summary> /// Gets the "qualified" (human readable) name of a given projectile. /// </summary> /// <param name="proj"></param> /// <returns></returns> public static string GetQualifiedName(Projectile proj) { return(ProjectileAttributeHelpers.GetQualifiedName(proj.type)); }