diff --git a/GeneralMods/Revitalize/Framework/Enums/Enums.cs b/GeneralMods/Revitalize/Framework/Enums/Enums.cs new file mode 100644 index 00000000..3d3d7e09 --- /dev/null +++ b/GeneralMods/Revitalize/Framework/Enums/Enums.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Revitalize.Framework +{ + public class Enums + { + public enum Direction + { + Up, + Right, + Down, + Left + } + + } +} diff --git a/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs b/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs index 21207f61..eee605af 100644 --- a/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs +++ b/GeneralMods/Revitalize/Framework/Objects/BasicItemInformation.cs @@ -33,6 +33,8 @@ namespace Revitalize.Framework.Objects public LightManager lightManager; + public Enums.Direction facingDirection; + public BasicItemInformation() { this.name = ""; @@ -50,6 +52,8 @@ namespace Revitalize.Framework.Objects this.drawColor = Color.White; this.inventory = new InventoryManager(); 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) @@ -82,6 +86,7 @@ namespace Revitalize.Framework.Objects this.recreateDataString(); this.inventory = Inventory ?? new InventoryManager(); this.lightManager = Lights ?? new LightManager(); + this.facingDirection = Enums.Direction.Down; } public void recreateDataString() diff --git a/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs b/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs index b9c111bb..30929b28 100644 --- a/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs +++ b/GeneralMods/Revitalize/Framework/Objects/CustomObject.cs @@ -70,7 +70,7 @@ namespace Revitalize.Framework.Objects public override bool isPassable() { - return this.info.ignoreBoundingBox; + return this.info.ignoreBoundingBox || Revitalize.ModCore.playerInfo.sittingInfo.SittingObject==this; } public override Rectangle getBoundingBox(Vector2 tileLocation) diff --git a/GeneralMods/Revitalize/Framework/Objects/Furniture/Chair.cs b/GeneralMods/Revitalize/Framework/Objects/Furniture/Chair.cs new file mode 100644 index 00000000..134c0f71 --- /dev/null +++ b/GeneralMods/Revitalize/Framework/Objects/Furniture/Chair.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Revitalize.Framework.Objects.Furniture +{ + class Chair + { + } +} diff --git a/GeneralMods/Revitalize/Framework/Objects/Furniture/FurnitureTileComponent.cs b/GeneralMods/Revitalize/Framework/Objects/Furniture/FurnitureTileComponent.cs new file mode 100644 index 00000000..f47a6406 --- /dev/null +++ b/GeneralMods/Revitalize/Framework/Objects/Furniture/FurnitureTileComponent.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Revitalize.Framework.Objects.InformationFiles; +using Revitalize.Framework.Objects.InformationFiles.Furniture; + +namespace Revitalize.Framework.Objects.Furniture +{ + public class FurnitureTileComponent:MultiTiledComponent + { + public FurnitureInformation furnitureInfo; + + + public FurnitureTileComponent():base() + { + + } + + public FurnitureTileComponent(BasicItemInformation itemInfo,FurnitureInformation furnitureInfo):base(itemInfo) + { + this.furnitureInfo = furnitureInfo; + } + + + + } +} diff --git a/GeneralMods/Revitalize/Framework/Objects/InformationFiles/Furniture/ChairInformation.cs b/GeneralMods/Revitalize/Framework/Objects/InformationFiles/Furniture/ChairInformation.cs new file mode 100644 index 00000000..f1e4fe33 --- /dev/null +++ b/GeneralMods/Revitalize/Framework/Objects/InformationFiles/Furniture/ChairInformation.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Revitalize.Framework.Objects.InformationFiles.Furniture +{ + public class ChairInformation:FurnitureInformation + { + public bool canSitHere; + + public ChairInformation():base() + { + + } + + public ChairInformation(bool CanSitHere) : base() + { + this.canSitHere = CanSitHere; + } + } +} diff --git a/GeneralMods/Revitalize/Framework/Objects/InformationFiles/Furniture/FurnitureInformation.cs b/GeneralMods/Revitalize/Framework/Objects/InformationFiles/Furniture/FurnitureInformation.cs new file mode 100644 index 00000000..2df3b252 --- /dev/null +++ b/GeneralMods/Revitalize/Framework/Objects/InformationFiles/Furniture/FurnitureInformation.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Revitalize.Framework.Objects.InformationFiles.Furniture +{ + public class FurnitureInformation + { + public FurnitureInformation() + { + + } + } +} diff --git a/GeneralMods/Revitalize/Framework/Player/Managers/SittingInfo.cs b/GeneralMods/Revitalize/Framework/Player/Managers/SittingInfo.cs index 3e429060..c2688648 100644 --- a/GeneralMods/Revitalize/Framework/Player/Managers/SittingInfo.cs +++ b/GeneralMods/Revitalize/Framework/Player/Managers/SittingInfo.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Revitalize.Framework.Objects; using StardewValley; namespace Revitalize.Framework.Player.Managers @@ -24,6 +25,15 @@ namespace Revitalize.Framework.Player.Managers /// How long a player has to sit to recover energy/health; public int SittingSpan { get; } + StardewValley.Object sittingObject; + + public StardewValley.Object SittingObject + { + get + { + return this.sittingObject; + } + } /// Construct an instance. public SittingInfo() @@ -41,6 +51,7 @@ namespace Revitalize.Framework.Player.Managers { this.isSitting = false; this.elapsedTime = 0; + this.sittingObject = null; } if (this.isSitting && Game1.player.CanMove) { @@ -55,26 +66,53 @@ namespace Revitalize.Framework.Player.Managers Game1.player.health++; Game1.player.Stamina++; } - ModCore.log(this.elapsedTime); } public void showSitting() { - switch (Game1.player.FacingDirection) + if (this.sittingObject == null) { - case 0: - Game1.player.FarmerSprite.setCurrentSingleFrame(113); - break; - case 1: - Game1.player.FarmerSprite.setCurrentSingleFrame(106); - break; - case 2: - Game1.player.FarmerSprite.setCurrentSingleFrame(107); - break; - case 3: - Game1.player.FarmerSprite.setCurrentSingleFrame(106); - break; + Revitalize.ModCore.log("Does THIS HAPPEN AT ALL???"); + switch (Game1.player.FacingDirection) + { + case 0: + Game1.player.FarmerSprite.setCurrentSingleFrame(113); + break; + case 1: + Game1.player.FarmerSprite.setCurrentSingleFrame(106); + break; + case 2: + Game1.player.FarmerSprite.setCurrentSingleFrame(107); + break; + case 3: + Game1.player.FarmerSprite.setCurrentSingleFrame(106); + break; + } + } + else + { + if(this.sittingObject is CustomObject) + { + Game1.player.faceDirection((int)(this.sittingObject as CustomObject).info.facingDirection); + switch ((this.sittingObject as CustomObject).info.facingDirection) + { + + case Enums.Direction.Up: + + Game1.player.FarmerSprite.setCurrentSingleFrame(113); + break; + case Enums.Direction.Right: + Game1.player.FarmerSprite.setCurrentSingleFrame(106); + break; + case Enums.Direction.Down: + Game1.player.FarmerSprite.setCurrentSingleFrame(107); + break; + case Enums.Direction.Left: + Game1.player.FarmerSprite.setCurrentSingleFrame(106,32000,false,true); + break; + } + } } } @@ -83,6 +121,7 @@ namespace Revitalize.Framework.Player.Managers this.isSitting = true; Game1.player.Position = (obj.TileLocation * Game1.tileSize + offset); Game1.player.position.Y += Game1.tileSize / 2; + this.sittingObject = obj; } } } diff --git a/GeneralMods/Revitalize/ModCore.cs b/GeneralMods/Revitalize/ModCore.cs index f0a63dfa..d5d18eb8 100644 --- a/GeneralMods/Revitalize/ModCore.cs +++ b/GeneralMods/Revitalize/ModCore.cs @@ -44,6 +44,12 @@ namespace Revitalize // -Spell books // -Potions! // -Magic Meter + // -Connected chests much like Project EE2 from MC + // + // + // + // -Bigger chests + // // Festivals // -Firework festival? // Stargazing??? @@ -54,6 +60,7 @@ namespace Revitalize // // Equippables! // -accessories that provide buffs/regen/friendship + // -braclets/rings/broaches....more crafting for these??? // // Music??? // -IDK maybe add in instruments??? @@ -74,6 +81,12 @@ namespace Revitalize // -Small Island Home? // // More crops + // + // More monsters + // -boss fights + // + // More dungeons?? + public class ModCore : Mod { diff --git a/GeneralMods/Revitalize/Revitalize.csproj b/GeneralMods/Revitalize/Revitalize.csproj index 8fa04685..dc74ff89 100644 --- a/GeneralMods/Revitalize/Revitalize.csproj +++ b/GeneralMods/Revitalize/Revitalize.csproj @@ -47,6 +47,7 @@ + diff --git a/GeneralMods/UpgradeLog.htm b/GeneralMods/UpgradeLog.htm new file mode 100644 index 00000000..2749ed45 Binary files /dev/null and b/GeneralMods/UpgradeLog.htm differ diff --git a/GeneralMods/UpgradeLog2.htm b/GeneralMods/UpgradeLog2.htm new file mode 100644 index 00000000..2749ed45 Binary files /dev/null and b/GeneralMods/UpgradeLog2.htm differ