Пример #1
0
        public void AddGlobalItem(string name, GlobalItem globalItem)
        {
            globalItem.mod    = this;
            globalItem.Name   = name;
            globalItems[name] = globalItem;

            ItemLoader.globalItems.Add(globalItem);
        }
Пример #2
0
        private void AutoloadGlobalItem(Type type)
        {
            GlobalItem globalItem = (GlobalItem)Activator.CreateInstance(type);

            globalItem.mod = this;
            string name = type.Name;

            if (globalItem.Autoload(ref name))
            {
                AddGlobalItem(name, globalItem);
            }
        }