Beispiel #1
0
        /// <summary>
        /// Call this in <see cref="ModItem.SetStaticDefaults"/> to register this item into the "clicker class" category
        /// </summary>
        /// <param name="modItem">The <see cref="ModItem"/> that is to be registered</param>
        /// <exception cref="InvalidOperationException"/>
        public static void RegisterClickerItem(ModItem modItem)
        {
            if (ClickerClass.finalizedRegisterCompat)
            {
                throw new InvalidOperationException("Tried to register a clicker item at the wrong time, do so in ModItem.SetStaticDefaults");
            }
            int type = modItem.item.type;

            if (!ClickerItems.Contains(type))
            {
                ClickerItems.Add(type);
            }
        }