class PlantBaseSource
PlantBase › ItemBase › InventoryItem › EntityAI › Entity › ObjectTyped › Object › IEntity › Managed
Derived classes
All members, including inherited
Constructors 2
void PlantBase()References Class.Cast(), CGame.ConfigGetInt(), CGame.ConfigGetText()
Show 24 more
, GetPlugin(), Object.GetType(), CGame.IsServer(), Math.RandomInt(), EntityAI.RegisterNetSyncVariableBool(), EntityAI.RegisterNetSyncVariableInt(), Timer.Run(), ItemBase.SetTakeable(), new Timer(), m_CropsCount, m_CropsType, m_CurrentPlantMaterialQuantity, m_DeleteDryPlantTime, m_GrowthStagesCount, m_HasCrops, m_InfestationChance, m_IsInfested, m_ModuleHorticulture, m_PlantStateIndex, m_SpoiledRemoveTime, m_SprayQuantity, m_SprayUsage, m_TimeTicker, and TICK_FREQUENCYvoid ~PlantBase()References DestroyPlant(), Object.IsPendingDeletion(), Timer.Stop()
Show 2 more
, m_MarkForDeletion, and m_TimeTickerConstants 6
private const float SPOIL_AFTER_MATURITY_TIME = 14400.0The time it takes for a fully grown plant to spoil, in seconds (4 hours)
Referenced by Init()
static const int STATE_DRY = 0static const int STATE_GROWING = 1static const int STATE_MATURE = 2static const int STATE_SPOILED = 3Members 33
private float m_SprayUsageHow much spray is needed to stop infestation of plant
Referenced by GetSprayUsage(), IsSprayable(), OnStoreLoadCustom()
Show 3 more
, OnStoreSaveCustom(), PlantBase(), and SprayPlant()private float m_InfestationChanceReferenced by GrowthTimerTick(), OnStoreLoadCustom(), OnStoreSaveCustom()
Show 2 more
, PlantBase(), and SprayPlant()private int m_GrowthStagesCountReferenced by DebugSetTimes(), GrowthTimerTick(), Init()
Show 4 more
, OnStoreLoadCustom(), OnStoreSaveCustom(), PlantBase(), and PrintValues()private int m_CropsCountReferenced by Harvest(), Init(), OnStoreLoadCustom()
Show 2 more
, OnStoreSaveCustom(), and PlantBase()private bool m_HasCropsReferenced by Harvest(), HasCrops(), IsHarvestable()
Show 4 more
, OnStoreLoadCustom(), OnStoreSaveCustom(), PlantBase(), and PrintValues()private string m_CropsTypeReferenced by GetCropsType(), Harvest(), OnStoreLoadCustom()
Show 2 more
, OnStoreSaveCustom(), and PlantBase()private float m_PlantMaterialMultiplierprivate int m_PlantStateIndexReferenced by GetPlantStateIndex(), GrowthTimerTick(), OnStoreLoadCustom()
Show 6 more
, OnStoreSaveCustom(), PlantBase(), PrintValues(), SetDry(), SetSpoiled(), and UpdatePlant()private float m_CurrentPlantMaterialQuantityReferenced by OnStoreLoadCustom(), OnStoreSaveCustom(), PlantBase()
Show 3 more
, PrintValues(), RemovePlantEx(), and UpdatePlant()protected EPlantState m_PlantStateReferenced by GetPlantState(), Init(), IsHarvestable()
Show 9 more
, IsSprayable(), NeedsWater(), OnStoreLoadCustom(), OnStoreSaveCustom(), PrintValues(), SetDry(), SetPlantState(), SetSpoiled(), and Tick()private bool m_IsInfestedReferenced by ChangeInfestation(), GrowthTimerTick(), OnStoreLoadCustom()
Show 4 more
, OnStoreSaveCustom(), PlantBase(), PrintValues(), and SprayPlant()private float m_SprayQuantityReferenced by GetSprayQuantity(), IsSprayable(), OnStoreLoadCustom()
Show 4 more
, OnStoreSaveCustom(), PlantBase(), PrintValues(), and SprayPlant()bool m_MarkForDeletion = falseint m_DeleteDryPlantTimeFor how long in seconds can an unwatered plant exist before it disappears
Referenced by DebugSetTimes(), Init(), OnStoreLoadCustom()
Show 3 more
, OnStoreSaveCustom(), PlantBase(), and Tick()int m_SpoiledRemoveTimeFor how long in seconds a spoiled plant will exist
Referenced by DebugSetTimes(), Init(), OnStoreLoadCustom()
Show 3 more
, OnStoreSaveCustom(), PlantBase(), and Tick()int m_FullMaturityTimeHow much time needs plant to be full grown in seconds
int m_SpoilAfterFullMaturityTimeHow long in seconds it takes for plant to be spoiled after it is full grown
Referenced by DebugSetTimes(), Init(), OnStoreLoadCustom()
Show 3 more
, OnStoreSaveCustom(), PrintValues(), and Tick()float m_StateChangeTimeFor how long in seconds will plant stay in one state before its going to next state
Referenced by DebugSetTimes(), Init(), OnStoreLoadCustom()
Show 3 more
, OnStoreSaveCustom(), PrintValues(), and Tick()protected ref Timer m_TimeTickerprotected float m_TimeTrackerReferenced by GrowthTimerTick(), OnStoreLoadCustom(), OnStoreSaveCustom()
Show 3 more
, PrintValues(), SetPlantState(), and Tick()private GardenBase m_GardenBase = NULLprivate ref Slot m_Slot = NULLprivate PluginHorticulture m_ModuleHorticulturestatic int m_DebugFullMaturityTimestatic int m_DebugSpoilTimestatic int m_DebugSpoilRemoveTimestatic int m_DebugDeleteDryTimestatic float m_DebugTickSpeedMultiplier = 1ref Timer m_SpoiledRemoveTimerref Timer m_DeleteDryPlantTimerref Timer m_SpoilAfterFullMaturityTimerref Timer m_GrowthTimerref Timer m_InfestationTimerMethods 51
void Init(GardenBase garden_base, float fertility, float harvesting_efficiency, float water)References Math.Ceil(), WeatherPhenomenon.GetActual(), Weather.GetRain()
Show 20 more
, CGame.GetWeather(), GrowthTimerTick(), NeedsWater(), Math.RandomInt(), SetPlantState(), m_CropsCount, m_DebugDeleteDryTime, m_DebugFullMaturityTime, m_DebugSpoilRemoveTime, m_DebugSpoilTime, m_DeleteDryPlantTime, m_FullMaturityTime, m_GardenBase, m_GrowthStagesCount, m_PlantMaterialMultiplier, m_PlantState, m_SpoilAfterFullMaturityTime, m_SpoiledRemoveTime, m_StateChangeTime, and SPOIL_AFTER_MATURITY_TIMEReferenced by GardenBase.CreatePlant()
void Tick()override bool OnStoreLoad(ParamsReadContext ctx, int version)References Class.Cast(), EntityAI.GetHierarchyParent(), GardenBase.GetSlotByIndex()
Show 4 more
, ItemBase.OnStoreLoad(), OnStoreLoadCustom(), Serializer.Read(), and SetSlot()override void OnStoreSave(ParamsWriteContext ctx)bool OnStoreLoadCustom(ParamsReadContext ctx, int version)References ErrorEx(), Object.GetPosition(), Serializer.Read()
Show 19 more
, UpdatePlant(), m_CropsCount, m_CropsType, m_CurrentPlantMaterialQuantity, m_DeleteDryPlantTime, m_FullMaturityTime, m_GrowthStagesCount, m_HasCrops, m_InfestationChance, m_IsInfested, m_PlantMaterialMultiplier, m_PlantState, m_PlantStateIndex, m_SpoilAfterFullMaturityTime, m_SpoiledRemoveTime, m_SprayQuantity, m_SprayUsage, m_StateChangeTime, and m_TimeTrackerReferenced by OnStoreLoad()
void OnStoreSaveCustom(ParamsWriteContext ctx)References Serializer.Write(), m_CropsCount, m_CropsType
Show 16 more
, m_CurrentPlantMaterialQuantity, m_DeleteDryPlantTime, m_FullMaturityTime, m_GrowthStagesCount, m_HasCrops, m_InfestationChance, m_IsInfested, m_PlantMaterialMultiplier, m_PlantState, m_PlantStateIndex, m_SpoilAfterFullMaturityTime, m_SpoiledRemoveTime, m_SprayQuantity, m_SprayUsage, m_StateChangeTime, and m_TimeTrackerReferenced by OnStoreSave()
void PrintValues()Referenced by GardenBase.PrintSlots()
References ItemBase.CanPutInCargo()
References EntityAI.CanPutIntoHands()
void ChangeInfestation(bool is_infested)void UpdatePlant()Referenced by GrowthTimerTick(), Harvest(), OnStoreLoadCustom()
Show 3 more
, SetDry(), SetSpoiled(), and SprayPlant()void GrowthTimerTick()void SetSpoiled()Referenced by Tick()
void SetDry()Referenced by GrowthTimerTick()
void SprayPlant(float consumed_quantity)References ChangeInfestation(), UpdatePlant(), m_InfestationChance
Show 3 more
, m_IsInfested, m_SprayQuantity, and m_SprayUsageReferenced by CAContinuousDisinfectPlant.Execute()
void RemovePlantEx(vector pos)References Class.Cast(), CGame.CreateObjectEx(), CGame.IsServer()
Show 4 more
, RemoveSlot(), ItemBase.SetQuantity(), ItemBase.UnlockFromParent(), and m_CurrentPlantMaterialQuantityReferenced by ActionRemovePlant.OnExecuteServer()
void DestroyPlant()Referenced by ~PlantBase()
void Harvest(PlayerBase player)Referenced by ActionHarvestCrops.OnFinishProgressServer()
void SetPlantState(int state)EPlantState GetPlantState()References m_PlantState
int GetPlantStateIndex()References m_PlantStateIndex
Referenced by ActionDisinfectPlant.ActionCondition()
float GetWater()Referenced by CAContinuousWaterPlant.Setup()
float GetWaterMax()Referenced by CAContinuousWaterPlant.Setup()
bool NeedsWater()void RemoveSlot()Slot GetSlot()References m_Slot
Referenced by ActionWaterPlant.OnFinishProgressClient(), ActionWaterPlant.OnFinishProgressServer(), CAContinuousWaterPlant.Execute()
Show 3 more
, GetWater(), GetWaterMax(), and OnStoreSave()GardenBase GetGarden()References m_GardenBase
bool IsSprayable()bool IsHarvestable()Referenced by ActionHarvestCrops.ActionCondition(), ActionRemovePlant.ActionCondition(), and Harvest()
override void SetActions()References m_DeleteDryPlantTime, m_FullMaturityTime, m_GrowthStagesCount
Show 3 more
, m_SpoilAfterFullMaturityTime, m_SpoiledRemoveTime, and m_StateChangeTimeReferences m_DebugDeleteDryTime, m_DebugFullMaturityTime, m_DebugSpoilRemoveTime
Show 1 more
, m_DebugSpoilTimestatic void DebugSetTickSpeedMultiplier(float multiplier)References m_DebugTickSpeedMultiplier
void DeleteDryPlantTick()void SpoiledRemoveTimerTick()void InfestationTimerTick()void CheckWater()bool IsMature()bool IsSpoiled()bool IsDry()bool IsGrowing()bool NeedsSpraying()void RemovePlant()Referenced by ActionDisinfectPlantBit.OnExecuteServer()