DIFF

class PlantBaseSource

PlantBase ItemBase InventoryItem EntityAI Entity ObjectTyped Object IEntity Managed

All members, including inherited

Constructors 2

void ~PlantBase()

Constants 6

private const float SPOIL_AFTER_MATURITY_TIME = 14400.0

The time it takes for a fully grown plant to spoil, in seconds (4 hours)

Referenced by Init()
private const int TICK_FREQUENCY = 1

seconds

Referenced by PlantBase()
static const int STATE_DRY = 0
static const int STATE_GROWING = 1
static const int STATE_MATURE = 2
static const int STATE_SPOILED = 3

Members 33

private float m_SprayUsage

How much spray is needed to stop infestation of plant

private float m_InfestationChance
private int m_GrowthStagesCount
private int m_CropsCount
Referenced by Harvest(), Init(), OnStoreLoadCustom()
Show 2 more, OnStoreSaveCustom(), and PlantBase()
private bool m_HasCrops
private string m_CropsType
Referenced by GetCropsType(), Harvest(), OnStoreLoadCustom()
Show 2 more, OnStoreSaveCustom(), and PlantBase()
private float m_PlantMaterialMultiplier
Referenced by Init(), OnStoreLoadCustom(), OnStoreSaveCustom()
Show 1 more, UpdatePlant()
private float m_CurrentPlantMaterialQuantity
private float m_SprayQuantity
bool m_MarkForDeletion = false
int m_DeleteDryPlantTime

For how long in seconds can an unwatered plant exist before it disappears

int m_SpoiledRemoveTime

For how long in seconds a spoiled plant will exist

int m_SpoilAfterFullMaturityTime

How long in seconds it takes for plant to be spoiled after it is full grown

float m_StateChangeTime

For how long in seconds will plant stay in one state before its going to next state

protected ref Timer m_TimeTicker
Referenced by ~PlantBase(), PlantBase(), and Tick()
protected float m_TimeTracker
private GardenBase m_GardenBase = NULL
Referenced by GetGarden(), Harvest(), Init()
Show 2 more, PrintValues(), and SetGarden()
private ref Slot m_Slot = NULL
Referenced by GetSlot(), NeedsWater(), PrintValues()
Show 1 more, SetSlot()
private PluginHorticulture m_ModuleHorticulture
Referenced by ChangeInfestation(), and PlantBase()
static int m_DebugFullMaturityTime
Referenced by DebugSetGlobalTimes(), and Init()
static int m_DebugSpoilTime
Referenced by DebugSetGlobalTimes(), and Init()
static int m_DebugSpoilRemoveTime
Referenced by DebugSetGlobalTimes(), and Init()
static int m_DebugDeleteDryTime
Referenced by DebugSetGlobalTimes(), and Init()
static float m_DebugTickSpeedMultiplier = 1
ref Timer m_SpoiledRemoveTimer
ref Timer m_DeleteDryPlantTimer
ref Timer m_SpoilAfterFullMaturityTimer
ref Timer m_GrowthTimer
ref Timer m_InfestationTimer

Methods 51

string GetCropsType()
References m_CropsType
override bool CanPutInCargo(EntityAI parent)
override bool CanPutIntoHands(EntityAI parent)
override bool CanRemoveFromHands(EntityAI parent)
void SetSpoiled()
References SetPlantState(), UpdatePlant(), m_PlantState
Show 1 more, m_PlantStateIndex
Referenced by Tick()
void SetDry()
References SetPlantState(), UpdatePlant(), m_PlantState
Show 1 more, m_PlantStateIndex
Referenced by GrowthTimerTick()
void SprayPlant(float consumed_quantity)
void DestroyPlant()
Referenced by ~PlantBase()
void SetPlantState(int state)
Referenced by GrowthTimerTick(), Init(), SetDry()
Show 1 more, SetSpoiled()
EPlantState GetPlantState()
References m_PlantState
int GetPlantStateIndex()
float GetWater()
References GetSlot(), and Slot.GetWater()
float GetWaterMax()
bool NeedsWater()
References Slot.GetWater(), Slot.GetWaterUsage(), m_PlantState
Show 1 more, m_Slot
float GetSprayQuantity()
References m_SprayQuantity
float GetSprayUsage()
References m_SprayUsage
void SetSlot(Slot slot)
References m_Slot
Referenced by OnStoreLoad(), and Slot.SetPlant()
void SetGarden(GardenBase gardenBase)
References m_GardenBase
Referenced by Slot.SetPlant()
GardenBase GetGarden()
References m_GardenBase
bool HasCrops()
References m_HasCrops
Referenced by UpdatePlant()
override void SetActions()
static void DebugSetGlobalTimes(int maturity, int spoil, int spoilRemove, int dryDelete)
static void DebugSetTickSpeedMultiplier(float multiplier)
void DeleteDryPlantTick()
void SpoiledRemoveTimerTick()
void InfestationTimerTick()
void CheckWater()
bool IsMature()
bool IsSpoiled()
bool IsDry()
bool IsGrowing()
bool NeedsSpraying()
void RemovePlant()
string StopInfestation(float consumed_quantity)