summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-10-26 21:15:34 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-10-26 21:15:34 -0400
commit9436920d91fddd36d5c208299c3fa24b29a909be (patch)
treea9d2e174f3821e1775ec37c53b0c6abb13d38759 /src
parent57da69c87c9befcba3257af8e47a7e1685f98041 (diff)
downloadSMAPI-9436920d91fddd36d5c208299c3fa24b29a909be.tar.gz
SMAPI-9436920d91fddd36d5c208299c3fa24b29a909be.tar.bz2
SMAPI-9436920d91fddd36d5c208299c3fa24b29a909be.zip
remove broken and unused test code (#126)
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI/Program.cs58
-rw-r--r--src/StardewModdingAPI/StardewModdingAPI.csproj6
-rw-r--r--src/TrainerMod/TrainerMod.cs27
-rw-r--r--src/TrainerMod/TrainerMod.csproj4
4 files changed, 3 insertions, 92 deletions
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 <cmd>' 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<GameLocation> 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 @@
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\Debug\</OutputPath>
<Prefer32Bit>false</Prefer32Bit>
- <DefineConstants>TRACE</DefineConstants>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
<UseVSHostingProcess>true</UseVSHostingProcess>
<Optimize>true</Optimize>
<DocumentationFile>bin\Debug\StardewModdingAPI.XML</DocumentationFile>
@@ -82,10 +82,8 @@
<!-- Linux paths -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
-
<!-- Mac paths -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS</GamePath>
-
<!-- Windows paths -->
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley</GamePath>
@@ -226,4 +224,4 @@
<!-- if game path is invalid, show one user-friendly error instead of a slew of reference errors -->
<Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically; edit the *.csproj file and manually add a &lt;GamePath&gt; setting with the full directory path containing the Stardew Valley executable." />
</Target>
-</Project>
+</Project> \ 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 @@
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\StardewModdingAPI\bin\Debug\Mods\TrainerMod\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -44,10 +44,8 @@
<!-- Linux paths -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
-
<!-- Mac paths -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS</GamePath>
-
<!-- Windows paths -->
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley</GamePath>