diff --git a/GeneralMods/Revitalize/Framework/Graphics/TextureManager.cs b/GeneralMods/Revitalize/Framework/Graphics/TextureManager.cs
index 711e4ce9..caade4d7 100644
--- a/GeneralMods/Revitalize/Framework/Graphics/TextureManager.cs
+++ b/GeneralMods/Revitalize/Framework/Graphics/TextureManager.cs
@@ -33,5 +33,12 @@ namespace Revitalize.Framework.Graphics
}
throw new Exception("Error, texture name not found!!!");
}
+
+ public static void addTexture(string managerName, string textureName, Texture2DExtended Texture)
+ {
+ Texture.texture.Name = managerName + '.' + textureName;
+ TextureManagers[managerName].addTexture(textureName, Texture);
+ }
+
}
}
diff --git a/GeneralMods/Revitalize/Framework/Illuminate/LightManager.cs b/GeneralMods/Revitalize/Framework/Illuminate/LightManager.cs
index f963d00d..c08fa902 100644
--- a/GeneralMods/Revitalize/Framework/Illuminate/LightManager.cs
+++ b/GeneralMods/Revitalize/Framework/Illuminate/LightManager.cs
@@ -38,7 +38,7 @@ namespace Revitalize.Framework.Illuminate
this.lights.TryGetValue(IdKey, out LightSource light);
Game1.currentLightSources.Remove(light);
- location.sharedLights.Remove(light);
+ location.sharedLights.Remove((int)IdKey.X * 1000000 + (int)IdKey.Y);
return true;
}
@@ -61,7 +61,7 @@ namespace Revitalize.Framework.Illuminate
Game1.showRedMessage("TURN ON!");
Game1.currentLightSources.Add(light);
- location.sharedLights.Add(light);
+ location.sharedLights.Add((int)IdKey.X*10000+(int)IdKey.Y,light);
this.repositionLight(light, IdKey, gameObject);
return true;
}
diff --git a/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs b/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs
index 840e1337..6ec9252d 100644
--- a/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs
+++ b/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs
@@ -5,6 +5,7 @@ using PyTK.CustomElementHandler;
using Revitalize.Framework.Graphics.Animations;
using Revitalize.Framework.Illuminate;
using Revitalize.Framework.Utilities;
+using StardewValley;
namespace Revitalize.Framework.Objects
{
@@ -22,6 +23,7 @@ namespace Revitalize.Framework.Objects
public bool canBeSetOutdoors;
public bool isLamp;
+
public AnimationManager animationManager;
public Vector2 drawPosition;
@@ -54,10 +56,12 @@ namespace Revitalize.Framework.Objects
this.lightManager = new LightManager();
this.facingDirection = Enums.Direction.Down;
+
}
public BasicItemInformation(string name, string description, string categoryName, Color categoryColor,int edibility, int fragility, bool isLamp, int price, Vector2 TileLocation, bool canBeSetOutdoors, bool canBeSetIndoors, string id, string data, Texture2D texture, Color color, int tileIndex, bool bigCraftable, Type type, CraftingData craftingData, AnimationManager animationManager, Color drawColor, bool ignoreBoundingBox, InventoryManager Inventory, LightManager Lights) : base(id, data, texture, color, tileIndex, bigCraftable, type, craftingData)
{
+
this.name = name;
this.description = description;
this.categoryName = categoryName;
@@ -93,5 +97,7 @@ namespace Revitalize.Framework.Objects
{
this.data = $"{this.name}/{this.price}/{this.edibility}/Crafting -9/{this.description}/{this.canBeSetOutdoors}/{this.canBeSetIndoors}/{this.fragility}/{this.isLamp}/{this.name}";
}
+
+
}
}
diff --git a/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs b/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs
index dcfed18e..d647a6d7 100644
--- a/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs
+++ b/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
+using Newtonsoft.Json;
using PyTK.CustomElementHandler;
using Revitalize.Framework.Graphics.Animations;
using StardewValley;
@@ -19,15 +20,21 @@ namespace Revitalize.Framework.Objects
public class CustomObject : PySObject
{
public string id;
+
+
public BasicItemInformation info;
public GameLocation location;
+
/// The animation manager.
public AnimationManager animationManager => this.info.animationManager;
/// The display texture for this object.
+ [JsonIgnore]
public Texture2D displayTexture => this.animationManager.getTexture();
+
+
/// Empty constructor.
public CustomObject() { }
diff --git a/GeneralMods/Revitalize/Framework/Objects/MultiTiledComponent.cs b/GeneralMods/Revitalize/Framework/Objects/MultiTiledComponent.cs
index 0a000769..a5f366c8 100644
--- a/GeneralMods/Revitalize/Framework/Objects/MultiTiledComponent.cs
+++ b/GeneralMods/Revitalize/Framework/Objects/MultiTiledComponent.cs
@@ -111,28 +111,41 @@ namespace Revitalize.Framework.Objects
Vector2 offsetKey = new Vector2(Convert.ToInt32(additionalSaveData["offsetKeyX"]), Convert.ToInt32(additionalSaveData["offsetKeyY"]));
- if (offsetKey.X == 0 && offsetKey.Y == 0)
- {
- Revitalize.ModCore.log(recreateParentId(additionalSaveData["id"]) + ".Object");
- CustomObject obj=(CustomObject)(Revitalize.ModCore.customObjects[recreateParentId(additionalSaveData["id"])+".Object"].getOne());
- obj.Stack =Convert.ToInt32( additionalSaveData["stack"]);
+
+
- string saveLocation = additionalSaveData["GameLocationName"];
+ //do same container creation logic in multitiled object
+ MultiTiledComponent self = null;
+
+ if (!Revitalize.ModCore.ObjectGroups.ContainsKey(additionalSaveData["GUID"]))
+ {
+ //Get new container
+ CustomObject obj = (CustomObject)(Revitalize.ModCore.customObjects[additionalSaveData["ParentID"]].getOne());
+ self = (MultiTiledComponent)(obj as MultiTiledObject).objects[offsetKey];
+ Revitalize.ModCore.ObjectGroups.Add(additionalSaveData["GUID"], (MultiTiledObject)obj);
+ }
+ else
+ {
+ self =(MultiTiledComponent)Revitalize.ModCore.ObjectGroups[additionalSaveData["GUID"]].objects[offsetKey];
+ self.containerObject = Revitalize.ModCore.ObjectGroups[additionalSaveData["GUID"]];
+ }
+
+ self.TileLocation = (replacement as Chest).TileLocation;
+
Enums.Direction facingDirection = (Enums.Direction)Convert.ToInt32(additionalSaveData["Rotation"]);
- while (obj.info.facingDirection != facingDirection)
+ while (self.info.facingDirection != facingDirection)
{
- obj.rotate();
+ self.rotate();
}
- if (!string.IsNullOrEmpty(saveLocation))
- {
- obj.placementAction(Game1.getLocationFromName(saveLocation), (int)(replacement as Chest).TileLocation.X, (int)(replacement as Chest).TileLocation.Y);
- return null;
- }
+ if (!string.IsNullOrEmpty(additionalSaveData["GameLocationName"]))
+ {
+ self.location = Game1.getLocationFromName(additionalSaveData["GameLocationName"]);
+ }
- return (ICustomObject)obj;
+ return (ICustomObject)self;
BasicItemInformation data = Revitalize.ModCore.customObjects[additionalSaveData["id"]].info;
return new MultiTiledComponent(data, (replacement as Chest).TileLocation)
{
@@ -140,21 +153,18 @@ namespace Revitalize.Framework.Objects
offsetKey = this.offsetKey,
Stack = Convert.ToInt32(additionalSaveData["stack"])
};
- }
- else
- {
- return null;
- }
}
public override Dictionary getAdditionalSaveData()
{
Dictionary saveData= base.getAdditionalSaveData();
+ saveData.Add("ParentID", this.containerObject.info.id);
saveData.Add("offsetKeyX", this.offsetKey.X.ToString());
saveData.Add("offsetKeyY", this.offsetKey.Y.ToString());
string saveLocation = "";
if (this.location == null)
{
+ Revitalize.ModCore.log("WHY IS LOCTION NULL???");
saveLocation = "";
}
else
@@ -165,9 +175,14 @@ namespace Revitalize.Framework.Objects
saveLocation = this.location.Name;
}
}
+
+ Revitalize.ModCore.log("SAVE LOCATION: " + saveLocation);
+
saveData.Add("GameLocationName", saveLocation);
saveData.Add("Rotation", ((int)this.info.facingDirection).ToString());
+ saveData.Add("GUID", this.containerObject.guid.ToString());
+
return saveData;
}
diff --git a/GeneralMods/Revitalize/Framework/Objects/MultiTiledObject.cs b/GeneralMods/Revitalize/Framework/Objects/MultiTiledObject.cs
index 75c0b9e7..d15f4fe0 100644
--- a/GeneralMods/Revitalize/Framework/Objects/MultiTiledObject.cs
+++ b/GeneralMods/Revitalize/Framework/Objects/MultiTiledObject.cs
@@ -1,6 +1,8 @@
+using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using Newtonsoft.Json;
using PyTK.CustomElementHandler;
using StardewValley;
using StardewValley.Objects;
@@ -10,8 +12,11 @@ namespace Revitalize.Framework.Objects
public class MultiTiledObject : CustomObject
{
public Dictionary objects;
+ [JsonIgnore]
public Dictionary offSets;
+ public Guid guid;
+
private int width;
private int height;
public int Width
@@ -33,6 +38,7 @@ namespace Revitalize.Framework.Objects
{
this.objects = new Dictionary();
this.offSets = new Dictionary();
+ this.guid = Guid.NewGuid();
}
public MultiTiledObject(BasicItemInformation info)
@@ -40,6 +46,7 @@ namespace Revitalize.Framework.Objects
{
this.objects = new Dictionary();
this.offSets = new Dictionary();
+ this.guid = Guid.NewGuid();
}
public MultiTiledObject(BasicItemInformation info, Vector2 TileLocation)
@@ -47,6 +54,7 @@ namespace Revitalize.Framework.Objects
{
this.objects = new Dictionary();
this.offSets = new Dictionary();
+ this.guid = Guid.NewGuid();
}
public MultiTiledObject(BasicItemInformation info, Vector2 TileLocation, Dictionary ObjectsList)
@@ -59,6 +67,7 @@ namespace Revitalize.Framework.Objects
MultiTiledComponent component = (MultiTiledComponent)v.Value.getOne();
this.addComponent(v.Key, component);
}
+ this.guid = Guid.NewGuid();
}
@@ -194,8 +203,29 @@ namespace Revitalize.Framework.Objects
public override ICustomObject recreate(Dictionary additionalSaveData, object replacement)
{
- BasicItemInformation data = (BasicItemInformation)CustomObjectData.collection[additionalSaveData["id"]];
- return new MultiTiledObject(data, (replacement as Chest).TileLocation, this.objects);
+
+
+
+ MultiTiledObject self=(MultiTiledObject)Revitalize.ModCore.customObjects[additionalSaveData["id"]].getOne();
+
+ if (!Revitalize.ModCore.ObjectGroups.ContainsKey(additionalSaveData["GUID"]))
+ {
+ Revitalize.ModCore.ObjectGroups.Add(additionalSaveData["GUID"], self);
+ return self;
+ }
+ else
+ {
+ return Revitalize.ModCore.ObjectGroups[additionalSaveData["GUID"]];
+ }
+
+
+ }
+
+ public override Dictionary getAdditionalSaveData()
+ {
+ Dictionary saveData= base.getAdditionalSaveData();
+ saveData.Add("GUID", this.guid.ToString());
+ return saveData;
}
public void setAllAnimationsToDefault()
diff --git a/GeneralMods/Revitalize/Framework/Utilities/Serialization/Converters/Texture2DConverter.cs b/GeneralMods/Revitalize/Framework/Utilities/Serialization/Converters/Texture2DConverter.cs
index 4f4630fa..7b711f16 100644
--- a/GeneralMods/Revitalize/Framework/Utilities/Serialization/Converters/Texture2DConverter.cs
+++ b/GeneralMods/Revitalize/Framework/Utilities/Serialization/Converters/Texture2DConverter.cs
@@ -3,32 +3,38 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Newtonsoft.Json;
+using Revitalize.Framework.Graphics;
using StardewValley;
namespace Revitalize.Framework.Utilities.Serialization.Converters
{
public class Texture2DConverter : JsonConverter
{
+
+
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
- writer.WriteValue(" ");
+ var texture = (Texture2D)value;
+ writer.WriteValue(texture.Name);
}
- public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
- JsonSerializer serializer)
+ public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
+ string textureName = reader.Value as string;
+ ModCore.log(textureName);
+ string[] names = textureName.Split('.');
+ if (names.Length == 0) return null;
- return new Texture2D(Game1.graphics.GraphicsDevice,16,16);
+ if (!TextureManager.TextureManagers.ContainsKey(names[0])) return null;
+ return textureName == null ? null : Revitalize.Framework.Graphics.TextureManager.TextureManagers[names[0]].getTexture(names[1]).texture;
}
public override bool CanConvert(Type objectType)
{
return objectType == typeof(Texture2D);
}
-
- public override bool CanRead => true;
- public override bool CanWrite => true;
}
}
diff --git a/GeneralMods/Revitalize/ModCore.cs b/GeneralMods/Revitalize/ModCore.cs
index 1e91c4bf..1400539d 100644
--- a/GeneralMods/Revitalize/ModCore.cs
+++ b/GeneralMods/Revitalize/ModCore.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Xna.Framework;
@@ -11,6 +12,7 @@ using Revitalize.Framework.Graphics.Animations;
using Revitalize.Framework.Illuminate;
using Revitalize.Framework.Objects;
using Revitalize.Framework.Player;
+using Revitalize.Framework.Utilities;
using StardewModdingAPI;
using StardewValley;
using StardewValley.Objects;
@@ -18,6 +20,8 @@ using StardewValley.Objects;
namespace Revitalize
{
// TODO:
+ //Make guid object list to keep track of container objects on rebuild. Container objects have guid, on getAdditionalSaveData, store it. On rebuild keep a list, get a reference to container object, clear those objects, and reset them as we are rebuilting multiTiledComponents.
+ //
// -Multiple Lights On Object
// -Illumination Colors
// Furniture:
@@ -96,8 +100,12 @@ namespace Revitalize
public static Dictionary customObjects;
+ public static DictionaryObjectGroups;
+
public static PlayerInfo playerInfo;
+ public static Serializer Serializer;
+
public override void Entry(IModHelper helper)
{
ModHelper = helper;
@@ -112,48 +120,26 @@ namespace Revitalize
playerInfo = new PlayerInfo();
Framework.Graphics.TextureManager.TextureManagers.Add("Furniture", new TextureManager());
- TextureManager.TextureManagers["Furniture"].addTexture("Oak Chair", new Texture2DExtended(this.Helper, this.ModManifest, Path.Combine("Content","Graphics","Furniture", "Chairs", "OakChair.png")));
+ TextureManager.addTexture("Furniture","Oak Chair", new Texture2DExtended(this.Helper, this.ModManifest, Path.Combine("Content","Graphics","Furniture", "Chairs", "OakChair.png")));
+ customObjects = new Dictionary();
+ ObjectGroups = new Dictionary();
+ loadContent();
+ Serializer = new Serializer();
+
}
- private void createDirectories()
+ private void loadContent()
{
- Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Configs"));
-
- Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content"));
- Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath,"Content" ,"Graphics"));
- Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics","Furniture"));
- Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics", "Furniture","Chairs"));
- }
-
- private void initailizeComponents()
- {
- DarkerNight.InitializeConfig();
- }
-
- private void GameLoop_UpdateTicked(object sender, StardewModdingAPI.Events.UpdateTickedEventArgs e)
- {
- DarkerNight.SetDarkerColor();
- playerInfo.update();
- }
-
- private void GameLoop_TimeChanged(object sender, StardewModdingAPI.Events.TimeChangedEventArgs e)
- {
- DarkerNight.CalculateDarkerNightColor();
- }
-
- private void GameLoop_SaveLoaded(object sender, StardewModdingAPI.Events.SaveLoadedEventArgs e)
- {
-
- MultiTiledComponent obj = new MultiTiledComponent(new BasicItemInformation("CoreObjectTest", "YAY FUN!", "Omegasis.Revitalize.MultiTiledComponent", Color.White, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.TEST1", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", Game1.objectSpriteSheet, Color.White, 0, true, typeof(MultiTiledComponent), null, new AnimationManager(new Texture2DExtended(Game1.objectSpriteSheet), new Animation(new Rectangle(0, 0, 16, 16))), Color.Red, true, null, null));
- MultiTiledComponent obj2 = new MultiTiledComponent(new BasicItemInformation("CoreObjectTest2", "SomeFun", "Omegasis.Revitalize.MultiTiledComponent", Color.White, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.TEST1", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", Game1.objectSpriteSheet, Color.White, 0, true, typeof(MultiTiledComponent), null, new AnimationManager(new Texture2DExtended(Game1.objectSpriteSheet), new Animation(new Rectangle(0, 16, 16, 16))), Color.Red, false, null, null));
- MultiTiledComponent obj3 = new MultiTiledComponent(new BasicItemInformation("CoreObjectTest3", "NoFun", "Omegasis.Revitalize.MultiTiledComponent", Color.White, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.TEST1", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", Game1.objectSpriteSheet, Color.White, 0, true, typeof(MultiTiledComponent), null, new AnimationManager(new Texture2DExtended(Game1.objectSpriteSheet), new Animation(new Rectangle(0, 32, 16, 16))), Color.Red, false, null, null));
+ MultiTiledComponent obj = new MultiTiledComponent(new BasicItemInformation("CoreObjectTest", "YAY FUN!", "Omegasis.Revitalize.MultiTiledComponent", Color.White, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.TEST1", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", TextureManager.TextureManagers["Furniture"].getTexture("Oak Chair").texture, Color.White, 0, true, typeof(MultiTiledComponent), null, new AnimationManager(TextureManager.TextureManagers["Furniture"].getTexture("Oak Chair"), new Animation(new Rectangle(0, 0, 16, 16))), Color.Red, true, null, null));
+ MultiTiledComponent obj2 = new MultiTiledComponent(new BasicItemInformation("CoreObjectTest2", "SomeFun", "Omegasis.Revitalize.MultiTiledComponent", Color.White, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.TEST1", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", TextureManager.TextureManagers["Furniture"].getTexture("Oak Chair").texture, Color.White, 0, true, typeof(MultiTiledComponent), null, new AnimationManager(TextureManager.TextureManagers["Furniture"].getTexture("Oak Chair"), new Animation(new Rectangle(0, 16, 16, 16))), Color.Red, false, null, null));
+ MultiTiledComponent obj3 = new MultiTiledComponent(new BasicItemInformation("CoreObjectTest3", "NoFun", "Omegasis.Revitalize.MultiTiledComponent", Color.White, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.TEST1", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", TextureManager.TextureManagers["Furniture"].getTexture("Oak Chair").texture, Color.White, 0, true, typeof(MultiTiledComponent), null, new AnimationManager(TextureManager.TextureManagers["Furniture"].getTexture("Oak Chair"), new Animation(new Rectangle(0, 32, 16, 16))), Color.Red, false, null, null));
obj.info.lightManager.addLight(new Vector2(Game1.tileSize), new LightSource(4, new Vector2(0, 0), 2.5f, Color.Orange.Invert()), obj);
- MultiTiledObject bigObject = new MultiTiledObject(new BasicItemInformation("MultiTest", "A really big object", "Omegasis.Revitalize.MultiTiledObject", Color.Blue, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.BigTiledTest", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", Game1.objectSpriteSheet, Color.White, 0, true, typeof(MultiTiledObject), null, new AnimationManager(), Color.White, false, null, null));
+ MultiTiledObject bigObject = new MultiTiledObject(new BasicItemInformation("MultiTest", "A really big object", "Omegasis.Revitalize.MultiTiledObject", Color.Blue, -300, 0, false, 100, Vector2.Zero, true, true, "Omegasis.BigTiledTest", "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048", TextureManager.TextureManagers["Furniture"].getTexture("Oak Chair").texture, Color.White, 0, true, typeof(MultiTiledObject), null, new AnimationManager(), Color.White, false, null, null));
bigObject.addComponent(new Vector2(0, 0), obj);
bigObject.addComponent(new Vector2(1, 0), obj2);
bigObject.addComponent(new Vector2(2, 0), obj3);
@@ -257,15 +243,50 @@ namespace Revitalize
oakChair.addComponent(new Vector2(0, 0), chairTop);
oakChair.addComponent(new Vector2(0, 1), chairBottom);
- Game1.player.addItemToInventory(oakChair);
+ customObjects.Add("Omegasis.BigTiledTest", bigObject);
+ }
- new InventoryItem(bigObject, 100, 1).addToNPCShop("Gus");
- Game1.player.addItemToInventory(bigObject);
+ private void createDirectories()
+ {
+ Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Configs"));
- if (pie.PlayerCanCraft())
- {
- //pie.craft();
- }
+ Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content"));
+ Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath,"Content" ,"Graphics"));
+ Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics","Furniture"));
+ Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics", "Furniture","Chairs"));
+ }
+
+ private void initailizeComponents()
+ {
+ DarkerNight.InitializeConfig();
+ }
+
+ private void GameLoop_UpdateTicked(object sender, StardewModdingAPI.Events.UpdateTickedEventArgs e)
+ {
+ DarkerNight.SetDarkerColor();
+ playerInfo.update();
+ }
+
+ private void GameLoop_TimeChanged(object sender, StardewModdingAPI.Events.TimeChangedEventArgs e)
+ {
+ DarkerNight.CalculateDarkerNightColor();
+ }
+
+ private void GameLoop_SaveLoaded(object sender, StardewModdingAPI.Events.SaveLoadedEventArgs e)
+ {
+
+ Game1.player.addItemToInventory(customObjects["Omegasis.BigTiledTest"]);
+ var obj = customObjects["Omegasis.BigTiledTest"];
+ Serializer.Serialize(Path.Combine(this.Helper.DirectoryPath, (obj as MultiTiledObject).guid + ".json"), obj);
+
+
+
+
+ var hello=Serializer.Deserialize(Path.Combine(this.Helper.DirectoryPath, (obj as MultiTiledObject).guid + ".json"));
+ //(hello as MultiTiledObject).info.drawColor = Color.Blue;
+ customObjects["Omegasis.BigTiledTest"].info.drawColor = hello.info.drawColor;
+ Game1.player.addItemToInventory(hello);
+
}
diff --git a/GeneralMods/Revitalize/Revitalize.csproj b/GeneralMods/Revitalize/Revitalize.csproj
index b080366e..62ec2c31 100644
--- a/GeneralMods/Revitalize/Revitalize.csproj
+++ b/GeneralMods/Revitalize/Revitalize.csproj
@@ -30,6 +30,9 @@
4
+
+ 12.0.1
+
@@ -72,6 +75,10 @@
+
+
+
+