From 9385a2a8384c27c638da850f537ca54a97c62f77 Mon Sep 17 00:00:00 2001 From: XTigerHyperX Date: Tue, 23 Aug 2022 15:42:24 +0100 Subject: [PATCH] Cleaning --- Minerva/Core/BasicCommands.cs | 16 +++------------- Minerva/Core/BasicLog.cs | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 Minerva/Core/BasicLog.cs diff --git a/Minerva/Core/BasicCommands.cs b/Minerva/Core/BasicCommands.cs index 904166c..aa57698 100644 --- a/Minerva/Core/BasicCommands.cs +++ b/Minerva/Core/BasicCommands.cs @@ -1,7 +1,8 @@ using System; -using System.Linq; using System.Threading.Tasks; using Minerva.Models; +using Logger = Minerva.Core.Logger; + namespace Minerva.Core { @@ -15,18 +16,7 @@ public static async Task GrabOutfitsWithShopHistory() { if (cosmetic.HasShopHistory) { - //PlaceHolder Bs until i create a logger - //var v = DateTime.Today - cosmetic.ShopHistory.Last(); - Console.ForegroundColor = ConsoleColor.Green; - Console.WriteLine("This outfit has a shop history!"); - Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine("Name: " + cosmetic.Name); - Console.ForegroundColor = ConsoleColor.White; - Console.WriteLine("ID: " + cosmetic.Id); - Console.WriteLine("Added in " + cosmetic.Added); - Console.ForegroundColor = ConsoleColor.Cyan; - Console.WriteLine("This Cosmetic appeared in the shop " + cosmetic.ShopHistory.Count + " Times"); - Console.ForegroundColor = ConsoleColor.White; + BasicLog.log(cosmetic); } } } diff --git a/Minerva/Core/BasicLog.cs b/Minerva/Core/BasicLog.cs new file mode 100644 index 0000000..3f9867e --- /dev/null +++ b/Minerva/Core/BasicLog.cs @@ -0,0 +1,24 @@ +using System; +using Minerva.Models; + +namespace Minerva.Core +{ + public class BasicLog + { + public static void log(Cosmetics cosmetic) + { + //PlaceHolder Bs until i create a logger + //var v = DateTime.Today - cosmetic.ShopHistory.Last(); + Console.ForegroundColor = ConsoleColor.Green; + Console.WriteLine("This outfit has a shop history!"); + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine("Name: " + cosmetic.Name); + Console.ForegroundColor = ConsoleColor.White; + Console.WriteLine("ID: " + cosmetic.Id); + Console.WriteLine("Added in " + cosmetic.Added); + Console.ForegroundColor = ConsoleColor.Cyan; + Console.WriteLine("This Cosmetic appeared in the shop " + cosmetic.ShopHistory.Count + " Times"); + Console.ForegroundColor = ConsoleColor.White; + } + } +} \ No newline at end of file