public void AddGlobalItem(string name, GlobalItem globalItem) { globalItem.mod = this; globalItem.Name = name; globalItems[name] = globalItem; ItemLoader.globalItems.Add(globalItem); }
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); } }