private void Awake()
        {
            Debug.Log("Loading assets.");
            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("ArtifactOfHaste.artifactofhaste"))
            {
                var bundle   = AssetBundle.LoadFromStream(stream);
                var provider = new AssetBundleResourcesProvider("@ArtifactOfHaste", bundle);
                ResourcesAPI.AddProvider(provider);
            }

            config = new ConfigFile(Path.Combine(Paths.ConfigPath, modGuid + ".cfg"), true);

            Debug.Log("Creating mod info.");
            itemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = "Artifact of Haste",
                longIdentifier  = "ArtifactOfHaste",
                shortIdentifier = "AOH",
                mainConfigFile  = config
            });

            Debug.Log("Initializing mod.");
            T2Module.SetupAll_PluginAwake(itemList);
            T2Module.SetupAll_PluginStart(itemList);
        }
示例#2
0
        private void Awake()
        {
            _logger = Logger;

            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SupplyDrop.supplydrop_assets"))
            {
                MainAssets = AssetBundle.LoadFromStream(stream);
            }
            ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            masterItemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = "Supply Drop",
                longIdentifier  = "SUPPLYDROP",
                shortIdentifier = "SUPPDRP",
                mainConfigFile  = ConfigFile
            });

            using (var bankStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SupplyDrop.SupplyDropSounds.bnk"))
            {
                var bytes = new byte[bankStream.Length];
                bankStream.Read(bytes, 0, bytes.Length);
                SoundAPI.SoundBanks.Add(bytes);
            }

            T2Module.SetupAll_PluginAwake(masterItemList);
            T2Module.SetupAll_PluginStart(masterItemList);
        }
示例#3
0
        private void Awake()
        {
            _logger = Logger;

            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TinkersSatchel.tinkerssatchel_assets")) {
                resources = AssetBundle.LoadFromStream(stream);
            }

            try {
                UnstubShaders();
            } catch (Exception ex) {
                _logger.LogError($"Shader unstub failed: {ex} {ex.Message}");
            }

            cfgFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            var modInfo = new T2Module.ModInfo {
                displayName     = "Tinker's Satchel",
                longIdentifier  = "TinkersSatchel",
                shortIdentifier = "TKSAT",
                mainConfigFile  = cfgFile
            };

            allModules = T2Module.InitAll <T2Module>(modInfo);

            var earlyLoad = new[] { CommonCode.instance };

            T2Module.SetupAll_PluginAwake(earlyLoad);
            T2Module.SetupAll_PluginAwake(allModules.Except(earlyLoad));
        }
示例#4
0
        private void Awake() //Sourced almost entirely from ThinkInvis' Classic Items. It is also extremely handy.
        {
            _logger = Logger;

#if DEBUG
            Logger.LogWarning("DEBUG mode is enabled! Ignore this message if you are actually debugging.");
            On.RoR2.Networking.GameNetworkManager.OnClientConnect += (self, user, t) => { };
#endif

            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Aetherium.aetherium_assets"))
            {
                var bundle   = AssetBundle.LoadFromStream(stream);
                var provider = new AssetBundleResourcesProvider("@Aetherium", bundle);
                ResourcesAPI.AddProvider(provider);
            }

            ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            masterItemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = "Aetherium",
                longIdentifier  = "AETHERIUMMOD",
                shortIdentifier = "ATHRM",
                mainConfigFile  = ConfigFile
            });


            T2Module.SetupAll_PluginAwake(masterItemList);
            T2Module.SetupAll_PluginStart(masterItemList);
        }
        private void Awake()
        {
            _logger = Logger;

            Logger.LogDebug("Loading assets...");

            //BundleInfo bundleInfo = new BundleInfo("@RiskOfBulletstorm", "RiskOfBulletstorm.riskofgungeonassets", BundleType.UnityAssetBundle);
            BundleInfo bundleInfo = new BundleInfo("RiskOfBulletstorm.riskofgungeonassets", BundleType.UnityAssetBundle);

            assetBundle = new AssetsManager(bundleInfo).Register() as AssetBundle;

            ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            masterItemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = displayName,
                longIdentifier  = "RISKOFBULLETSTORMMOD",
                shortIdentifier = "RBS",
                mainConfigFile  = ConfigFile
            });
            T2Module.SetupAll_PluginAwake(masterItemList);

            Shared.Buffs.BuffsController.Init();

            R2API.Utils.CommandHelper.AddToConsoleWhenReady();
        }
        private void Awake()
        {
            logger = Logger;

            Logger.LogDebug($"Initialising plugin -- Version {ModVersion}");
            Logger.LogDebug("Loading configuration...");

            config = new ConfigFile(Path.Combine(Paths.ConfigPath, $"{ModGuid}.cfg"), true);

            Logger.LogDebug("Loading assets...");
            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MoreItems.moreitems"))
            {
                AssetBundle bundle = AssetBundle.LoadFromStream(stream);
                AssetBundleResourcesProvider provider = new AssetBundleResourcesProvider("@MoreItems", bundle);

                ResourcesAPI.AddProvider(provider);
            }

            masterItemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = "More Items",
                longIdentifier  = "MoreItems",
                shortIdentifier = "More",
                mainConfigFile  = config
            });

            T2Module.SetupAll_PluginAwake(masterItemList);
        }
        private void Awake()
        {
            Log = new Log(Logger);

#if DEBUG
            MultiplayerTest.Enable(Logger, "Running test build with debug enabled! Report to CHEN if you're seeing this!");
#endif

            Log.Debug("Loading assets...");
            BundleInfo bundleInfo = new BundleInfo("ChensBombasticMod.chensbombasticmod_assets", BundleType.UnityAssetBundle);
            assetBundle = new AssetsManager(bundleInfo).Register();

            cfgFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            Log.Debug("Instantiating item classes...");
            chensItemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = "Chen's Bombastic Mod",
                longIdentifier  = "ChensBombasticMod",
                shortIdentifier = "CBM",
                mainConfigFile  = cfgFile
            });

            T2Module.SetupAll_PluginAwake(chensItemList);
            T2Module.SetupAll_PluginStart(chensItemList);
        }
        private void Awake()
        {
#if DEBUG
            On.RoR2.Networking.GameNetworkManager.OnClientConnect += (self, user, t) => { };
#endif
            _logger = Logger;

            Logger.LogDebug("Loading assets...");
            ResourcesAPI.AddProvider(Assets.PopulateAssets());


            cfgFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            Logger.LogDebug("Replacing Item Shaders with Hopoo shaders...");
            Assets.ReplaceShaders();

            masterItemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = "Kevin's Additional Items",
                longIdentifier  = "KevinsAdditions",
                shortIdentifier = "KAI",
                mainConfigFile  = cfgFile
            });

            T2Module.SetupAll_PluginAwake(masterItemList);

            Logger.LogDebug("Adding Imp Mechanics...");
            ImpPlayerAdjustments.AddExtras();
        }
示例#9
0
        private void Awake()
        {
            _logger = Logger;

            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SupplyDrop.supplydrop_assets"))
            {
                var bundle   = AssetBundle.LoadFromStream(stream);
                var provider = new AssetBundleResourcesProvider("@SupplyDrop", bundle);
                ResourcesAPI.AddProvider(provider);
            }
            ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            masterItemList = T2Module.InitAll <CatalogBoilerplate>(new T2Module.ModInfo
            {
                displayName     = "Supply Drop",
                longIdentifier  = "SUPPLYDROP",
                shortIdentifier = "SUPPDRP",
                mainConfigFile  = ConfigFile
            });

            T2Module.SetupAll_PluginAwake(masterItemList);
        }