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

◆ Harvest()

void Harvest ( PlayerBase player)
private

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

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 }
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
bool m_HasCrops
Определения PlantBase.c:18
int m_CropsCount
Определения PlantBase.c:17
bool IsHarvestable()
Определения PlantBase.c:739
string m_CropsType
Определения PlantBase.c:19
void UpdatePlant()
Определения PlantBase.c:495
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
Определения EnConvert.c:106
proto native CGame GetGame()

Перекрестные ссылки ECE_PLACE_ON_SURFACE, GetGame(), IsHarvestable(), m_CropsCount, m_CropsType, m_HasCrops, ItemBase::SetQuantity() и UpdatePlant().