From 9436920d91fddd36d5c208299c3fa24b29a909be Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 26 Oct 2016 21:15:34 -0400 Subject: remove broken and unused test code (#126) --- src/StardewModdingAPI/Program.cs | 58 -------------------------- src/StardewModdingAPI/StardewModdingAPI.csproj | 6 +-- src/TrainerMod/TrainerMod.cs | 27 ------------ src/TrainerMod/TrainerMod.csproj | 4 +- 4 files changed, 3 insertions(+), 92 deletions(-) (limited to 'src') diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 5513b23a..f37f573d 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -81,7 +81,6 @@ namespace StardewModdingAPI private static void ConfigureUI() { Console.Title = Constants.ConsoleTitle; - #if DEBUG Console.Title += " - DEBUG IS NOT FALSE, AUTHOUR NEEDS TO REUPLOAD THIS VERSION"; #endif @@ -149,12 +148,10 @@ namespace StardewModdingAPI // The only command in the API (at least it should be, for now) Command.RegisterCommand("help", "Lists all commands | 'help ' returns command description").CommandFired += help_CommandFired; - //Command.RegisterCommand("crash", "crashes sdv").CommandFired += delegate { Game1.player.draw(null); }; //Subscribe to events ControlEvents.KeyPressed += Events_KeyPressed; GameEvents.LoadContent += Events_LoadContent; - //Events.MenuChanged += Events_MenuChanged; //Idk right now Log.AsyncY("Applying Final SDV Tweaks..."); StardewInvoke(() => @@ -360,8 +357,6 @@ namespace StardewModdingAPI public static void ConsoleInputThread() { - var input = string.Empty; - while (true) { Command.CallCommand(Console.ReadLine()); @@ -373,65 +368,12 @@ namespace StardewModdingAPI Log.AsyncY("Initializing Debug Assets..."); DebugPixel = new Texture2D(Game1.graphics.GraphicsDevice, 1, 1); DebugPixel.SetData(new[] {Color.White}); - -#if DEBUG - StardewModdingAPI.Log.Async("REGISTERING BASE CUSTOM ITEM"); - SObject so = new SObject(); - so.Name = "Mario Block"; - so.CategoryName = "SMAPI Test Mod"; - so.Description = "It's a block from Mario!\nLoaded in realtime by SMAPI."; - so.Texture = Texture2D.FromStream(Game1.graphics.GraphicsDevice, new FileStream(_modContentPaths[0] + "\\Test.png", FileMode.Open)); - so.IsPassable = true; - so.IsPlaceable = true; - StardewModdingAPI.Log.Async("REGISTERED WITH ID OF: " + SGame.RegisterModItem(so)); - - //StardewModdingAPI.Log.Async("REGISTERING SECOND CUSTOM ITEM"); - //SObject so2 = new SObject(); - //so2.Name = "Mario Painting"; - //so2.CategoryName = "SMAPI Test Mod"; - //so2.Description = "It's a painting of a creature from Mario!\nLoaded in realtime by SMAPI."; - //so2.Texture = Texture2D.FromStream(Game1.graphics.GraphicsDevice, new FileStream(_modContentPaths[0] + "\\PaintingTest.png", FileMode.Open)); - //so2.IsPassable = true; - //so2.IsPlaceable = true; - //StardewModdingAPI.Log.Async("REGISTERED WITH ID OF: " + SGame.RegisterModItem(so2)); - - Command.CallCommand("load"); -#endif } private static void Events_KeyPressed(object o, EventArgsKeyPressed e) { } - private static void Events_MenuChanged(IClickableMenu newMenu) - { - Log.AsyncY("NEW MENU: " + newMenu.GetType()); - if (newMenu is GameMenu) - { - Game1.activeClickableMenu = SGameMenu.ConstructFromBaseClass(Game1.activeClickableMenu as GameMenu); - } - } - - private static void Events_LocationsChanged(List newLocations) - { -#if DEBUG - SGame.ModLocations = SGameLocation.ConstructFromBaseClasses(Game1.locations); -#endif - } - - private static void Events_CurrentLocationChanged(GameLocation newLocation) - { - //SGame.CurrentLocation = null; - //System.Threading.Thread.Sleep(10); -#if DEBUG - Console.WriteLine(newLocation.name); - SGame.CurrentLocation = SGame.LoadOrCreateSGameLocationFromName(newLocation.name); -#endif - //Game1.currentLocation = SGame.CurrentLocation; - //Log.LogComment(((SGameLocation) newLocation).name); - //Log.LogComment("LOC CHANGED: " + SGame.currentLocation.name); - } - public static void StardewInvoke(Action a) { StardewForm.Invoke(a); diff --git a/src/StardewModdingAPI/StardewModdingAPI.csproj b/src/StardewModdingAPI/StardewModdingAPI.csproj index ab62bd87..7c555fd8 100644 --- a/src/StardewModdingAPI/StardewModdingAPI.csproj +++ b/src/StardewModdingAPI/StardewModdingAPI.csproj @@ -55,7 +55,7 @@ x86 bin\Debug\ false - TRACE + DEBUG;TRACE true true bin\Debug\StardewModdingAPI.XML @@ -82,10 +82,8 @@ $(HOME)/GOG Games/Stardew Valley/game $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley - $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley @@ -226,4 +224,4 @@ - + \ No newline at end of file diff --git a/src/TrainerMod/TrainerMod.cs b/src/TrainerMod/TrainerMod.cs index da5365cb..92de9796 100644 --- a/src/TrainerMod/TrainerMod.cs +++ b/src/TrainerMod/TrainerMod.cs @@ -14,28 +14,6 @@ namespace TrainerMod { public class TrainerMod : Mod { - /* - public override string Name - { - get { return "Trainer Mod"; } - } - - public override string Authour - { - get { return "Zoryn Aaron"; } - } - - public override string Version - { - get { return "1.0"; } - } - - public override string Description - { - get { return "Registers several commands to use. Most commands are trainer-like in that they offer forms of cheating."; } - } - */ - public static int frozenTime; public static bool infHealth, infStamina, infMoney, freezeTime; @@ -758,11 +736,6 @@ namespace TrainerMod private static void RegisterNewItem(object sender, EventArgsCommand e) { -#if DEBUG - SObject s = SGame.PullModItemFromDict(0, true); - s.Stack = 999; - Game1.player.addItemToInventory(s); -#endif } } } \ No newline at end of file diff --git a/src/TrainerMod/TrainerMod.csproj b/src/TrainerMod/TrainerMod.csproj index 77d1c9ef..6844f1c1 100644 --- a/src/TrainerMod/TrainerMod.csproj +++ b/src/TrainerMod/TrainerMod.csproj @@ -20,7 +20,7 @@ full true ..\StardewModdingAPI\bin\Debug\Mods\TrainerMod\ - TRACE + DEBUG;TRACE prompt 4 x86 @@ -44,10 +44,8 @@ $(HOME)/GOG Games/Stardew Valley/game $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley - $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley -- cgit