From 2239463c3753f32403baa7dde83417c6a28f477f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 22 Nov 2018 19:49:49 -0500 Subject: [PATCH 1/4] migrate to new NuGet package reference format --- SmartCursor/SmartCursor.csproj | 16 +++------------- SmartCursor/packages.config | 4 ---- 2 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 SmartCursor/packages.config diff --git a/SmartCursor/SmartCursor.csproj b/SmartCursor/SmartCursor.csproj index 9650216..bfc6eab 100644 --- a/SmartCursor/SmartCursor.csproj +++ b/SmartCursor/SmartCursor.csproj @@ -11,8 +11,6 @@ SmartCursor v4.5 512 - - true @@ -50,6 +48,9 @@ MinimumRecommendedRules.ruleset true + + + @@ -67,17 +68,6 @@ - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - \ No newline at end of file diff --git a/SmartCursor/packages.config b/SmartCursor/packages.config deleted file mode 100644 index 170a804..0000000 --- a/SmartCursor/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From e91d9f785b3db614af4bf5cd3be93c38bb5af31d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 22 Nov 2018 19:52:23 -0500 Subject: [PATCH 2/4] update mod build config package --- SmartCursor/SmartCursor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SmartCursor/SmartCursor.csproj b/SmartCursor/SmartCursor.csproj index bfc6eab..6522383 100644 --- a/SmartCursor/SmartCursor.csproj +++ b/SmartCursor/SmartCursor.csproj @@ -49,7 +49,7 @@ true - + From a5d2ae363d172eaf680597d9c65fbf2b082ef719 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 22 Nov 2018 19:55:01 -0500 Subject: [PATCH 3/4] remove code which has no effect --- SmartCursor/CursorPosition.cs | 27 --------------------------- SmartCursor/ModEntry.cs | 5 +---- SmartCursor/SmartCursor.csproj | 1 - 3 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 SmartCursor/CursorPosition.cs diff --git a/SmartCursor/CursorPosition.cs b/SmartCursor/CursorPosition.cs deleted file mode 100644 index 2e365c1..0000000 --- a/SmartCursor/CursorPosition.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.Xna.Framework; -using StardewModdingAPI; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SmartCursor { - class CursorPosition : ICursorPosition { - public Vector2 AbsolutePixels { get; } - public Vector2 ScreenPixels { get; } - public Vector2 Tile { get; } - public Vector2 GrabTile { get; } - - public CursorPosition(Vector2 absolutePixels, Vector2 screenPixels, Vector2 tile, Vector2 grabTile) { - AbsolutePixels = absolutePixels; - ScreenPixels = screenPixels; - Tile = tile; - GrabTile = grabTile; - } - - public bool Equals(ICursorPosition other) { - throw new NotImplementedException(); - } - } -} diff --git a/SmartCursor/ModEntry.cs b/SmartCursor/ModEntry.cs index d503621..2762691 100644 --- a/SmartCursor/ModEntry.cs +++ b/SmartCursor/ModEntry.cs @@ -80,7 +80,6 @@ private double GetAngle(Vector2 screenPixels) { private int GetOctant(Vector2 screenPixels) { double angle = GetAngle(screenPixels); - Vector2 grabTile = Game1.player.getTileLocation(); angle += 22.5; if (angle < 45) { @@ -104,7 +103,7 @@ private int GetOctant(Vector2 screenPixels) { } private void InputEvents_ButtonPressed(object sender, EventArgsInput e) { - if (!Context.IsWorldReady || !Context.IsPlayerFree || !(e.Button == SButton.MouseLeft) || Game1.player.isCharging || Game1.player.isRidingHorse() || Game1.player.UsingTool) { + if (!Context.IsWorldReady || !Context.IsPlayerFree || e.Button != SButton.MouseLeft || Game1.player.isCharging || Game1.player.isRidingHorse() || Game1.player.UsingTool) { return; } @@ -145,10 +144,8 @@ private void InputEvents_ButtonPressed(object sender, EventArgsInput e) { dir = Game1.right; } - e = new EventArgsInput(SButton.MouseLeft, new CursorPosition(cursor.AbsolutePixels, cursor.ScreenPixels, grabTile, grabTile), null); Game1.player.lastClick = grabTile * 64 + new Vector2(32, 32); Game1.player.FacingDirection = dir; } - } } diff --git a/SmartCursor/SmartCursor.csproj b/SmartCursor/SmartCursor.csproj index 6522383..ac47d1e 100644 --- a/SmartCursor/SmartCursor.csproj +++ b/SmartCursor/SmartCursor.csproj @@ -62,7 +62,6 @@ - From a805da5fb175baefd16d782d51ed3a73a70d6a94 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 22 Nov 2018 19:55:39 -0500 Subject: [PATCH 4/4] standardise version format --- SmartCursor/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SmartCursor/manifest.json b/SmartCursor/manifest.json index 10c9e42..86c27bc 100644 --- a/SmartCursor/manifest.json +++ b/SmartCursor/manifest.json @@ -1,7 +1,7 @@ { "Name": "SmartCursor", "Author": "stokastic", - "Version": "1.1", + "Version": "1.1.0", "Description": "Allows smart targeting of adjacent 8 tiles", "UniqueID": "stokastic.SmartCursor", "EntryDll": "SmartCursor.dll",