DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PlantBase.c
См. документацию.
9
10class PlantBase extends ItemBase
11{
12 private float m_SprayUsage; // How much spray is needed to stop infestation of plant
13
14 private float m_InfestationChance;
15
16 private int m_GrowthStagesCount;
17 private int m_CropsCount;
18 private bool m_HasCrops;
19 private string m_CropsType;
21
22 private int m_PlantStateIndex;
25
26 private bool m_IsInfested;
27 private float m_SprayQuantity;
28 bool m_MarkForDeletion = false;
29
30 int m_DeleteDryPlantTime; // For how long in seconds can an unwatered plant exist before it disappears
31 int m_SpoiledRemoveTime; // For how long in seconds a spoiled plant will exist
32 int m_FullMaturityTime; // How much time needs plant to be full grown in seconds
33 int m_SpoilAfterFullMaturityTime; // How long in seconds it takes for plant to be spoiled after it is full grown
34 float m_StateChangeTime; // For how long in seconds will plant stay in one state before its going to next state
35
36 protected ref Timer m_TimeTicker;
37 protected float m_TimeTracker;
38
39 private GardenBase m_GardenBase = NULL;
40 private ref Slot m_Slot = NULL;
41
42 private PluginHorticulture m_ModuleHorticulture;
43
44 private const float SPOIL_AFTER_MATURITY_TIME = 14400; //The time it takes for a fully grown plant to spoil, in seconds
45 private const int TICK_FREQUENCY = 1; // seconds
46
47 // debug
49 static int m_DebugSpoilTime;
53
54 void PlantBase()
55 {
56 m_ModuleHorticulture = PluginHorticulture.Cast( GetPlugin( PluginHorticulture ) );
57
58 m_SprayUsage = 5;
59 m_DeleteDryPlantTime = (60 * 10) + Math.RandomInt(0, 60 * 2);
60 m_SpoiledRemoveTime = (60 * 20) + Math.RandomInt(0, 60 * 5);
61
62 string plant_type = this.GetType();
63 m_GrowthStagesCount = GetGame().ConfigGetInt( "cfgVehicles " + plant_type + " Horticulture GrowthStagesCount" );
64 m_CropsCount = GetGame().ConfigGetInt( "cfgVehicles " + plant_type + " Horticulture CropsCount" );
65 GetGame().ConfigGetText( "cfgVehicles " + plant_type + " Horticulture CropsType", m_CropsType );
66
67 if (m_GrowthStagesCount == 0)
69
70 m_InfestationChance = 0.2 / m_GrowthStagesCount; //Must be between 0 and 1
71
74 m_IsInfested = false;
75 m_SprayQuantity = 0.0;
76 m_HasCrops = true;
77
78 SetTakeable( false );
79
80 RegisterNetSyncVariableBool("m_HasCrops");
81 RegisterNetSyncVariableInt("m_PlantState");
82 RegisterNetSyncVariableInt("m_PlantStateIndex");
83
84 if (GetGame().IsServer())
85 {
87 m_TimeTicker.Run(TICK_FREQUENCY, this, "Tick", NULL, true);
88 }
89 }
90
92 {
93 if (m_TimeTicker)
94 m_TimeTicker.Stop();
95
97 {
99 }
100 }
101
102 void Init( GardenBase garden_base, float fertility, float harvesting_efficiency, float water )
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 }
143
144 void Tick()
145 {
147
148 switch (m_PlantState)
149 {
150 case (EPlantState.GROWING):
153
154 break;
155
156 case (EPlantState.MATURE):
158 SetSpoiled();
159
160 break;
161
162 case (EPlantState.SPOILED):
164 RemoveSlot();
165
166 break;
167
168 case (EPlantState.DRY):
170 RemoveSlot();
171
172 break;
173 }
174
175 }
176
177 override bool OnStoreLoad( ParamsReadContext ctx, int version )
178 {
179 if ( !super.OnStoreLoad( ctx, version ) )
180 return false;
181
182 GardenBase garden = GardenBase.Cast( GetHierarchyParent() );
183
184 int slot_index = -1;
185 ctx.Read( slot_index );
186
187 Slot slot = garden.GetSlotByIndex(slot_index);
188
189 SetSlot(slot);
190
191 if ( !OnStoreLoadCustom( ctx, version ) )
192 return false;
193
194 return true;
195 }
196
197 override void OnStoreSave( ParamsWriteContext ctx )
198 {
199 super.OnStoreSave( ctx );
200
201 Slot slot = GetSlot();
202
203 if (slot)
204 {
205 int slot_index = slot.GetSlotIndex();
206 slot.SetPlant(this); // hack
207
208 ctx.Write( slot_index );
209
210 OnStoreSaveCustom( ctx );
211 }
212 else
213 {
214 GetGame().ObjectDelete(this); // Plants that exist without a garden must be deleted. Otherwise they might cause problems.
215 Print("Warning! A plant existed without a garden. Therefore it was deleted from the world to prevent issues!");
216 }
217 }
218
220 {
221 return m_CropsType;
222 }
223
224
225 bool OnStoreLoadCustom( ParamsReadContext ctx, int version )
226 {
227 int loadInt;
228 if ( !ctx.Read( loadInt ) )
229 loadInt = 0;
230
231 m_SprayUsage = loadInt;
232
233 loadInt = 0;
234 if ( !ctx.Read( loadInt ) )
235 loadInt = 5;
236
237 m_DeleteDryPlantTime = loadInt;
238
239 loadInt = 0;
240 if ( !ctx.Read( loadInt ) )
241 loadInt = 5;
242 m_SpoiledRemoveTime = loadInt;
243
244 loadInt = 0;
245 if ( !ctx.Read( loadInt ) )
246 loadInt = 300;
247 m_FullMaturityTime = loadInt;
248
249 loadInt = 0;
250 if ( !ctx.Read( loadInt ) )
251 loadInt = 300;
253
254 loadInt = 0;
255 if ( !ctx.Read( loadInt ) )
256 return false;
257 m_StateChangeTime = loadInt;
258
259 float loadFloat = 0.0;
260 if ( !ctx.Read( loadFloat ) )
261 loadFloat = 0;
262 m_InfestationChance = loadFloat;
263
264 loadInt = 0;
265 if ( !ctx.Read( loadInt ) )
266 return false;
267 m_GrowthStagesCount = loadInt;
268
269 loadInt = 0;
270 if ( !ctx.Read( loadInt ) )
271 loadInt = 1;
272 m_CropsCount = loadInt;
273
274 string loadString = "";
275 if ( !ctx.Read( loadString ) )
276 return false;
277 m_CropsType = loadString;
278
279 loadFloat = 0.0;
280 if ( !ctx.Read( loadFloat ) )
281 loadFloat = 1;
282 m_PlantMaterialMultiplier = loadFloat;
283
284 loadInt = 0;
285 if ( !ctx.Read( loadInt ) )
286 loadInt = 1;
287 m_PlantState = loadInt;
288
289 loadInt = 0;
290 if ( !ctx.Read( loadInt ) )
291 loadInt = 0;
292 m_PlantStateIndex = loadInt;
293
294 loadFloat = 0.0;
295 if ( !ctx.Read( loadFloat ) )
296 loadFloat = 1;
298
299 bool loadBool = false;
300 if ( !ctx.Read( loadBool ) )
301 loadBool = false;
302 m_IsInfested = loadBool;
303
304 loadFloat = 0.0;
305 if ( !ctx.Read( loadFloat ) )
306 loadFloat = 0;
307 m_SprayQuantity = loadFloat;
308
309
310
311 loadBool = false;
312 if ( ctx.Read( loadBool ) )
313 {
314 if ( loadBool )
315 {}
316 }
317 else
318 {
319 return false;
320 }
321
322 loadFloat = 0.0;
323 if ( ctx.Read( loadFloat ) )
324 {
325 if ( loadFloat > 0.0 )
326 {}
327 }
328 else
329 {
330 return false;
331 }
332
333 loadFloat = 0.0;
334 if ( ctx.Read( loadFloat ) )
335 {
336 if ( loadFloat > 0.0 )
337 m_TimeTracker = loadFloat; // spoil
338 }
339 else
340 {
341 return false;
342 }
343
344 loadFloat = 0.0;
345 if ( ctx.Read( loadFloat ) )
346 {
347 if ( loadFloat > 0.0 )
348 m_TimeTracker = loadFloat; // spoil delete
349 }
350 else
351 {
352 return false;
353 }
354
355 loadFloat = 0.0;
356 if ( ctx.Read( loadFloat ) )
357 {
358 if ( loadFloat > 0.0 )
359 m_TimeTracker = loadFloat; // dry delete
360 }
361 else
362 {
363 return false;
364 }
365
366
367 UpdatePlant();
368 return true;
369 }
370
372 {
373 ctx.Write( m_SprayUsage );
374
376
378
380
382
384
386
388
389 ctx.Write( m_CropsCount );
390
391 ctx.Write( m_CropsType );
392
394
395 ctx.Write( m_PlantState );
396
398
400
401 ctx.Write( m_IsInfested );
402
403 ctx.Write( m_SprayQuantity );
404
405 bool saveBool = false; // deprec
406 ctx.Write( saveBool );
407
408 float saveFloat = 0.0; // deprec
409 ctx.Write( saveFloat );
410
411 saveFloat = 0.0;
412 if (m_PlantState == EPlantState.MATURE)
413 {
414 saveFloat = m_TimeTracker;
415 }
416 ctx.Write( saveFloat );
417
418 saveFloat = 0.0;
419 if (m_PlantState == EPlantState.SPOILED)
420 {
421 saveFloat = m_TimeTracker;
422 }
423 ctx.Write( saveFloat );
424
425 saveFloat = 0.0;
426 if (m_PlantState == EPlantState.DRY)
427 {
428 saveFloat = m_TimeTracker;
429 }
430 ctx.Write( saveFloat );
431 }
432
434 {
435 Print("PRINT ALL VALUES OF PLANT...");
436 Print(this);
437
444 Print(m_Slot);
446 Print("----------------------------------------------------------");
447 }
448
449 override bool CanPutInCargo( EntityAI parent )
450 {
451 return super.CanPutInCargo(parent);
452 }
453
454 override bool CanPutIntoHands( EntityAI parent )
455 {
456 return super.CanPutIntoHands(parent);
457 }
458
459 override bool CanRemoveFromHands( EntityAI parent )
460 {
461 return false;
462 }
463
464 void ChangeInfestation( bool is_infested )
465 {
466 m_IsInfested = is_infested;
467
468 string plant_type = GetType();
469 PlantMaterialHealth material = m_ModuleHorticulture.GetPlantMaterial( plant_type );
470
471 if ( m_IsInfested )
472 {
473 if ( material.m_InfestedTex != "" )
474 {
475 SetObjectTexture( 0, material.m_InfestedTex );
476 }
477 if ( material.m_InfestedMat != "" )
478 {
479 SetObjectMaterial( 0, material.m_InfestedMat );
480 }
481 }
482 else
483 {
484 if ( material.m_HealthyTex != "" )
485 {
486 SetObjectTexture( 0, material.m_HealthyTex );
487 }
488 if ( material.m_HealthyMat != "" )
489 {
490 SetObjectMaterial( 0, material.m_HealthyMat );
491 }
492 }
493 }
494
496 {
497 if ( m_PlantStateIndex > 0 )
498 {
499 string plant_state_index = m_PlantStateIndex.ToStringLen(2);
500 string prev_plant_state_index = ( m_PlantStateIndex - 1 ).ToStringLen( 2 );
501
502 // HIDING PREVIOUS PLANT STATE AND SHOWING THE CURRENT ONE
503 ShowSelection( "plantStage_" + plant_state_index ); // SHOW!
504 HideSelection( "plantStage_" + prev_plant_state_index ); // HIDE!
505
506 // HIDING PREVIOUS CROPS STATE AND SHOWING THE CURRENT ONE
507
508 if ( HasCrops() )
509 {
510 ShowSelection( "plantStage_" + plant_state_index + "_crops" ); // SHOW!
511 HideSelection( "plantStage_" + prev_plant_state_index + "_crops" ); // HIDE!
512 }
513 else
514 {
515 HideSelection( "plantStage_" + plant_state_index + "_crops" ); // HIDE!
516 HideSelection( "plantStage_" + prev_plant_state_index + "_crops" ); // HIDE!
517 }
518
519 // HIDING PREVIOUS SHADOW STATE AND SHOWING THE CURRENT ONE
520 ShowSelection( "plantStage_" + plant_state_index + "_shadow" ); // SHOW!
521 HideSelection( "plantStage_" + prev_plant_state_index + "_shadow" ); // HIDE!
522 }
523
524 float float_plant_state_index = (float)m_PlantStateIndex;
526 }
527
529 {
530 m_TimeTracker = 0;
531
533 {
535 UpdatePlant();
536 SetSynchDirty();
537
538 float infestation_rnd = Math.RandomFloat01();
539 if ( m_InfestationChance > infestation_rnd )
540 ChangeInfestation(true);
541
543 {
544 if (m_IsInfested)
545 SetDry();
546 else
548 }
549 }
550 }
551
553 {
554 if (m_PlantState != EPlantState.SPOILED)
555 {
557 UpdatePlant();
558 SetPlantState(EPlantState.SPOILED);
559 }
560 }
561
562 void SetDry()
563 {
564 if (m_PlantState != EPlantState.DRY)
565 {
567 UpdatePlant();
569 }
570 }
571
572 //NEW METHOD FOR PLANT SPRAYING
573 void SprayPlant( float consumed_quantity )
574 {
575 //Rework this to have something smooth
576 m_SprayQuantity += consumed_quantity;
577
579 {
580 m_IsInfested = false;
582
583 ChangeInfestation( false );
584 UpdatePlant();
585 }
586 }
587
588 //DEPRECATED
589 string StopInfestation( float consumed_quantity )
590 {
591 m_SprayQuantity += consumed_quantity;
592
594 {
595 m_IsInfested = false;
597
598 ChangeInfestation( false );
599 UpdatePlant();
600
601 return "I've sprayed the plant a bit. Now it is enough spayed.";
602 }
603 else
604 {
605 return "I've sprayed the plant a bit.";
606 }
607 }
608
610 {
611 if ( GetGame() && GetGame().IsServer() )
612 {
614
616 {
617 ItemBase item = ItemBase.Cast( GetGame().CreateObjectEx( "PlantMaterial", pos, ECE_PLACE_ON_SURFACE ) );
619 }
620
621 RemoveSlot();
622 }
623 }
624
626 {
627 if ( GetGame() && GetGame().IsServer() )
628 {
630
631 RemoveSlot();
632 }
633 }
634
635 void Harvest( PlayerBase player )
636 {
637 if (IsHarvestable())
638 {
639 for ( int i = 0; i < m_CropsCount; i++ )
640 {
641 vector pos = player.GetPosition();
642 ItemBase item = ItemBase.Cast( GetGame().CreateObjectEx( m_CropsType, pos, ECE_PLACE_ON_SURFACE ) );
643 item.SetQuantity( item.GetQuantityMax() );
644 }
645 }
646
647 m_HasCrops = false;
648 SetSynchDirty();
649 UpdatePlant();
650 }
651
652 void SetPlantState(int state)
653 {
654 m_PlantState = state;
655 m_TimeTracker = 0;
656 SetSynchDirty();
657 }
658
660 {
661 return m_PlantState;
662 }
663
665 {
666 return m_PlantStateIndex;
667 }
668
669 float GetWater()
670 {
671 if ( GetSlot() )
672 return GetSlot().GetWater();
673
674 return 0;
675 }
676
678 {
679 if ( GetSlot() )
680 return GetSlot().GetWaterUsage();
681
682 return 0;
683 }
684
686 {
687 Slot slotPlant = m_Slot;
688
689 if ( m_PlantState == EPlantState.PAUSED && slotPlant && slotPlant.GetWater() < slotPlant.GetWaterUsage() )
690 return true;
691
692 return false;
693 }
694
696 {
697 return m_SprayQuantity;
698 }
699
701 {
702 return m_SprayUsage;
703 }
704
706 {
707 GardenBase garden = GardenBase.Cast( GetHierarchyParent() );
708
709 if ( garden )
710 garden.RemoveSlotPlant( this );
711 }
712
713 void SetSlot(Slot slot)
714 {
715 if ( slot )
716 {
717 m_Slot = slot;
718 }
719 }
720
721 Slot GetSlot()
722 {
723 return m_Slot;
724 }
725
727 {
728 return m_GardenBase;
729 }
730
732 {
734 return true;
735
736 return false;
737 }
738
740 {
741 if (m_PlantState == EPlantState.MATURE && m_HasCrops)
742 return true;
743
744 return false;
745 }
746
747 bool HasCrops()
748 {
749 return m_HasCrops;
750 }
751
752 override void SetActions()
753 {
754 super.SetActions();
755
758 }
759
760 void DebugSetTimes(int maturity, int spoil, int spoilRemove, int dryDelete)
761 {
762 if (maturity != 0)
763 {
764 m_FullMaturityTime = maturity;
766 }
767
768 if (spoil != 0)
770
771 if (spoilRemove != 0)
772 m_SpoiledRemoveTime = spoilRemove;
773
774 if (dryDelete != 0)
775 m_DeleteDryPlantTime = dryDelete;
776 }
777
778 static void DebugSetGlobalTimes(int maturity, int spoil, int spoilRemove, int dryDelete)
779 {
780 m_DebugFullMaturityTime = maturity;
781 m_DebugSpoilTime = spoil;
782 m_DebugSpoilRemoveTime = spoilRemove;
783 m_DebugDeleteDryTime = dryDelete;
784 }
785
786 static void DebugSetTickSpeedMultiplier(float multiplier)
787 {
788 m_DebugTickSpeedMultiplier = multiplier;
789 }
790
791 // DEPRECATED
792 static const int STATE_DRY = 0;
793 static const int STATE_GROWING = 1;
794 static const int STATE_MATURE = 2;
795 static const int STATE_SPOILED = 3;
796
802
807 bool IsMature();
808 bool IsSpoiled();
809 bool IsDry();
810 bool IsGrowing();
813}
Param3 int
@ DRY
Определения EntityAI.c:3
eBleedingSourceType GetType()
Определения BleedingSource.c:63
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
void SetActions()
Определения AdvancedCommunication.c:213
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
override Widget Init()
Определения DayZGame.c:127
string ToStringLen(int len)
Integer to string with fixed length, padded with zeroes.
Определения EnConvert.c:59
override bool CanPutInCargo(EntityAI parent)
Определения ExplosivesBase.c:277
override bool CanPutIntoHands(EntityAI parent)
Определения ExplosivesBase.c:287
override bool CanRemoveFromHands(EntityAI parent)
Определения ExplosivesBase.c:297
override void SetTakeable(bool pState)
Определения ItemBase.c:9042
void UnlockFromParent()
Unlocks this item from its attachment slot of its parent.
Определения ItemBase.c:5623
void OnStoreSave(ParamsWriteContext ctx)
Определения ModifiersManager.c:229
bool OnStoreLoad(ParamsReadContext ctx, int version)
Определения ModifiersManager.c:265
bool IsGrowing()
void SetDry()
Определения PlantBase.c:562
ref Timer m_GrowthTimer
Определения PlantBase.c:800
bool NeedsWater()
Определения PlantBase.c:685
string GetCropsType()
Определения PlantBase.c:219
static const int STATE_GROWING
Определения PlantBase.c:793
void OnStoreSaveCustom(ParamsWriteContext ctx)
Определения PlantBase.c:371
Slot GetSlot()
Определения PlantBase.c:721
PluginHorticulture m_ModuleHorticulture
Определения PlantBase.c:42
float m_TimeTracker
Определения PlantBase.c:37
bool IsMature()
bool IsSpoiled()
void InfestationTimerTick()
ref Timer m_InfestationTimer
Определения PlantBase.c:801
float m_InfestationChance
Определения PlantBase.c:14
ref Timer m_TimeTicker
Определения PlantBase.c:36
GardenBase m_GardenBase
Определения PlantBase.c:39
int m_PlantStateIndex
Определения PlantBase.c:22
bool IsDry()
enum EPlantState m_SprayUsage
int GetPlantStateIndex()
Определения PlantBase.c:664
void PrintValues()
Определения PlantBase.c:433
bool m_HasCrops
Определения PlantBase.c:18
void SprayPlant(float consumed_quantity)
Определения PlantBase.c:573
void DestroyPlant()
Определения PlantBase.c:625
void ChangeInfestation(bool is_infested)
Определения PlantBase.c:464
float m_PlantMaterialMultiplier
Определения PlantBase.c:20
GardenBase GetGarden()
Определения PlantBase.c:726
static int m_DebugFullMaturityTime
Определения PlantBase.c:48
void DebugSetTimes(int maturity, int spoil, int spoilRemove, int dryDelete)
Определения PlantBase.c:760
EPlantState m_PlantState
Определения PlantBase.c:24
const float SPOIL_AFTER_MATURITY_TIME
Определения PlantBase.c:44
void ~PlantBase()
Определения PlantBase.c:91
ref Timer m_SpoiledRemoveTimer
Определения PlantBase.c:797
float GetSprayUsage()
Определения PlantBase.c:700
float m_StateChangeTime
Определения PlantBase.c:34
EPlantState
Определения PlantBase.c:2
@ MATURE
Определения PlantBase.c:5
@ SPOILED
Определения PlantBase.c:6
@ GROWING
Определения PlantBase.c:4
void CheckWater()
static int m_DebugDeleteDryTime
Определения PlantBase.c:51
int m_CropsCount
Определения PlantBase.c:17
int m_SpoiledRemoveTime
Определения PlantBase.c:31
bool m_MarkForDeletion
Определения PlantBase.c:28
ref Timer m_DeleteDryPlantTimer
Определения PlantBase.c:798
void SpoiledRemoveTimerTick()
float m_SprayQuantity
Определения PlantBase.c:27
bool IsHarvestable()
Определения PlantBase.c:739
void RemovePlantEx(vector pos)
Определения PlantBase.c:609
void RemoveSlot()
Определения PlantBase.c:705
bool HasCrops()
Определения PlantBase.c:747
bool IsSprayable()
Определения PlantBase.c:731
static int m_DebugSpoilTime
Определения PlantBase.c:49
static void DebugSetTickSpeedMultiplier(float multiplier)
Определения PlantBase.c:786
static const int STATE_SPOILED
Определения PlantBase.c:795
float GetWaterMax()
Определения PlantBase.c:677
static void DebugSetGlobalTimes(int maturity, int spoil, int spoilRemove, int dryDelete)
Определения PlantBase.c:778
bool NeedsSpraying()
EPlantState GetPlantState()
Определения PlantBase.c:659
static float m_DebugTickSpeedMultiplier
Определения PlantBase.c:52
int m_GrowthStagesCount
Определения PlantBase.c:16
static int m_DebugSpoilRemoveTime
Определения PlantBase.c:50
void PlantBase()
Определения PlantBase.c:54
void GrowthTimerTick()
Определения PlantBase.c:528
ref Slot m_Slot
Определения PlantBase.c:40
float m_CurrentPlantMaterialQuantity
Определения PlantBase.c:23
float GetWater()
Определения PlantBase.c:669
static const int STATE_DRY
Определения PlantBase.c:792
void SetSpoiled()
Определения PlantBase.c:552
void RemovePlant()
ref Timer m_SpoilAfterFullMaturityTimer
Определения PlantBase.c:799
string m_CropsType
Определения PlantBase.c:19
void SetSlot(Slot slot)
Определения PlantBase.c:713
bool m_IsInfested
Определения PlantBase.c:26
static const int STATE_MATURE
Определения PlantBase.c:794
void UpdatePlant()
Определения PlantBase.c:495
void DeleteDryPlantTick()
int m_DeleteDryPlantTime
Определения PlantBase.c:30
bool OnStoreLoadCustom(ParamsReadContext ctx, int version)
Определения PlantBase.c:225
int m_SpoilAfterFullMaturityTime
Определения PlantBase.c:33
void SetPlantState(int state)
Определения PlantBase.c:652
void Harvest(PlayerBase player)
Определения PlantBase.c:635
float GetSprayQuantity()
Определения PlantBase.c:695
const int TICK_FREQUENCY
Определения PlantBase.c:45
int m_FullMaturityTime
Определения PlantBase.c:32
string StopInfestation(float consumed_quantity)
Определения PlantBase.c:589
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
void Tick()
Определения SoundEvents.c:107
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native Weather GetWeather()
Returns weather controller object.
proto native void ObjectDelete(Object obj)
Определения Building.c:6
Определения GardenPlot.c:2
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfWoodenPlanks.c:88
Определения InventoryItem.c:731
Определения EnMath.c:7
string m_HealthyMat
Определения PlantMaterial.c:6
string m_InfestedMat
Определения PlantMaterial.c:4
string m_HealthyTex
Определения PlantMaterial.c:5
string m_InfestedTex
Определения PlantMaterial.c:3
Определения PlayerBaseClient.c:2
proto bool Write(void value_out)
proto bool Read(void value_in)
Определения DayZPlayerImplement.c:63
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native float GetActual()
Определения EnConvert.c:97
Определения EnConvert.c:106
Serializer ParamsReadContext
Определения gameplay.c:15
proto native CGame GetGame()
Serializer ParamsWriteContext
Определения gameplay.c:16
proto void Print(void var)
Prints content of variable to console/log.
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Определения EnMath.c:126
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.
const int CALL_CATEGORY_SYSTEM
Определения tools.c:8
@ PAUSED
The video is paused.
Определения EnWidgets.c:523