Console commands, bug fixes, and more!
|
@ -190,7 +190,7 @@ namespace CustomNPCFramework.Framework.NPCS
|
||||||
this.Sprite.standAndFaceDirection(this.defaultFacingDirection);
|
this.Sprite.standAndFaceDirection(this.defaultFacingDirection);
|
||||||
|
|
||||||
if (this.isMarried())
|
if (this.isMarried())
|
||||||
this.marriageDuties(true);
|
this.marriageDuties();
|
||||||
bool flag = Utility.isFestivalDay(Game1.dayOfMonth, Game1.currentSeason);
|
bool flag = Utility.isFestivalDay(Game1.dayOfMonth, Game1.currentSeason);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -597,7 +597,7 @@ namespace CustomNPCFramework.Framework.NPCS
|
||||||
bool flag = Utility.isFestivalDay(dayOfMonth, Game1.currentSeason);
|
bool flag = Utility.isFestivalDay(dayOfMonth, Game1.currentSeason);
|
||||||
if (!this.isMarried())
|
if (!this.isMarried())
|
||||||
return;
|
return;
|
||||||
this.marriageDuties(true);
|
this.marriageDuties();
|
||||||
//Friendship f=Game1.player.GetSpouseFriendship();
|
//Friendship f=Game1.player.GetSpouseFriendship();
|
||||||
//this.daysMarried = this.daysMarried + 1;
|
//this.daysMarried = this.daysMarried + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using Microsoft.Xna.Framework;
|
using DebugSandBoxAndReferences.Framework.Commands;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
using StardewModdingAPI;
|
using StardewModdingAPI;
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
using System;
|
using System;
|
||||||
|
@ -9,7 +10,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DebugSandBoxAndReferences
|
namespace DebugSandBoxAndReferences
|
||||||
{
|
{
|
||||||
public class DebugSandBox
|
public class DebugSandBox : Mod
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Notes:
|
* Notes:
|
||||||
|
@ -17,13 +18,13 @@ namespace DebugSandBoxAndReferences
|
||||||
* Game1.MainPlayer will always target the host player.
|
* Game1.MainPlayer will always target the host player.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
public override void Entry(IModHelper helper)
|
||||||
|
|
||||||
public void Main()
|
|
||||||
{
|
{
|
||||||
|
TimeCommands.registerCommands(helper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is how you will iterate across a new dictionary in stardew valley
|
/// This is how you will iterate across a new dictionary in stardew valley
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -36,5 +37,7 @@ namespace DebugSandBoxAndReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Class1.cs" />
|
<Compile Include="Class1.cs" />
|
||||||
|
<Compile Include="Framework\Commands\TimeCommands.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
using StardewValley;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DebugSandBoxAndReferences.Framework.Commands
|
||||||
|
{
|
||||||
|
class TimeCommands
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Registers all time modifying commands.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="helper"></param>
|
||||||
|
public static void registerCommands(StardewModdingAPI.IModHelper helper)
|
||||||
|
{
|
||||||
|
helper.ConsoleCommands.Add("debug_world_settime", "Sets the in-game time to be any valid int. Allows for setting time to be early in the morning, i.e. 3 A.M", world_settime);
|
||||||
|
helper.ConsoleCommands.Add("debug_world_modifytimetick", "Sets the time interval in seconds between 10-minute in-game update ticks.", world_modifyTimeTick);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the time of day to the first argument passed into this command. This argument should be an integer value.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The name of the command.</param>
|
||||||
|
/// <param name="args">The parameters to pass in. Only the first one is read as that should be the integer valuve for time.</param>
|
||||||
|
public static void world_settime(string name, string[] args)
|
||||||
|
{
|
||||||
|
Game1.timeOfDay = Convert.ToInt32(args[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the time interval in seconds between 10-minute in-game update ticks.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <param name="args"></param>
|
||||||
|
public static void world_modifyTimeTick(string name, string[] args)
|
||||||
|
{
|
||||||
|
Game1.gameTimeInterval = Convert.ToInt32(args[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -79,27 +79,16 @@ namespace Omegasis.MoreRain
|
||||||
{
|
{
|
||||||
Game1.weatherForTomorrow = Game1.weather_rain;
|
Game1.weatherForTomorrow = Game1.weather_rain;
|
||||||
this.VerboseLog("It will rain tomorrow.");
|
this.VerboseLog("It will rain tomorrow.");
|
||||||
}
|
return;
|
||||||
else
|
|
||||||
{
|
|
||||||
Game1.weatherForTomorrow = Game1.weather_sunny;
|
|
||||||
this.VerboseLog("It will not rain tomorrow.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set storm
|
|
||||||
if (Game1.weatherForTomorrow == Game1.weather_rain)
|
|
||||||
{
|
|
||||||
if (chance <= this.Config.SpringThunderChance)
|
if (chance <= this.Config.SpringThunderChance)
|
||||||
{
|
{
|
||||||
Game1.weatherForTomorrow = Game1.weather_lightning;
|
Game1.weatherForTomorrow = Game1.weather_lightning;
|
||||||
this.VerboseLog("It will be stormy tomorrow.");
|
this.VerboseLog("It will be stormy tomorrow.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Game1.weatherForTomorrow = Game1.weather_rain;
|
|
||||||
this.VerboseLog("There will be no lightning tomorrow.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "summer":
|
case "summer":
|
||||||
|
@ -108,26 +97,15 @@ namespace Omegasis.MoreRain
|
||||||
{
|
{
|
||||||
Game1.weatherForTomorrow = Game1.weather_rain;
|
Game1.weatherForTomorrow = Game1.weather_rain;
|
||||||
this.VerboseLog("It will rain tomorrow.");
|
this.VerboseLog("It will rain tomorrow.");
|
||||||
}
|
return;
|
||||||
else
|
|
||||||
{
|
|
||||||
Game1.weatherForTomorrow = Game1.weather_sunny;
|
|
||||||
this.VerboseLog("It will not rain tomorrow.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set storm
|
|
||||||
if (Game1.weatherForTomorrow == Game1.weather_rain)
|
|
||||||
{
|
|
||||||
if (chance <= this.Config.SummerThunderChance)
|
if (chance <= this.Config.SummerThunderChance)
|
||||||
{
|
{
|
||||||
Game1.weatherForTomorrow = Game1.weather_lightning;
|
Game1.weatherForTomorrow = Game1.weather_lightning;
|
||||||
this.VerboseLog("It will be stormy tomorrow.");
|
this.VerboseLog("It will be stormy tomorrow.");
|
||||||
}
|
return;
|
||||||
else
|
|
||||||
{
|
|
||||||
Game1.weatherForTomorrow = Game1.weather_rain;
|
|
||||||
this.VerboseLog("There will be no lightning tomorrow.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -138,26 +116,14 @@ namespace Omegasis.MoreRain
|
||||||
{
|
{
|
||||||
Game1.weatherForTomorrow = Game1.weather_rain;
|
Game1.weatherForTomorrow = Game1.weather_rain;
|
||||||
this.VerboseLog("It will rain tomorrow.");
|
this.VerboseLog("It will rain tomorrow.");
|
||||||
}
|
return;
|
||||||
else
|
|
||||||
{
|
|
||||||
Game1.weatherForTomorrow = Game1.weather_sunny;
|
|
||||||
this.VerboseLog("It will not rain tomorrow.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set storm
|
|
||||||
if (Game1.weatherForTomorrow == Game1.weather_rain)
|
|
||||||
{
|
|
||||||
if (chance <= this.Config.FallThunderChance)
|
if (chance <= this.Config.FallThunderChance)
|
||||||
{
|
{
|
||||||
Game1.weatherForTomorrow = Game1.weather_lightning;
|
Game1.weatherForTomorrow = Game1.weather_lightning;
|
||||||
this.VerboseLog("It will be stormy tomorrow.");
|
this.VerboseLog("It will be stormy tomorrow.");
|
||||||
}
|
return;
|
||||||
else
|
|
||||||
{
|
|
||||||
Game1.weatherForTomorrow = Game1.weather_rain;
|
|
||||||
this.VerboseLog("There will be no lightning tomorrow.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"Name": "More Rain",
|
"Name": "More Rain",
|
||||||
"Author": "Alpha_Omegasis",
|
"Author": "Alpha_Omegasis",
|
||||||
"Version": "1.6.0",
|
"Version": "1.6.1",
|
||||||
"Description": "Change how much it rains in the game.",
|
"Description": "Change how much it rains in the game.",
|
||||||
"UniqueID": "Omegasis.MoreRain",
|
"UniqueID": "Omegasis.MoreRain",
|
||||||
"EntryDll": "MoreRain.dll",
|
"EntryDll": "MoreRain.dll",
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
using Netcode;
|
||||||
using Omegasis.NightOwl.Framework;
|
using Omegasis.NightOwl.Framework;
|
||||||
using StardewModdingAPI;
|
using StardewModdingAPI;
|
||||||
using StardewModdingAPI.Events;
|
using StardewModdingAPI.Events;
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
|
using StardewValley.Characters;
|
||||||
|
using StardewValley.Locations;
|
||||||
|
|
||||||
/*TODO:
|
/*TODO:
|
||||||
Issues:
|
Issues:
|
||||||
|
@ -60,7 +63,30 @@ namespace Omegasis.NightOwl
|
||||||
/// <summary>The player's health before they collapsed.</summary>
|
/// <summary>The player's health before they collapsed.</summary>
|
||||||
private int PreCollapseHealth;
|
private int PreCollapseHealth;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks if the player was bathing or not before passing out.
|
||||||
|
/// </summary>
|
||||||
|
private bool isBathing;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks if the player was in their swimsuit before passing out.
|
||||||
|
/// </summary>
|
||||||
|
private bool isInSwimSuit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The horse the player was riding before they collapsed.
|
||||||
|
/// </summary>
|
||||||
|
private Horse horse;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Determines whehther or not to rewarp the player's horse to them.
|
||||||
|
/// </summary>
|
||||||
|
private bool shouldWarpHorse;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event in the night taht simulates the earthquake event that should happen.
|
||||||
|
/// </summary>
|
||||||
|
StardewValley.Events.SoundInTheNightEvent eve;
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
|
@ -75,12 +101,30 @@ namespace Omegasis.NightOwl
|
||||||
TimeEvents.AfterDayStarted += this.TimeEvents_AfterDayStarted;
|
TimeEvents.AfterDayStarted += this.TimeEvents_AfterDayStarted;
|
||||||
SaveEvents.AfterLoad += this.SaveEvents_AfterLoad;
|
SaveEvents.AfterLoad += this.SaveEvents_AfterLoad;
|
||||||
GameEvents.FourthUpdateTick += this.GameEvents_FourthUpdateTick;
|
GameEvents.FourthUpdateTick += this.GameEvents_FourthUpdateTick;
|
||||||
|
GameEvents.UpdateTick += GameEvents_UpdateTick;
|
||||||
|
shouldWarpHorse = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Private methods
|
** Private methods
|
||||||
*********/
|
*********/
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the earthquake event.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void GameEvents_UpdateTick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (eve == null) return;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
eve.tickUpdate(Game1.currentGameTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>The method invoked every fourth game update (roughly 15 times per second).</summary>
|
/// <summary>The method invoked every fourth game update (roughly 15 times per second).</summary>
|
||||||
/// <param name="sender">The event sender.</param>
|
/// <param name="sender">The event sender.</param>
|
||||||
/// <param name="e">The event data.</param>
|
/// <param name="e">The event data.</param>
|
||||||
|
@ -140,6 +184,46 @@ namespace Omegasis.NightOwl
|
||||||
Game1.player.money = this.PreCollapseMoney;
|
Game1.player.money = this.PreCollapseMoney;
|
||||||
if (this.Config.KeepPositionAfterCollapse)
|
if (this.Config.KeepPositionAfterCollapse)
|
||||||
Game1.warpFarmer(this.PreCollapseMap, this.PreCollapseTile.X, this.PreCollapseTile.Y, false);
|
Game1.warpFarmer(this.PreCollapseMap, this.PreCollapseTile.X, this.PreCollapseTile.Y, false);
|
||||||
|
if (horse != null && shouldWarpHorse==true)
|
||||||
|
{
|
||||||
|
Game1.warpCharacter(horse, Game1.player.currentLocation, Game1.player.position);
|
||||||
|
shouldWarpHorse = false;
|
||||||
|
}
|
||||||
|
if (isInSwimSuit)
|
||||||
|
{
|
||||||
|
Game1.player.changeIntoSwimsuit();
|
||||||
|
}
|
||||||
|
if (isBathing)
|
||||||
|
{
|
||||||
|
Game1.player.swimming.Value = true;
|
||||||
|
}
|
||||||
|
//Reflction to ensure that the railroad becomes properly unblocked.
|
||||||
|
if (Game1.dayOfMonth == 1 && Game1.currentSeason == "summer" && Game1.year == 1)
|
||||||
|
{
|
||||||
|
Mountain mountain = (Mountain)Game1.getLocationFromName("Mountain");
|
||||||
|
|
||||||
|
var reflect2 = Helper.Reflection.GetField<NetBool>(mountain, "railroadAreaBlocked", true);
|
||||||
|
var netBool2 = reflect2.GetValue();
|
||||||
|
netBool2.Value = false;
|
||||||
|
reflect2.SetValue(netBool2);
|
||||||
|
|
||||||
|
|
||||||
|
var reflect3 = Helper.Reflection.GetField<Rectangle>(mountain, "railroadBlockRect", true);
|
||||||
|
var netBool3 = reflect3.GetValue();
|
||||||
|
netBool3 = new Rectangle(0, 0, 0, 0);
|
||||||
|
reflect3.SetValue(netBool3);
|
||||||
|
|
||||||
|
|
||||||
|
eve = new StardewValley.Events.SoundInTheNightEvent(4);
|
||||||
|
eve.setUp();
|
||||||
|
eve.makeChangesToLocation();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Game1.currentSeason!="spring" && Game1.year >= 1)
|
||||||
|
{
|
||||||
|
clearRailRoadBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete annoying charge messages (if only I could do this with mail IRL)
|
// delete annoying charge messages (if only I could do this with mail IRL)
|
||||||
|
@ -163,6 +247,25 @@ namespace Omegasis.NightOwl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If the user for this mod never gets the event that makes the railroad blok go away we will always force it to go away if they have met the conditions for it. I.E not being in spring of year 1.
|
||||||
|
/// </summary>
|
||||||
|
private void clearRailRoadBlock()
|
||||||
|
{
|
||||||
|
Mountain mountain = (Mountain)Game1.getLocationFromName("Mountain");
|
||||||
|
|
||||||
|
var reflect2 = Helper.Reflection.GetField<NetBool>(mountain, "railroadAreaBlocked", true);
|
||||||
|
var netBool2 = reflect2.GetValue();
|
||||||
|
netBool2.Value = false;
|
||||||
|
reflect2.SetValue(netBool2);
|
||||||
|
|
||||||
|
|
||||||
|
var reflect3 = Helper.Reflection.GetField<Rectangle>(mountain, "railroadBlockRect", true);
|
||||||
|
var netBool3 = reflect3.GetValue();
|
||||||
|
netBool3 = new Rectangle(0, 0, 0, 0);
|
||||||
|
reflect3.SetValue(netBool3);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>The method invoked when <see cref="Game1.timeOfDay"/> changes.</summary>
|
/// <summary>The method invoked when <see cref="Game1.timeOfDay"/> changes.</summary>
|
||||||
/// <param name="sender">The event sender.</param>
|
/// <param name="sender">The event sender.</param>
|
||||||
/// <param name="e">The event data.</param>
|
/// <param name="e">The event data.</param>
|
||||||
|
@ -193,6 +296,26 @@ namespace Omegasis.NightOwl
|
||||||
this.IsUpLate = true;
|
this.IsUpLate = true;
|
||||||
if (this.IsUpLate && Game1.timeOfDay == 600 && !this.JustCollapsed)
|
if (this.IsUpLate && Game1.timeOfDay == 600 && !this.JustCollapsed)
|
||||||
{
|
{
|
||||||
|
if (Game1.player.isRidingHorse())
|
||||||
|
{
|
||||||
|
foreach (var character in Game1.player.currentLocation.characters)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (character is Horse)
|
||||||
|
{
|
||||||
|
(character as Horse).dismount();
|
||||||
|
horse = (character as Horse);
|
||||||
|
shouldWarpHorse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this.JustCollapsed = true;
|
this.JustCollapsed = true;
|
||||||
|
|
||||||
this.ShouldResetPlayerAfterCollapseNow = true;
|
this.ShouldResetPlayerAfterCollapseNow = true;
|
||||||
|
@ -201,10 +324,16 @@ namespace Omegasis.NightOwl
|
||||||
this.PreCollapseStamina = Game1.player.stamina;
|
this.PreCollapseStamina = Game1.player.stamina;
|
||||||
this.PreCollapseHealth = Game1.player.health;
|
this.PreCollapseHealth = Game1.player.health;
|
||||||
this.PreCollapseMoney = Game1.player.money;
|
this.PreCollapseMoney = Game1.player.money;
|
||||||
|
this.isInSwimSuit = Game1.player.bathingClothes.Value;
|
||||||
|
this.isBathing = Game1.player.swimming.Value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (Game1.currentMinigame != null)
|
if (Game1.currentMinigame != null)
|
||||||
Game1.currentMinigame = null;
|
Game1.currentMinigame = null;
|
||||||
Game1.farmerShouldPassOut = true;
|
Game1.farmerShouldPassOut = true;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -6,6 +6,7 @@ using StardewModdingAPI;
|
||||||
using StardewModdingAPI.Events;
|
using StardewModdingAPI.Events;
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
using StardewValley.Characters;
|
using StardewValley.Characters;
|
||||||
|
using StardewValley.Monsters;
|
||||||
|
|
||||||
namespace Omegasis.SaveAnywhere
|
namespace Omegasis.SaveAnywhere
|
||||||
{
|
{
|
||||||
|
@ -40,6 +41,10 @@ namespace Omegasis.SaveAnywhere
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IMonitor ModMonitor;
|
public static IMonitor ModMonitor;
|
||||||
|
|
||||||
|
private List<Monster> monsters;
|
||||||
|
|
||||||
|
private bool customMenuOpen;
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
@ -56,11 +61,16 @@ namespace Omegasis.SaveAnywhere
|
||||||
ControlEvents.KeyPressed += this.ControlEvents_KeyPressed;
|
ControlEvents.KeyPressed += this.ControlEvents_KeyPressed;
|
||||||
GameEvents.UpdateTick += this.GameEvents_UpdateTick;
|
GameEvents.UpdateTick += this.GameEvents_UpdateTick;
|
||||||
TimeEvents.AfterDayStarted += this.TimeEvents_AfterDayStarted;
|
TimeEvents.AfterDayStarted += this.TimeEvents_AfterDayStarted;
|
||||||
|
|
||||||
ModHelper = helper;
|
ModHelper = helper;
|
||||||
ModMonitor = Monitor;
|
ModMonitor = Monitor;
|
||||||
|
customMenuOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Private methods
|
** Private methods
|
||||||
*********/
|
*********/
|
||||||
|
@ -116,6 +126,60 @@ namespace Omegasis.SaveAnywhere
|
||||||
this.ShouldResetSchedules = false;
|
this.ShouldResetSchedules = false;
|
||||||
this.ApplySchedules();
|
this.ApplySchedules();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Game1.activeClickableMenu == null && this.customMenuOpen == false) return;
|
||||||
|
if(Game1.activeClickableMenu==null && this.customMenuOpen == true)
|
||||||
|
{
|
||||||
|
restoreMonsters();
|
||||||
|
this.customMenuOpen = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (Game1.activeClickableMenu != null)
|
||||||
|
{
|
||||||
|
if (Game1.activeClickableMenu.GetType() == typeof(NewSaveGameMenu))
|
||||||
|
{
|
||||||
|
this.customMenuOpen = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Saves all monsters from the game world.
|
||||||
|
/// </summary>
|
||||||
|
private void cleanMonsters()
|
||||||
|
{
|
||||||
|
monsters = new List<Monster>();
|
||||||
|
|
||||||
|
foreach (var monster in Game1.player.currentLocation.characters)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (monster is Monster)
|
||||||
|
{
|
||||||
|
monsters.Add(monster as Monster);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var monster in this.monsters)
|
||||||
|
{
|
||||||
|
Game1.player.currentLocation.characters.Remove(monster);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds all saved monster back into the game world.
|
||||||
|
/// </summary>
|
||||||
|
private void restoreMonsters()
|
||||||
|
{
|
||||||
|
foreach (var monster in this.monsters)
|
||||||
|
{
|
||||||
|
Game1.player.currentLocation.characters.Add(monster);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>The method invoked after a new day starts.</summary>
|
/// <summary>The method invoked after a new day starts.</summary>
|
||||||
|
@ -150,6 +214,7 @@ namespace Omegasis.SaveAnywhere
|
||||||
{
|
{
|
||||||
if (Game1.client==null)
|
if (Game1.client==null)
|
||||||
{
|
{
|
||||||
|
cleanMonsters();
|
||||||
// validate: community center Junimos can't be saved
|
// validate: community center Junimos can't be saved
|
||||||
|
|
||||||
if (Game1.player.currentLocation.getCharacters().OfType<Junimo>().Any())
|
if (Game1.player.currentLocation.getCharacters().OfType<Junimo>().Any())
|
||||||
|
@ -189,7 +254,7 @@ namespace Omegasis.SaveAnywhere
|
||||||
string scheduleData;
|
string scheduleData;
|
||||||
if (!this.NpcSchedules.TryGetValue(npc.Name, out scheduleData) || string.IsNullOrEmpty(scheduleData))
|
if (!this.NpcSchedules.TryGetValue(npc.Name, out scheduleData) || string.IsNullOrEmpty(scheduleData))
|
||||||
{
|
{
|
||||||
this.Monitor.Log("THIS IS AWKWARD");
|
//this.Monitor.Log("THIS IS AWKWARD");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"Name": "Save Anywhere",
|
"Name": "Save Anywhere",
|
||||||
"Author": "Alpha_Omegasis",
|
"Author": "Alpha_Omegasis",
|
||||||
"Version": "2.7.0",
|
"Version": "2.7.2",
|
||||||
"Description": "Lets you save almost anywhere.",
|
"Description": "Lets you save almost anywhere.",
|
||||||
"UniqueID": "Omegasis.SaveAnywhere",
|
"UniqueID": "Omegasis.SaveAnywhere",
|
||||||
"EntryDll": "SaveAnywhere.dll",
|
"EntryDll": "SaveAnywhere.dll",
|
||||||
|
|
|
@ -1061,6 +1061,7 @@ namespace StardewSymphonyRemastered.Framework.Menus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.selectAlbum(ok);
|
this.selectAlbum(ok);
|
||||||
|
this.updateFancyButtons();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 651 B |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 274 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 248 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 253 B |
After Width: | Height: | Size: 240 B |
After Width: | Height: | Size: 249 B |
After Width: | Height: | Size: 248 B |
After Width: | Height: | Size: 244 B |
After Width: | Height: | Size: 230 B |