summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-11 21:15:16 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-11 21:15:16 -0400
commit9c1617c9ee51a0f6b93242fe8fc789336957460c (patch)
treefc1cf736ed0c7c6e8731abf87bfb8d1a17f8746d /src/SMAPI/Events
parentb9bc1a6d17cafa0a97b46ffecda432cfc2f23b51 (diff)
downloadSMAPI-9c1617c9ee51a0f6b93242fe8fc789336957460c.tar.gz
SMAPI-9c1617c9ee51a0f6b93242fe8fc789336957460c.tar.bz2
SMAPI-9c1617c9ee51a0f6b93242fe8fc789336957460c.zip
drop support for Stardew Valley 1.2 (#453)
Diffstat (limited to 'src/SMAPI/Events')
-rw-r--r--src/SMAPI/Events/EventArgsInput.cs6
-rw-r--r--src/SMAPI/Events/EventArgsInventoryChanged.cs12
-rw-r--r--src/SMAPI/Events/EventArgsLocationObjectsChanged.cs18
3 files changed, 3 insertions, 33 deletions
diff --git a/src/SMAPI/Events/EventArgsInput.cs b/src/SMAPI/Events/EventArgsInput.cs
index 75b9b8cd..b2bd978b 100644
--- a/src/SMAPI/Events/EventArgsInput.cs
+++ b/src/SMAPI/Events/EventArgsInput.cs
@@ -18,12 +18,6 @@ namespace StardewModdingAPI.Events
/// <summary>The current cursor position.</summary>
public ICursorPosition Cursor { get; }
-#if !STARDEW_VALLEY_1_3
- /// <summary>Whether the input is considered a 'click' by the game for enabling action.</summary>
- [Obsolete("Use " + nameof(EventArgsInput.IsActionButton) + " or " + nameof(EventArgsInput.IsUseToolButton) + " instead")] // deprecated in SMAPI 2.1
- public bool IsClick => this.IsActionButton;
-#endif
-
/// <summary>Whether the input should trigger actions on the affected tile.</summary>
public bool IsActionButton { get; }
diff --git a/src/SMAPI/Events/EventArgsInventoryChanged.cs b/src/SMAPI/Events/EventArgsInventoryChanged.cs
index b85ae9db..1fdca834 100644
--- a/src/SMAPI/Events/EventArgsInventoryChanged.cs
+++ b/src/SMAPI/Events/EventArgsInventoryChanged.cs
@@ -12,11 +12,7 @@ namespace StardewModdingAPI.Events
** Accessors
*********/
/// <summary>The player's inventory.</summary>
-#if STARDEW_VALLEY_1_3
public IList<Item> Inventory { get; }
-#else
- public List<Item> Inventory { get; }
-#endif
/// <summary>The added items.</summary>
public List<ItemStackChange> Added { get; }
@@ -34,13 +30,7 @@ namespace StardewModdingAPI.Events
/// <summary>Construct an instance.</summary>
/// <param name="inventory">The player's inventory.</param>
/// <param name="changedItems">The inventory changes.</param>
- public EventArgsInventoryChanged(
-#if STARDEW_VALLEY_1_3
- IList<Item> inventory,
-#else
- List<Item> inventory,
-#endif
- List<ItemStackChange> changedItems)
+ public EventArgsInventoryChanged(IList<Item> inventory, List<ItemStackChange> changedItems)
{
this.Inventory = inventory;
this.Added = changedItems.Where(n => n.ChangeType == ChangeType.Added).ToList();
diff --git a/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs b/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs
index 180e9d78..de6bd365 100644
--- a/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs
+++ b/src/SMAPI/Events/EventArgsLocationObjectsChanged.cs
@@ -1,11 +1,7 @@
using System;
-using Microsoft.Xna.Framework;
-#if STARDEW_VALLEY_1_3
using System.Collections.Generic;
+using Microsoft.Xna.Framework;
using Netcode;
-#else
-using StardewValley;
-#endif
using Object = StardewValley.Object;
namespace StardewModdingAPI.Events
@@ -17,11 +13,7 @@ namespace StardewModdingAPI.Events
** Accessors
*********/
/// <summary>The current list of objects in the current location.</summary>
-#if STARDEW_VALLEY_1_3
public IDictionary<Vector2, NetRef<Object>> NewObjects { get; }
-#else
- public SerializableDictionary<Vector2, Object> NewObjects { get; }
-#endif
/*********
@@ -29,13 +21,7 @@ namespace StardewModdingAPI.Events
*********/
/// <summary>Construct an instance.</summary>
/// <param name="newObjects">The current list of objects in the current location.</param>
- public EventArgsLocationObjectsChanged(
-#if STARDEW_VALLEY_1_3
- IDictionary<Vector2, NetRef<Object>> newObjects
-#else
- SerializableDictionary<Vector2, Object> newObjects
-#endif
- )
+ public EventArgsLocationObjectsChanged(IDictionary<Vector2, NetRef<Object>> newObjects)
{
this.NewObjects = newObjects;
}