Show / Hide Table of Contents

Interface IMyFarmPlotLogic

Describes the exposed farm plot logic.

Inherited Members
IMyFarmPlotLogic.GetDetailedInfoWithoutRequiredInput()
IMyFarmPlotLogic.IsAlive
IMyFarmPlotLogic.IsPlantFullyGrown
IMyFarmPlotLogic.IsPlantPlanted
IMyFarmPlotLogic.IsHarvestable
IMyFarmPlotLogic.OutputItem
IMyFarmPlotLogic.OutputItemAmount
IMyFarmPlotLogic.AmountOfSeedsRequired
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyFarmPlotLogic : IMyFarmPlotLogic

Methods

Harvest(IMyInventory, Boolean)

Harvests the plant and puts the output items into the specified inventory. Only works when called from the server.

Declaration
bool Harvest(IMyInventory inventory, bool removeDeadPlant)
Parameters
Type Name Description
IMyInventory inventory

The inventory to place the gathered items into.

System.Boolean removeDeadPlant

Whether the farm plot should get cleared during this action if the plant is dead.

Returns
Type Description
System.Boolean

Whether the action completed successfully.

PlantSeed(MyDefinitionId)

Plants a given seed and starts growing the plant. It is the responsibility of the caller to handle inventory management. This method will just plant the seed from the definition with the necessary amount. Only works when called from the server.

Declaration
bool PlantSeed(MyDefinitionId seedItemDefinitionId)
Parameters
Type Name Description
MyDefinitionId seedItemDefinitionId

Needs to be of MySeedItemDefinition type.

Returns
Type Description
System.Boolean

Whether the action completed successfully.

RemovePlant(Boolean)

Removes the currently planted plant and its seed. Only works when called from the server.

Declaration
bool RemovePlant(bool playEffects = true)
Parameters
Type Name Description
System.Boolean playEffects

Whether the "gather" sound and particle effects specified in block's definition should be played.

Returns
Type Description
System.Boolean

Whether the action completed successfully.

☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾