Beispiel #1
0
 private void GameLoop_GameLaunched(object sender, StardewModdingAPI.Events.GameLaunchedEventArgs e)
 {
     advancedLootFrameworkApi = context.Helper.ModRegistry.GetApi <IAdvancedLootFrameworkApi>("aedenthorn.AdvancedLootFramework");
     if (advancedLootFrameworkApi != null)
     {
         Monitor.Log($"loaded AdvancedLootFramework API", LogLevel.Debug);
     }
     treasuresList = advancedLootFrameworkApi.LoadPossibleTreasures(Config.ItemListChances.Where(p => p.Value > 0).ToDictionary(s => s.Key, s => s.Value).Keys.ToArray(), Config.MinItemValue, Config.MaxItemValue);
     Monitor.Log($"Got {treasuresList.Count} possible treasures");
 }
Beispiel #2
0
 private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e)
 {
     advancedLootFrameworkApi = context.Helper.ModRegistry.GetApi <IAdvancedLootFrameworkApi>("aedenthorn.AdvancedLootFramework");
     if (advancedLootFrameworkApi != null)
     {
         Monitor.Log($"loaded AdvancedLootFramework API", LogLevel.Debug);
     }
     treasuresList = advancedLootFrameworkApi.LoadPossibleTreasures(Config.ItemListTypes, Config.MinItemValue, Config.MaxItemValue);
     Monitor.Log($"Got {treasuresList.Count} possible treasures");
 }
Beispiel #3
0
 public void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e)
 {
     JsonAssets = Helper.ModRegistry.GetApi <IJsonAssetsApi>("spacechase0.JsonAssets");
     if (JsonAssets == null)
     {
         Monitor.Log("Can't load Json Assets API for Parrot Perch");
     }
     else
     {
         JsonAssets.LoadAssets(Path.Combine(Helper.DirectoryPath, "json-assets"));
     }
     advancedLootFrameworkApi = context.Helper.ModRegistry.GetApi <IAdvancedLootFrameworkApi>("aedenthorn.AdvancedLootFramework");
     if (advancedLootFrameworkApi != null)
     {
         Monitor.Log($"loaded AdvancedLootFramework API", LogLevel.Debug);
         giftList = advancedLootFrameworkApi.LoadPossibleTreasures(possibleGifts.Keys.ToArray(), -1, 100);
         Monitor.Log($"Got {giftList.Count} possible treasures");
     }
 }