Class Farmland
A player's farmland.
Inherited Members
Namespace: Backend
Assembly: cs.temp.dll.dll
Syntax
public class Farmland : HouseholdAsset
Constructors
Farmland(int)
Initializes a farmland with numPlots
plots.
Declaration
public Farmland(int numPlots)
Parameters
Type | Name | Description |
---|---|---|
int | numPlots | Number of farm plots. |
Fields
MaxPlots
The maximum number of plots a player can have.
Declaration
public const int MaxPlots = 16
Field Value
Type | Description |
---|---|
int |
Plots
The list of farm plots.
Declaration
public List<FarmPlot> Plots
Field Value
Type | Description |
---|---|
List<FarmPlot> |
Methods
AddPlot()
Adds a farm plot to this land.
Declaration
public void AddPlot()
ClearPlots()
Clear seed and fertilizer type for all plots.
Declaration
public void ClearPlots()
GetTotalYield()
Gets the total wheat yield of this land.
Declaration
public int GetTotalYield()
Returns
Type | Description |
---|---|
int | Total wheat yield. |
ResetIrrigation()
Reset irrigation status for every plot.
Declaration
public void ResetIrrigation()
SetOwner(Household)
Set the owner of this land and its plots.
Declaration
public override void SetOwner(Household owner)
Parameters
Type | Name | Description |
---|---|---|
Household | owner | The owner. |
Overrides
SetYieldMultiplier(float)
Set yield multiplier of all plots.
Declaration
public void SetYieldMultiplier(float val)
Parameters
Type | Name | Description |
---|---|---|
float | val | The multiplier. |