summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Entities/SPlayer.cs
diff options
context:
space:
mode:
authorGormogon <Gormogon@users.noreply.github.com>2016-05-29 18:23:01 -0400
committerGormogon <Gormogon@users.noreply.github.com>2016-05-29 18:23:01 -0400
commit27dece2cf445147c5e2848f9ec26f38a101f50fc (patch)
tree2579d0979dd9f295972e5ba2a81f4177589f7395 /src/StardewModdingAPI/Entities/SPlayer.cs
parent85142935b63324f7c6131a8855acea0a2d534879 (diff)
downloadSMAPI-27dece2cf445147c5e2848f9ec26f38a101f50fc.tar.gz
SMAPI-27dece2cf445147c5e2848f9ec26f38a101f50fc.tar.bz2
SMAPI-27dece2cf445147c5e2848f9ec26f38a101f50fc.zip
Attempt to migrate to new directory structure.
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