Merge remote-tracking branch 'upstream/Development' into update-code

This commit is contained in:
Jesse Plamondon-Willard 2019-01-06 02:23:32 -05:00
commit 9da28996b9
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
12 changed files with 173 additions and 15 deletions

View File

@ -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
}
}
}

View File

@ -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()

View File

@ -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)

View File

@ -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
{
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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()
{
}
}
}

View File

@ -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
/// <summary>How long a player has to sit to recover energy/health;</summary>
public int SittingSpan { get; }
StardewValley.Object sittingObject;
public StardewValley.Object SittingObject
{
get
{
return this.sittingObject;
}
}
/// <summary>Construct an instance.</summary>
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,12 +66,14 @@ namespace Revitalize.Framework.Player.Managers
Game1.player.health++;
Game1.player.Stamina++;
}
ModCore.log(this.elapsedTime);
}
public void showSitting()
{
if (this.sittingObject == null)
{
Revitalize.ModCore.log("Does THIS HAPPEN AT ALL???");
switch (Game1.player.FacingDirection)
{
case 0:
@ -77,12 +90,38 @@ namespace Revitalize.Framework.Player.Managers
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;
}
}
}
}
public void sit(StardewValley.Object obj, Vector2 offset)
{
this.isSitting = true;
Game1.player.Position = (obj.TileLocation * Game1.tileSize + offset);
Game1.player.position.Y += Game1.tileSize / 2;
this.sittingObject = obj;
}
}
}

View File

@ -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
{

View File

@ -47,6 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Framework\Crafting\Recipe.cs" />
<Compile Include="Framework\Enums\Enums.cs" />
<Compile Include="Framework\Environment\DarkerNight.cs" />
<Compile Include="Framework\Environment\DarkerNightConfig.cs" />
<Compile Include="Framework\Graphics\Animations\Animation.cs" />

BIN
GeneralMods/UpgradeLog.htm Normal file

Binary file not shown.

BIN
GeneralMods/UpgradeLog2.htm Normal file

Binary file not shown.