public static void SetBundleData(int bundle_type, bool use_seed) { Random r = null; r = ((!use_seed) ? new Random() : new Random((int)Game1.uniqueIDForThisGame * 9)); switch (bundle_type) { // Normal default: { Game1.netWorldState.Value.SetBundleData(Game1.content.LoadBase <Dictionary <string, string> >("Data\\Bundles")); break; } // Remixed case 1: { Dictionary <string, string> bundle_data = new BundleGenerator().Generate("Data\\RandomBundles", r); Game1.netWorldState.Value.SetBundleData(bundle_data); break; } // Custom case 2: { string path = Path.Combine(Main.Helper.DirectoryPath, "Data\\RandomizedBundles.json"); Dictionary <string, string> bundle_data = new CustomBundleGenerator().Generate(path, r); Game1.netWorldState.Value.SetBundleData(bundle_data); break; } } }
private void InitializeClasses(IModHelper helper) { GenerateBundlesPatch.Initialize(this); PopulateOptionsPatch.Initialize(this); BundlePatch.Initialize(this, stream); CustomBundleGenerator.Initialize(this); SetBundleType.Initialize(Monitor); Bundle.Initialize(Monitor); }