From c712fdb11f50bcf80ff7e62a99c68d6594c25d1c Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Thu, 25 Jan 2024 08:36:43 +0100 Subject: [PATCH] Remove redundant log bits --- Workshoppa/GameData/RecipeTree.cs | 12 +++++------- Workshoppa/WorkshopPlugin.cs | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Workshoppa/GameData/RecipeTree.cs b/Workshoppa/GameData/RecipeTree.cs index 67cde3e..a149c9c 100644 --- a/Workshoppa/GameData/RecipeTree.cs +++ b/Workshoppa/GameData/RecipeTree.cs @@ -9,13 +9,11 @@ namespace Workshoppa.GameData; public sealed class RecipeTree { private readonly IDataManager _dataManager; - private readonly IPluginLog _pluginLog; private readonly IReadOnlyList _shopItemsOnly; - public RecipeTree(IDataManager dataManager, IPluginLog pluginLog) + public RecipeTree(IDataManager dataManager) { _dataManager = dataManager; - _pluginLog = pluginLog; // probably incomplete, e.g. different housing districts have different shop types var shopVendorIds = new uint[] @@ -68,10 +66,10 @@ public sealed class RecipeTree // if a recipe has a specific amount crafted, divide the gathered amount by it foreach (var ingredient in completeList.Where(x => x is { AmountCrafted: > 1 })) { - _pluginLog.Information($"Fudging {ingredient.Name}"); + //_pluginLog.Information($"Fudging {ingredient.Name}"); foreach (var part in completeList.Where(x => ingredient.DependsOn.Contains(x.ItemId))) { - _pluginLog.Information($" → {part.Name}"); + //_pluginLog.Information($" → {part.Name}"); int unmodifiedQuantity = part.TotalQuantity; int roundedQuantity = (int)((unmodifiedQuantity + ingredient.AmountCrafted - 1) / ingredient.AmountCrafted); @@ -102,7 +100,7 @@ public sealed class RecipeTree List ingredients = new(); foreach (var material in materials.Where(x => x.Type == Ingredient.EType.Craftable)) { - _pluginLog.Information($"Looking up recipe for {material.Name}"); + //_pluginLog.Information($"Looking up recipe for {material.Name}"); var recipe = GetFirstRecipeForItem(material.ItemId); if (recipe == null) @@ -119,7 +117,7 @@ public sealed class RecipeTree Recipe? ingredientRecipe = GetFirstRecipeForItem((uint)ingredient.ItemIngredient); - _pluginLog.Information($"Adding {item.Name}"); + //_pluginLog.Information($"Adding {item.Name}"); ingredients.Add(new RecipeInfo { ItemId = (uint)ingredient.ItemIngredient, diff --git a/Workshoppa/WorkshopPlugin.cs b/Workshoppa/WorkshopPlugin.cs index deadf50..5a73c3b 100644 --- a/Workshoppa/WorkshopPlugin.cs +++ b/Workshoppa/WorkshopPlugin.cs @@ -71,7 +71,7 @@ public sealed partial class WorkshopPlugin : IDalamudPlugin _gameStrings = new(dataManager, _pluginLog); _mainWindow = new(this, _pluginInterface, _clientState, _configuration, _workshopCache, - new IconCache(textureProvider), _chatGui, new RecipeTree(dataManager, _pluginLog), _pluginLog); + new IconCache(textureProvider), _chatGui, new RecipeTree(dataManager), _pluginLog); _windowSystem.AddWindow(_mainWindow); _configWindow = new(_pluginInterface, _configuration); _windowSystem.AddWindow(_configWindow);