From 3ed8072436cbe76054837427d43b651165cf20ce Mon Sep 17 00:00:00 2001 From: Date: Sun, 20 Aug 2017 10:38:59 -0700 Subject: [PATCH] Fixed glitch with Save Anywhere where saving in a building on a farm wouldn't warp you correctly back to the location when loading again. --- GeneralMods/AutoSpeed/AutoSpeed.csproj | 6 ++-- GeneralMods/AutoSpeed/packages.config | 2 +- .../BillboardAnywhere.csproj | 8 +++-- GeneralMods/BillboardAnywhere/packages.config | 2 +- .../BuildEndurance/BuildEndurance.csproj | 6 ++-- GeneralMods/BuildEndurance/packages.config | 2 +- GeneralMods/BuildHealth/BuildHealth.csproj | 6 ++-- GeneralMods/BuildHealth/packages.config | 2 +- .../BuyBackCollectables.csproj | 8 +++-- .../BuyBackCollectables/packages.config | 2 +- .../CustomShopsRedux/CustomShopsRedux.csproj | 6 ++-- GeneralMods/CustomShopsRedux/packages.config | 2 +- .../DailyQuestAnywhere.csproj | 8 +++-- .../DailyQuestAnywhere/packages.config | 2 +- .../Fall28SnowDay/Fall28SnowDay.csproj | 8 +++-- GeneralMods/Fall28SnowDay/packages.config | 2 +- .../HappyBirthday/HappyBirthday.csproj | 8 +++-- GeneralMods/HappyBirthday/packages.config | 2 +- GeneralMods/MoreRain/MoreRain.csproj | 6 ++-- GeneralMods/MoreRain/packages.config | 2 +- .../MuseumRearranger/MuseumRearranger.csproj | 6 ++-- GeneralMods/MuseumRearranger/packages.config | 2 +- GeneralMods/NightOwl/NightOwl.csproj | 8 +++-- GeneralMods/NightOwl/packages.config | 2 +- GeneralMods/NoMorePets/NoMorePets.csproj | 8 +++-- GeneralMods/NoMorePets/packages.config | 2 +- .../SaveAnywhere/Framework/SaveManager.cs | 7 +++-- GeneralMods/SaveAnywhere/SaveAnywhere.csproj | 8 +++-- GeneralMods/SaveAnywhere/packages.config | 2 +- GeneralMods/SaveBackup/SaveBackup.csproj | 6 ++-- GeneralMods/SaveBackup/packages.config | 2 +- .../StardewSymphony/StardewSymphony.csproj | 8 +++-- GeneralMods/StardewSymphony/packages.config | 2 +- GeneralMods/TimeFreeze/TimeFreeze.csproj | 8 +++-- GeneralMods/TimeFreeze/packages.config | 2 +- .../Aesthetics/Draw/ThingsToDraw.cs | 31 ++++++++++++++++++- Revitalize/Revitalize/Revitalize/Class1.cs | 14 +++++++++ .../Objects/Decorations/Decoration.cs | 4 +-- .../Objects/Decorations/ModularDecoration.cs | 1 + .../Revitalize/Objects/Decorations/Table.cs | 4 +-- .../Revitalize/Revitalize/Resources/Lists.cs | 2 ++ 41 files changed, 150 insertions(+), 69 deletions(-) diff --git a/GeneralMods/AutoSpeed/AutoSpeed.csproj b/GeneralMods/AutoSpeed/AutoSpeed.csproj index 7fce89f1..da06e2d1 100644 --- a/GeneralMods/AutoSpeed/AutoSpeed.csproj +++ b/GeneralMods/AutoSpeed/AutoSpeed.csproj @@ -11,6 +11,8 @@ AutoSpeed v4.5 512 + + true @@ -48,11 +50,11 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/AutoSpeed/packages.config b/GeneralMods/AutoSpeed/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/AutoSpeed/packages.config +++ b/GeneralMods/AutoSpeed/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/BillboardAnywhere/BillboardAnywhere.csproj b/GeneralMods/BillboardAnywhere/BillboardAnywhere.csproj index f05db33b..cc720f27 100644 --- a/GeneralMods/BillboardAnywhere/BillboardAnywhere.csproj +++ b/GeneralMods/BillboardAnywhere/BillboardAnywhere.csproj @@ -11,6 +11,8 @@ BillboardAnywhere v4.5 512 + + true @@ -43,18 +45,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/BillboardAnywhere/packages.config b/GeneralMods/BillboardAnywhere/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/BillboardAnywhere/packages.config +++ b/GeneralMods/BillboardAnywhere/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/BuildEndurance/BuildEndurance.csproj b/GeneralMods/BuildEndurance/BuildEndurance.csproj index 611d9fba..4e5e974d 100644 --- a/GeneralMods/BuildEndurance/BuildEndurance.csproj +++ b/GeneralMods/BuildEndurance/BuildEndurance.csproj @@ -11,6 +11,8 @@ BuildEndurance v4.5 512 + + true @@ -49,11 +51,11 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/BuildEndurance/packages.config b/GeneralMods/BuildEndurance/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/BuildEndurance/packages.config +++ b/GeneralMods/BuildEndurance/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/BuildHealth/BuildHealth.csproj b/GeneralMods/BuildHealth/BuildHealth.csproj index 2cd434dc..9bf9952e 100644 --- a/GeneralMods/BuildHealth/BuildHealth.csproj +++ b/GeneralMods/BuildHealth/BuildHealth.csproj @@ -11,6 +11,8 @@ BuildHealth v4.5 512 + + true @@ -49,11 +51,11 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/BuildHealth/packages.config b/GeneralMods/BuildHealth/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/BuildHealth/packages.config +++ b/GeneralMods/BuildHealth/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/BuyBackCollectables/BuyBackCollectables.csproj b/GeneralMods/BuyBackCollectables/BuyBackCollectables.csproj index 9564b090..6928ce80 100644 --- a/GeneralMods/BuyBackCollectables/BuyBackCollectables.csproj +++ b/GeneralMods/BuyBackCollectables/BuyBackCollectables.csproj @@ -11,6 +11,8 @@ BuyBackCollectables v4.5 512 + + true @@ -44,18 +46,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/BuyBackCollectables/packages.config b/GeneralMods/BuyBackCollectables/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/BuyBackCollectables/packages.config +++ b/GeneralMods/BuyBackCollectables/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/CustomShopsRedux/CustomShopsRedux.csproj b/GeneralMods/CustomShopsRedux/CustomShopsRedux.csproj index 4e752f99..df9854d7 100644 --- a/GeneralMods/CustomShopsRedux/CustomShopsRedux.csproj +++ b/GeneralMods/CustomShopsRedux/CustomShopsRedux.csproj @@ -11,6 +11,8 @@ CustomShopsRedux v4.5 512 + + true @@ -59,11 +61,11 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/CustomShopsRedux/packages.config b/GeneralMods/CustomShopsRedux/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/CustomShopsRedux/packages.config +++ b/GeneralMods/CustomShopsRedux/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/DailyQuestAnywhere/DailyQuestAnywhere.csproj b/GeneralMods/DailyQuestAnywhere/DailyQuestAnywhere.csproj index 90e083b7..fc5022ba 100644 --- a/GeneralMods/DailyQuestAnywhere/DailyQuestAnywhere.csproj +++ b/GeneralMods/DailyQuestAnywhere/DailyQuestAnywhere.csproj @@ -11,6 +11,8 @@ DailyQuestAnywhere v4.5 512 + + true @@ -43,18 +45,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/DailyQuestAnywhere/packages.config b/GeneralMods/DailyQuestAnywhere/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/DailyQuestAnywhere/packages.config +++ b/GeneralMods/DailyQuestAnywhere/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/Fall28SnowDay/Fall28SnowDay.csproj b/GeneralMods/Fall28SnowDay/Fall28SnowDay.csproj index 94da970f..897d770e 100644 --- a/GeneralMods/Fall28SnowDay/Fall28SnowDay.csproj +++ b/GeneralMods/Fall28SnowDay/Fall28SnowDay.csproj @@ -11,6 +11,8 @@ Fall28SnowDay v4.5 512 + + true @@ -42,18 +44,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/Fall28SnowDay/packages.config b/GeneralMods/Fall28SnowDay/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/Fall28SnowDay/packages.config +++ b/GeneralMods/Fall28SnowDay/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/HappyBirthday/HappyBirthday.csproj b/GeneralMods/HappyBirthday/HappyBirthday.csproj index a12d0621..e9d71356 100644 --- a/GeneralMods/HappyBirthday/HappyBirthday.csproj +++ b/GeneralMods/HappyBirthday/HappyBirthday.csproj @@ -11,6 +11,8 @@ HappyBirthday v4.5 512 + + true @@ -58,18 +60,18 @@ PreserveNewest - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/HappyBirthday/packages.config b/GeneralMods/HappyBirthday/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/HappyBirthday/packages.config +++ b/GeneralMods/HappyBirthday/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/MoreRain/MoreRain.csproj b/GeneralMods/MoreRain/MoreRain.csproj index cf14ef9e..cbb849fe 100644 --- a/GeneralMods/MoreRain/MoreRain.csproj +++ b/GeneralMods/MoreRain/MoreRain.csproj @@ -11,6 +11,8 @@ MoreRain v4.5 512 + + true @@ -48,11 +50,11 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/MoreRain/packages.config b/GeneralMods/MoreRain/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/MoreRain/packages.config +++ b/GeneralMods/MoreRain/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/MuseumRearranger/MuseumRearranger.csproj b/GeneralMods/MuseumRearranger/MuseumRearranger.csproj index ecaee172..37029528 100644 --- a/GeneralMods/MuseumRearranger/MuseumRearranger.csproj +++ b/GeneralMods/MuseumRearranger/MuseumRearranger.csproj @@ -11,6 +11,8 @@ MuseumRearranger v4.5 512 + + true @@ -51,11 +53,11 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/MuseumRearranger/packages.config b/GeneralMods/MuseumRearranger/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/MuseumRearranger/packages.config +++ b/GeneralMods/MuseumRearranger/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/NightOwl/NightOwl.csproj b/GeneralMods/NightOwl/NightOwl.csproj index 828a89a9..f8dde4db 100644 --- a/GeneralMods/NightOwl/NightOwl.csproj +++ b/GeneralMods/NightOwl/NightOwl.csproj @@ -11,6 +11,8 @@ NightOwl v4.5 512 + + true @@ -46,18 +48,18 @@ PreserveNewest - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/NightOwl/packages.config b/GeneralMods/NightOwl/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/NightOwl/packages.config +++ b/GeneralMods/NightOwl/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/NoMorePets/NoMorePets.csproj b/GeneralMods/NoMorePets/NoMorePets.csproj index a0fec869..769d7b51 100644 --- a/GeneralMods/NoMorePets/NoMorePets.csproj +++ b/GeneralMods/NoMorePets/NoMorePets.csproj @@ -11,6 +11,8 @@ NoMorePets v4.5 512 + + true @@ -42,18 +44,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/NoMorePets/packages.config b/GeneralMods/NoMorePets/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/NoMorePets/packages.config +++ b/GeneralMods/NoMorePets/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/SaveAnywhere/Framework/SaveManager.cs b/GeneralMods/SaveAnywhere/Framework/SaveManager.cs index 7b29e70e..057ae16e 100644 --- a/GeneralMods/SaveAnywhere/Framework/SaveManager.cs +++ b/GeneralMods/SaveAnywhere/Framework/SaveManager.cs @@ -121,7 +121,8 @@ namespace Omegasis.SaveAnywhere.Framework { var player = Game1.player; string name = player.name; - string map = player.currentLocation.name; + string map = player.currentLocation.uniqueName; //Try to get a unique name for the location and if we can't we are going to default to the actual name of the map. + if (map == ""|| map==null) map = player.currentLocation.name; //This is used to account for maps that share the same name but have a unique ID such as Coops, Barns and Sheds. Point tile = player.getTileLocationPoint(); int facingDirection = player.facingDirection; @@ -155,11 +156,11 @@ namespace Omegasis.SaveAnywhere.Framework if (data != null) { Game1.player.previousLocationName = Game1.player.currentLocation.name; - Game1.locationAfterWarp = Game1.getLocationFromName(data.Name); + Game1.locationAfterWarp = Game1.getLocationFromName(data.Map); Game1.xLocationAfterWarp = data.X; Game1.yLocationAfterWarp = data.Y; Game1.facingDirectionAfterWarp = data.FacingDirection; - Game1.fadeScreenToBlack(); + Game1.fadeScreenToBlack(); Game1.warpFarmer(data.Map, data.X, data.Y, false); Game1.player.faceDirection(data.FacingDirection); } diff --git a/GeneralMods/SaveAnywhere/SaveAnywhere.csproj b/GeneralMods/SaveAnywhere/SaveAnywhere.csproj index e832d942..7a971bbf 100644 --- a/GeneralMods/SaveAnywhere/SaveAnywhere.csproj +++ b/GeneralMods/SaveAnywhere/SaveAnywhere.csproj @@ -11,6 +11,8 @@ SaveAnywhere v4.5.2 512 + + true @@ -49,18 +51,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/SaveAnywhere/packages.config b/GeneralMods/SaveAnywhere/packages.config index 99f50ea3..6ee36dc1 100644 --- a/GeneralMods/SaveAnywhere/packages.config +++ b/GeneralMods/SaveAnywhere/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/SaveBackup/SaveBackup.csproj b/GeneralMods/SaveBackup/SaveBackup.csproj index 4989f701..62457496 100644 --- a/GeneralMods/SaveBackup/SaveBackup.csproj +++ b/GeneralMods/SaveBackup/SaveBackup.csproj @@ -11,6 +11,8 @@ SaveBackup v4.5 512 + + true @@ -50,11 +52,11 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/SaveBackup/packages.config b/GeneralMods/SaveBackup/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/SaveBackup/packages.config +++ b/GeneralMods/SaveBackup/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/StardewSymphony/StardewSymphony.csproj b/GeneralMods/StardewSymphony/StardewSymphony.csproj index b91e0ba4..90d63c8f 100644 --- a/GeneralMods/StardewSymphony/StardewSymphony.csproj +++ b/GeneralMods/StardewSymphony/StardewSymphony.csproj @@ -11,6 +11,8 @@ StardewSymphony v4.5 512 + + true @@ -46,18 +48,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/StardewSymphony/packages.config b/GeneralMods/StardewSymphony/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/StardewSymphony/packages.config +++ b/GeneralMods/StardewSymphony/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GeneralMods/TimeFreeze/TimeFreeze.csproj b/GeneralMods/TimeFreeze/TimeFreeze.csproj index f8bd1977..4cfdbc5d 100644 --- a/GeneralMods/TimeFreeze/TimeFreeze.csproj +++ b/GeneralMods/TimeFreeze/TimeFreeze.csproj @@ -11,6 +11,8 @@ TimeFreeze v4.5 512 + + true @@ -43,18 +45,18 @@ - + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/GeneralMods/TimeFreeze/packages.config b/GeneralMods/TimeFreeze/packages.config index 058d0838..5a0c3d1f 100644 --- a/GeneralMods/TimeFreeze/packages.config +++ b/GeneralMods/TimeFreeze/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Revitalize/Revitalize/Revitalize/Aesthetics/Draw/ThingsToDraw.cs b/Revitalize/Revitalize/Revitalize/Aesthetics/Draw/ThingsToDraw.cs index 71dfdc98..b6475503 100644 --- a/Revitalize/Revitalize/Revitalize/Aesthetics/Draw/ThingsToDraw.cs +++ b/Revitalize/Revitalize/Revitalize/Aesthetics/Draw/ThingsToDraw.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; - +using Revitalize.Objects; +using Revitalize.Resources; using StardewModdingAPI; using StardewValley; using System; @@ -19,6 +20,34 @@ namespace Revitalize.Draw Magic.MagicMonitor.drawMagicMeter(); } + public static void drawAllObjects() + { + foreach (var v in Lists.DecorationsToDraw) + { + if (Game1.player.currentLocation == v.thisLocation) + { + v.draw(Game1.spriteBatch,(int)v.tileLocation.X,(int)v.tileLocation.Y); + } + } + } + + public static void drawAllFurniture() + { + + //int i = 0; + SpriteBatch b = Game1.spriteBatch; + b.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, (DepthStencilState)null, (RasterizerState)null); + foreach (var v in Lists.DecorationsToDraw) + { + //Log.Async(i); + //i++; + if (v is ModularDecoration && v.thisLocation==Game1.player.currentLocation) + { + if (v.boundingBox.Height == 0 && v.boundingBox.Width == 0) (v as ModularDecoration).drawInfront(b, (int)v.tileLocation.X, (int)v.tileLocation.Y); + } + } + b.End(); + } } } diff --git a/Revitalize/Revitalize/Revitalize/Class1.cs b/Revitalize/Revitalize/Revitalize/Class1.cs index 0da30192..b189b8a7 100644 --- a/Revitalize/Revitalize/Revitalize/Class1.cs +++ b/Revitalize/Revitalize/Revitalize/Class1.cs @@ -29,6 +29,7 @@ using System.Reflection; using StardewValley.Menus; using Revitalize.Resources.DataNodes; using Revitalize.Persistence; +using Microsoft.Xna.Framework.Graphics; namespace Revitalize { @@ -93,6 +94,7 @@ namespace Revitalize SetUp.DuringEntry(); } + /// /// Draw my weather debris system. /// @@ -112,6 +114,7 @@ namespace Revitalize { if (gameLoaded == true) { + ThingsToDraw.drawAllFurniture(); ThingsToDraw.drawAllHuds(); } } @@ -145,11 +148,14 @@ namespace Revitalize private void GameEvents_UpdateTick(object sender, EventArgs e) { + if (Game1.activeClickableMenu != null) Monitor.Log(Game1.activeClickableMenu.ToString()); if (Game1.player.isMoving() == true && hasLoadedTerrainList == false) { Lists.loadAllListsAfterMovement(); Util.WaterAllCropsInAllLocations(); } + + // this.checkForCollision(); WeatherDebrisSystem.update(); if (Utilities.MapUtilities.isEditingMap == true) @@ -206,6 +212,11 @@ namespace Revitalize } + /// + /// Don't ever use this. It was a failed attempt. + /// + /// + /// public void MapWipe(object sender, EventArgs e) { @@ -325,6 +336,9 @@ namespace Revitalize Dictionaries.spriteFontList.TryGetValue("0", out font); objShopList.Add(new TestMachine(3, Vector2.Zero, Util.invertColor(LightColors.White), LightColors.White, false, 9, true)); objShopList.Add(new SpriteFontObject(0, Vector2.Zero, font.path, Color.White)); + objShopList.Add(new Decoration(1391, Vector2.Zero)); + objShopList.Add(new ModularDecoration(1120, Vector2.Zero,"VanillaFurniture")); + objShopList.Add(new ModularDecoration(0, Vector2.Zero, "VanillaFurniture")); objShopList.Add(new Magic.Alchemy.Objects.BagofHolding(0, Vector2.Zero, new List>() { new List() diff --git a/Revitalize/Revitalize/Revitalize/Objects/Decorations/Decoration.cs b/Revitalize/Revitalize/Revitalize/Objects/Decorations/Decoration.cs index 3f7b8205..e69b3bdf 100644 --- a/Revitalize/Revitalize/Revitalize/Objects/Decorations/Decoration.cs +++ b/Revitalize/Revitalize/Revitalize/Objects/Decorations/Decoration.cs @@ -402,7 +402,7 @@ namespace Revitalize.Objects environment.lightGlows.Remove(new Vector2((float)(this.boundingBox.X + Game1.tileSize / 2), (float)(this.boundingBox.Y + Game1.tileSize))); this.lightGlowAdded = false; } - Lists.DecorationsToDraw.Remove(this); + //Lists.DecorationsToDraw.Remove(this); base.performRemoveAction(tileLocation, environment); } @@ -662,7 +662,7 @@ namespace Revitalize.Objects } } this.updateDrawPosition(); - Lists.DecorationsToDraw.Add(this); + // Lists.DecorationsToDraw.Add(this); return Util.placementAction(this,location, x, y, who); // Game1.showRedMessage("Can only be placed in House"); diff --git a/Revitalize/Revitalize/Revitalize/Objects/Decorations/ModularDecoration.cs b/Revitalize/Revitalize/Revitalize/Objects/Decorations/ModularDecoration.cs index c22e4ba7..79e23451 100644 --- a/Revitalize/Revitalize/Revitalize/Objects/Decorations/ModularDecoration.cs +++ b/Revitalize/Revitalize/Revitalize/Objects/Decorations/ModularDecoration.cs @@ -846,6 +846,7 @@ namespace Revitalize.Objects } } */ + if (f == true) Lists.DecorationsToDraw.Add(this); return f; // Game1.showRedMessage("Can only be placed in House"); // return false; diff --git a/Revitalize/Revitalize/Revitalize/Objects/Decorations/Table.cs b/Revitalize/Revitalize/Revitalize/Objects/Decorations/Table.cs index 0bb85712..e644cf41 100644 --- a/Revitalize/Revitalize/Revitalize/Objects/Decorations/Table.cs +++ b/Revitalize/Revitalize/Revitalize/Objects/Decorations/Table.cs @@ -468,7 +468,7 @@ namespace Revitalize.Objects environment.lightGlows.Remove(new Vector2((float)(this.boundingBox.X + Game1.tileSize / 2), (float)(this.boundingBox.Y + Game1.tileSize))); this.lightGlowAdded = false; } - Lists.DecorationsToDraw.Remove(this); + // Lists.DecorationsToDraw.Remove(this); base.performRemoveAction(tileLocation, environment); } @@ -728,7 +728,7 @@ namespace Revitalize.Objects } } this.updateDrawPosition(); - Lists.DecorationsToDraw.Add(this); + //Lists.DecorationsToDraw.Add(this); return Util.placementAction(this, location, x, y, who); // Game1.showRedMessage("Can only be placed in House"); diff --git a/Revitalize/Revitalize/Revitalize/Resources/Lists.cs b/Revitalize/Revitalize/Revitalize/Resources/Lists.cs index a03ffbc3..c7a0ab8e 100644 --- a/Revitalize/Revitalize/Revitalize/Resources/Lists.cs +++ b/Revitalize/Revitalize/Revitalize/Resources/Lists.cs @@ -16,6 +16,7 @@ namespace Revitalize.Resources public static List trackedTerrainFeaturesDummyList; public static List trackedObjectList; + public static List DecorationsToDraw; public static List serializerTypes; public static List saplingNames; @@ -27,6 +28,7 @@ namespace Revitalize.Resources trackedObjectList = new List(); WeatherDebrisSystem.thisWeatherDebris = new List(); + DecorationsToDraw = new List(); } public static void loadAllListsAfterMovement()