DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Init()

void Init ( GardenBase garden_base,
float fertility,
float harvesting_efficiency,
float water )
private

См. определение в файле PlantBase.c строка 102

103 {
104 m_GardenBase = garden_base;
105
108 else
110
111 if (m_DebugSpoilTime != 0)
113 else
115
116 if (m_DebugSpoilRemoveTime != 0)
118
119 if (m_DebugDeleteDryTime != 0)
121
123
124 float count = m_CropsCount * fertility * harvesting_efficiency;
125 m_CropsCount = (int)Math.Ceil( count );
126
127 m_PlantMaterialMultiplier = 0.1 * harvesting_efficiency;
128
129 float rain_intensity = GetGame().GetWeather().GetRain().GetActual();
130
131 if (m_PlantState < EPlantState.MATURE && !NeedsWater())
132 {
133 SetPlantState(EPlantState.GROWING);
134 GrowthTimerTick(); // first tick happens straight away
135 }
136
137 if (rain_intensity <= 0.0)
138 {
139 if (NeedsWater())
141 }
142 }
Param3 int
bool NeedsWater()
Определения PlantBase.c:685
GardenBase m_GardenBase
Определения PlantBase.c:39
float m_PlantMaterialMultiplier
Определения PlantBase.c:20
static int m_DebugFullMaturityTime
Определения PlantBase.c:48
EPlantState m_PlantState
Определения PlantBase.c:24
const float SPOIL_AFTER_MATURITY_TIME
Определения PlantBase.c:44
float m_StateChangeTime
Определения PlantBase.c:34
EPlantState
Определения PlantBase.c:2
static int m_DebugDeleteDryTime
Определения PlantBase.c:51
int m_CropsCount
Определения PlantBase.c:17
int m_SpoiledRemoveTime
Определения PlantBase.c:31
static int m_DebugSpoilTime
Определения PlantBase.c:49
int m_GrowthStagesCount
Определения PlantBase.c:16
static int m_DebugSpoilRemoveTime
Определения PlantBase.c:50
void GrowthTimerTick()
Определения PlantBase.c:528
int m_DeleteDryPlantTime
Определения PlantBase.c:30
int m_SpoilAfterFullMaturityTime
Определения PlantBase.c:33
void SetPlantState(int state)
Определения PlantBase.c:652
int m_FullMaturityTime
Определения PlantBase.c:32
proto native Weather GetWeather()
Returns weather controller object.
Определения EnMath.c:7
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native float GetActual()
proto native CGame GetGame()
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static proto float Ceil(float f)
Returns ceil of value.

Перекрестные ссылки Math::Ceil(), WeatherPhenomenon::GetActual(), GetGame(), Weather::GetRain(), CGame::GetWeather(), GrowthTimerTick(), 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, NeedsWater(), Math::RandomInt(), SetPlantState() и SPOIL_AFTER_MATURITY_TIME.