summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Entities/SPlayer.cs
diff options
context:
space:
mode:
authorCarl <slxxls92@gmail.com>2016-05-30 01:33:37 +0100
committerCarl <slxxls92@gmail.com>2016-05-30 01:33:37 +0100
commitfa666f803398e29a7ffec0707cd6a1ec3571d3e9 (patch)
tree71099c94fa92196cfb6cdb42a56379e6fdaa4364 /src/StardewModdingAPI/Entities/SPlayer.cs
parent4edee54da20e7655ae24cf1ac2abded5ec1ba2c5 (diff)
parent1212222e9f59a68a9f167d20bbddd8a4e1a3cf81 (diff)
downloadSMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.tar.gz
SMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.tar.bz2
SMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.zip
Merge pull request #118 from Gormogon/master
Some Semi-Big Changes
Diffstat (limited to 'src/StardewModdingAPI/Entities/SPlayer.cs')
-rw-r--r--src/StardewModdingAPI/Entities/SPlayer.cs33
1 files changed, 33 insertions, 0 deletions
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
+{
+ /// <summary>
+ /// Static class for intergrating with the player
+ /// </summary>
+ public class SPlayer
+ {
+ /// <summary>
+ /// Calls 'getAllFarmers' in Game1
+ /// </summary>
+ public static List<Farmer> AllFarmers => Game1.getAllFarmers();
+
+ /// <summary>
+ /// Do not use.
+ /// </summary>
+ [Obsolete("Use 'Player' instead.")]
+ public static Farmer CurrentFarmer => Game1.player;
+
+ /// <summary>
+ /// Gets the current player from Game1
+ /// </summary>
+ public static Farmer Player => Game1.player;
+
+ /// <summary>
+ /// Gets the player's current location from Game1
+ /// </summary>
+ public static GameLocation CurrentFarmerLocation => Player.currentLocation;
+ }
+} \ No newline at end of file