Class HarvestBasket
public class HarvestBasket : Furniture, IGenericDataHolder, IContainerObject<Stacked<PlantFruit>>
- Inheritance
-
JsonTypeSafeGenericDataHolderHarvestBasket
- Implements
-
IGenericDataHolder
- Inherited Members
-
Furniture.OnRandomQuality(PersonLike, ActionInfo, bool, SkillType, bool, Dictionary<Quality, float>)JsonTypeSafeGenericDataHolder.GetDataKeys()
- Extension Methods
Constructors
HarvestBasket(Guid, FurnitureType, int[], Map, Vector2, float)
public HarvestBasket(Guid id, FurnitureType type, int[] colors, Map map, Vector2 pos, float floor)
Parameters
idGuidtypeFurnitureTypecolorsint[]mapMapposVector2floorfloat
Properties
Content
public IEnumerable<Stacked<PlantFruit>> Content { get; }
Property Value
Methods
AddContent(Stacked<PlantFruit>)
public bool AddContent(Stacked<PlantFruit> content)
Parameters
contentStacked<PlantFruit>
Returns
Draw(GameTime, object, Vector2, float, Vector2, Color?, Direction2, int[], float, bool, ParentInfo, float, List<Item>)
Draws this furniture in the world with the given settings. When overriding this method, furniture objects should use DrawColumns(Map, Vector2, float, object, Vector2, TextureRegion, Color, Vector2, Point, List<Item>, bool, ParentInfo, float, SpriteEffects, bool) for drawing their textures or alternatively manually calculate the depth to draw with using GetDepth(Vector2, float, float, bool, bool, bool). This is a more generalized version of Draw(GameTime, object, Vector2, Color?, List<Item>).
public override void Draw(GameTime time, object batch, Vector2 pos, float floor, Vector2 drawPos, Color? overrideColor, Direction2 rotation, int[] colors, float drawScale, bool pivot, ParentInfo parent, float depthOffset, List<StaticSpriteBatch.Item> batchItems)
Parameters
timeGameTimeThe game time
batchobjectThe sprite batch to draw with, which is either a Microsoft.Xna.Framework.Graphics.SpriteBatch or MLEM.Graphics.StaticSpriteBatch.
posVector2The position, in world space, that the furniture is at
floorfloatThe floor to draw at.
drawPosVector2The position, in draw space, to draw the furniture at
overrideColorColor?An optional color to override the default colors of the furniture
rotationDirection2The rotation that the furniture should be drawn with.
colorsint[]The colors to draw the furniture with
drawScalefloatThe scale to draw the furniture with
pivotboolWhether or not to move the furniture by its texture's pivot point
parentParentInfoThe object that this furniture is latched on to, or null if there is none
depthOffsetfloatA value that is added onto the calculated depth of the object
batchItemsList<StaticSpriteBatch.Item>
GetDescription(List<string>, bool)
This method allows adding a set of strings to the description list that get displayed when the object is hovered over in the build mode or household storage UIs.
By default, this method adds various strings related to the ElectricityRating, Quality, Creator, and also invokes the OnGetDescription event.
public override void GetDescription(List<string> description, bool forHoverInfo)
Parameters
descriptionList<string>The description to add to.
forHoverInfoboolWhether this method is being called by GetHoverInfo(Tooltip) (or by build mode).
RemoveContent(Stacked<PlantFruit>)
public bool RemoveContent(Stacked<PlantFruit> content)
Parameters
contentStacked<PlantFruit>
Returns
Validate(AppliedMigrations)
This method is called when this object is loaded from disk. Returning false on this method causes the object to be removed from the map. By default, this method invokes OnValidated and OnEventsAttachable.
public override bool Validate(AppliedMigrations appliedMigrations)
Parameters
appliedMigrationsAppliedMigrations
Returns
- bool
false if the object is not valid, true otherwise