summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-27 19:59:41 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-27 19:59:41 -0400
commitbeb2f9c1484626e03acfecffd0f90cd2cddb8cc6 (patch)
tree63b58335af760764e9ab2ed574342aeb73db1184
parentadda9611c73163270cbfcd34d6617560f81d54b0 (diff)
downloadSMAPI-beb2f9c1484626e03acfecffd0f90cd2cddb8cc6.tar.gz
SMAPI-beb2f9c1484626e03acfecffd0f90cd2cddb8cc6.tar.bz2
SMAPI-beb2f9c1484626e03acfecffd0f90cd2cddb8cc6.zip
remove alias no longer needed in SDV 1.3 (#453)
-rw-r--r--src/SMAPI.ModBuildConfig.Analyzer.Tests/NetFieldAnalyzerTests.cs3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetLevelCommand.cs15
-rw-r--r--src/SMAPI/Framework/SGame.cs11
-rw-r--r--src/SMAPI/Framework/StateTracking/PlayerTracker.cs5
4 files changed, 15 insertions, 19 deletions
diff --git a/src/SMAPI.ModBuildConfig.Analyzer.Tests/NetFieldAnalyzerTests.cs b/src/SMAPI.ModBuildConfig.Analyzer.Tests/NetFieldAnalyzerTests.cs
index 7b410085..ab3f2c5e 100644
--- a/src/SMAPI.ModBuildConfig.Analyzer.Tests/NetFieldAnalyzerTests.cs
+++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/NetFieldAnalyzerTests.cs
@@ -19,7 +19,6 @@ namespace SMAPI.ModBuildConfig.Analyzer.Tests
using StardewValley;
using Netcode;
using SObject = StardewValley.Object;
- using SFarmer = StardewValley.Farmer;
namespace SampleMod
{
@@ -34,7 +33,7 @@ namespace SMAPI.ModBuildConfig.Analyzer.Tests
";
/// <summary>The line number where the unit tested code is injected into <see cref="SampleProgram"/>.</summary>
- private const int SampleCodeLine = 14;
+ private const int SampleCodeLine = 13;
/// <summary>The column number where the unit tested code is injected into <see cref="SampleProgram"/>.</summary>
private const int SampleCodeColumn = 25;
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetLevelCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetLevelCommand.cs
index 68891267..97a36066 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetLevelCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetLevelCommand.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using StardewValley;
-using SFarmer = StardewValley.Farmer;
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
@@ -11,7 +10,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
** Properties
*********/
/// <summary>The experience points needed to reach each level.</summary>
- /// <remarks>Derived from <see cref="SFarmer.checkForLevelGain"/>.</remarks>
+ /// <remarks>Derived from <see cref="Farmer.checkForLevelGain"/>.</remarks>
private readonly IDictionary<int, int> LevelExp = new Dictionary<int, int>
{
[0] = 0,
@@ -52,37 +51,37 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
case "luck":
Game1.player.LuckLevel = level;
- Game1.player.experiencePoints[SFarmer.luckSkill] = this.LevelExp[level];
+ Game1.player.experiencePoints[Farmer.luckSkill] = this.LevelExp[level];
monitor.Log($"OK, your luck skill is now {Game1.player.LuckLevel}.", LogLevel.Info);
break;
case "mining":
Game1.player.MiningLevel = level;
- Game1.player.experiencePoints[SFarmer.miningSkill] = this.LevelExp[level];
+ Game1.player.experiencePoints[Farmer.miningSkill] = this.LevelExp[level];
monitor.Log($"OK, your mining skill is now {Game1.player.MiningLevel}.", LogLevel.Info);
break;
case "combat":
Game1.player.CombatLevel = level;
- Game1.player.experiencePoints[SFarmer.combatSkill] = this.LevelExp[level];
+ Game1.player.experiencePoints[Farmer.combatSkill] = this.LevelExp[level];
monitor.Log($"OK, your combat skill is now {Game1.player.CombatLevel}.", LogLevel.Info);
break;
case "farming":
Game1.player.FarmingLevel = level;
- Game1.player.experiencePoints[SFarmer.farmingSkill] = this.LevelExp[level];
+ Game1.player.experiencePoints[Farmer.farmingSkill] = this.LevelExp[level];
monitor.Log($"OK, your farming skill is now {Game1.player.FarmingLevel}.", LogLevel.Info);
break;
case "fishing":
Game1.player.FishingLevel = level;
- Game1.player.experiencePoints[SFarmer.fishingSkill] = this.LevelExp[level];
+ Game1.player.experiencePoints[Farmer.fishingSkill] = this.LevelExp[level];
monitor.Log($"OK, your fishing skill is now {Game1.player.FishingLevel}.", LogLevel.Info);
break;
case "foraging":
Game1.player.ForagingLevel = level;
- Game1.player.experiencePoints[SFarmer.foragingSkill] = this.LevelExp[level];
+ Game1.player.experiencePoints[Farmer.foragingSkill] = this.LevelExp[level];
monitor.Log($"OK, your foraging skill is now {Game1.player.ForagingLevel}.", LogLevel.Info);
break;
}
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs
index 89bf18ef..7578473b 100644
--- a/src/SMAPI/Framework/SGame.cs
+++ b/src/SMAPI/Framework/SGame.cs
@@ -23,7 +23,6 @@ using StardewValley.Menus;
using StardewValley.Tools;
using xTile.Dimensions;
using xTile.Layers;
-using SFarmer = StardewValley.Farmer;
using SObject = StardewValley.Object;
namespace StardewModdingAPI.Framework
@@ -872,10 +871,10 @@ namespace StardewModdingAPI.Framework
Game1.mapDisplayDevice.BeginScene(Game1.spriteBatch);
Game1.currentLocation.Map.GetLayer("Back").Draw(Game1.mapDisplayDevice, Game1.viewport, Location.Origin, false, 4);
Game1.currentLocation.drawWater(Game1.spriteBatch);
- IEnumerable<SFarmer> source = Game1.currentLocation.farmers;
+ IEnumerable<Farmer> source = Game1.currentLocation.farmers;
if (Game1.currentLocation.currentEvent != null && !Game1.currentLocation.currentEvent.isFestival && Game1.currentLocation.currentEvent.farmerActors.Count > 0)
- source = (IEnumerable<SFarmer>)Game1.currentLocation.currentEvent.farmerActors;
- IEnumerable<SFarmer> farmers = source.Where<SFarmer>((Func<SFarmer, bool>)(farmer =>
+ source = (IEnumerable<Farmer>)Game1.currentLocation.currentEvent.farmerActors;
+ IEnumerable<Farmer> farmers = source.Where<Farmer>((Func<Farmer, bool>)(farmer =>
{
if (!farmer.IsLocalPlayer)
return !(bool)((NetFieldBase<bool, NetBool>)farmer.hidden);
@@ -899,7 +898,7 @@ namespace StardewModdingAPI.Framework
Game1.spriteBatch.Draw(Game1.shadowTexture, Game1.GlobalToLocal(Game1.viewport, actor.Position + new Vector2((float)(actor.Sprite.SpriteWidth * 4) / 2f, (float)(actor.GetBoundingBox().Height + (actor.IsMonster ? 0 : (actor.Sprite.SpriteHeight <= 16 ? -4 : 12))))), new Microsoft.Xna.Framework.Rectangle?(Game1.shadowTexture.Bounds), Color.White, 0.0f, new Vector2((float)Game1.shadowTexture.Bounds.Center.X, (float)Game1.shadowTexture.Bounds.Center.Y), (float)(4.0 + (double)actor.yJumpOffset / 40.0) * (float)((NetFieldBase<float, NetFloat>)actor.scale), SpriteEffects.None, Math.Max(0.0f, (float)actor.getStandingY() / 10000f) - 1E-06f);
}
}
- foreach (SFarmer farmer in farmers)
+ foreach (Farmer farmer in farmers)
{
if (!(bool)((NetFieldBase<bool, NetBool>)farmer.swimming) && !farmer.isRidingHorse() && (Game1.currentLocation == null || !Game1.currentLocation.shouldShadowBeDrawnAboveBuildingsLayer(farmer.getTileLocation())))
{
@@ -943,7 +942,7 @@ namespace StardewModdingAPI.Framework
Game1.spriteBatch.Draw(Game1.shadowTexture, Game1.GlobalToLocal(Game1.viewport, actor.Position + new Vector2((float)(actor.Sprite.SpriteWidth * 4) / 2f, (float)(actor.GetBoundingBox().Height + (actor.IsMonster ? 0 : 12)))), new Microsoft.Xna.Framework.Rectangle?(Game1.shadowTexture.Bounds), Color.White, 0.0f, new Vector2((float)Game1.shadowTexture.Bounds.Center.X, (float)Game1.shadowTexture.Bounds.Center.Y), (float)(4.0 + (double)actor.yJumpOffset / 40.0) * (float)((NetFieldBase<float, NetFloat>)actor.scale), SpriteEffects.None, Math.Max(0.0f, (float)actor.getStandingY() / 10000f) - 1E-06f);
}
}
- foreach (SFarmer farmer in farmers)
+ foreach (Farmer farmer in farmers)
{
if (!(bool)((NetFieldBase<bool, NetBool>)farmer.swimming) && !farmer.isRidingHorse() && (Game1.currentLocation != null && Game1.currentLocation.shouldShadowBeDrawnAboveBuildingsLayer(farmer.getTileLocation())))
{
diff --git a/src/SMAPI/Framework/StateTracking/PlayerTracker.cs b/src/SMAPI/Framework/StateTracking/PlayerTracker.cs
index f6bfc98e..032705b7 100644
--- a/src/SMAPI/Framework/StateTracking/PlayerTracker.cs
+++ b/src/SMAPI/Framework/StateTracking/PlayerTracker.cs
@@ -6,7 +6,6 @@ using StardewModdingAPI.Events;
using StardewModdingAPI.Framework.StateTracking.FieldWatchers;
using StardewValley;
using StardewValley.Locations;
-using SFarmer = StardewValley.Farmer;
using SObject = StardewValley.Object;
namespace StardewModdingAPI.Framework.StateTracking
@@ -34,7 +33,7 @@ namespace StardewModdingAPI.Framework.StateTracking
** Accessors
*********/
/// <summary>The player being tracked.</summary>
- public SFarmer Player { get; }
+ public Farmer Player { get; }
/// <summary>The player's current location.</summary>
public IValueWatcher<GameLocation> LocationWatcher { get; }
@@ -54,7 +53,7 @@ namespace StardewModdingAPI.Framework.StateTracking
*********/
/// <summary>Construct an instance.</summary>
/// <param name="player">The player to track.</param>
- public PlayerTracker(SFarmer player)
+ public PlayerTracker(Farmer player)
{
// init player data
this.Player = player;