From 27dece2cf445147c5e2848f9ec26f38a101f50fc Mon Sep 17 00:00:00 2001 From: Gormogon Date: Sun, 29 May 2016 18:23:01 -0400 Subject: Attempt to migrate to new directory structure. --- src/StardewModdingAPI/Entities/SPlayer.cs | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/StardewModdingAPI/Entities/SPlayer.cs (limited to 'src/StardewModdingAPI/Entities/SPlayer.cs') diff --git a/src/StardewModdingAPI/Entities/SPlayer.cs b/src/StardewModdingAPI/Entities/SPlayer.cs new file mode 100644 index 00000000..d464cded --- /dev/null +++ b/src/StardewModdingAPI/Entities/SPlayer.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using StardewValley; + +namespace StardewModdingAPI.Entities +{ + /// + /// Static class for intergrating with the player + /// + public class SPlayer + { + /// + /// Calls 'getAllFarmers' in Game1 + /// + public static List AllFarmers => Game1.getAllFarmers(); + + /// + /// Do not use. + /// + [Obsolete("Use 'Player' instead.")] + public static Farmer CurrentFarmer => Game1.player; + + /// + /// Gets the current player from Game1 + /// + public static Farmer Player => Game1.player; + + /// + /// Gets the player's current location from Game1 + /// + public static GameLocation CurrentFarmerLocation => Player.currentLocation; + } +} \ No newline at end of file -- cgit