/// <summary> /// Call this in <see cref="ModProjectile.SetStaticDefaults"/> to register this projectile into the "clicker class" category /// </summary> /// <param name="modProj">The <see cref="ModProjectile"/> that is to be registered</param> /// <exception cref="InvalidOperationException"/> public static void RegisterClickerProjectile(ModProjectile modProj) { if (ClickerClass.finalizedRegisterCompat) { throw new InvalidOperationException("Tried to register a clicker projectile at the wrong time, do so in ModProjectile.SetStaticDefaults"); } int type = modProj.projectile.type; if (!ClickerProjectiles.Contains(type)) { ClickerProjectiles.Add(type); } }
/// <summary> /// Call this to check if a projectile type belongs to the "clicker class" category /// </summary> /// <param name="type">The item type to be checked</param> /// <returns><see langword="true"/> if that category</returns> public static bool IsClickerProj(int type) { return(ClickerProjectiles.Contains(type)); }