Fixed accidently ignoring StardewValley.

This commit is contained in:
2018-09-21 11:19:06 -07:00
parent 036e090b80
commit 065a88e310
2 changed files with 14 additions and 6 deletions

View File

@ -34,29 +34,28 @@ namespace UnifiedSaveCore.Framework
Game1.locations.Add(loc); Game1.locations.Add(loc);
} }
locations.Clear(); locations.Clear();
Game1.warpFarmer(oldLocation.name, (int)position.X*Game1.tileSize, (int)position.Y*Game1.tileSize, oldFacingDirection); //Game1.warpFarmer(oldLocation.name, (int)position.X*Game1.tileSize, (int)position.Y*Game1.tileSize, oldFacingDirection);
} }
//Removes all game locations for the game to save. //Removes all game locations for the game to save.
public void beforeSave() public void beforeSave()
{ {
UnifiedSaveCore.monitor.Log("BEFORE SAVE HAS BEEN CALLED!");
oldLocation = Game1.player.currentLocation; oldLocation = Game1.player.currentLocation;
position = Game1.player.position; position = Game1.player.position;
oldFacingDirection = Game1.player.facingDirection; oldFacingDirection = Game1.player.facingDirection;
Vector2 bed = Game1.player.mostRecentBed; Vector2 bed = Game1.player.mostRecentBed;
Game1.warpFarmer("Farmhouse", (int)bed.X, (int)bed.Y, 2); //Game1.warpFarmer("Farmhouse", (int)bed.X, (int)bed.Y, 2);
foreach (var loc in Game1.locations) foreach (var loc in Game1.locations)
{ {
UnifiedSaveCore.monitor.Log(loc.GetType().ToString()); //UnifiedSaveCore.monitor.Log(loc.GetType().ToString());
//ModCore.monitor.Log(); //ModCore.monitor.Log();
foreach (var type in UnifiedSaveCore.modTypes) foreach (var type in UnifiedSaveCore.modTypes)
{ {
if (loc.GetType().ToString() == type.ToString()) if (loc.GetType().ToString() == type.ToString())
{ {
UnifiedSaveCore.monitor.Log("Temporarily removing unexpected location type: " + loc.GetType().ToString()); UnifiedSaveCore.monitor.Log("Temporarily removing unexpected location:"+ loc.name+" type: " + loc.GetType().ToString());
locations.Add(loc); locations.Add(loc);
} }
} }

View File

@ -18,6 +18,15 @@ namespace UnifiedSaveCore
{ {
/// <summary> /// <summary>
/// Bare bones mod that interfaces events for saving. /// Bare bones mod that interfaces events for saving.
///
/// Must go from really big to really small.
/// I.E locations->characters->objects->items....
/// TODO:
/// Characters
/// Animals
/// Trees?
/// Chests
/// Items
/// </summary> /// </summary>
public class UnifiedSaveCore:Mod public class UnifiedSaveCore:Mod
{ {
@ -54,6 +63,7 @@ namespace UnifiedSaveCore
"System", "System",
"Mono", "Mono",
"StardewModdingAPI", "StardewModdingAPI",
"StardewValley",
"Lidgren", "Lidgren",
"Microsoft", "Microsoft",
"Monogames", "Monogames",
@ -63,7 +73,6 @@ namespace UnifiedSaveCore
"Steamworks", "Steamworks",
"GalaxyCSharp", "GalaxyCSharp",
"xTile", "xTile",
"StardewModdingAPI"
}; };
foreach (Assembly asm in assemblies) foreach (Assembly asm in assemblies)