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

◆ PlantSeed()

void ItemBase::PlantSeed ( ItemBase seed,
string selection_component )
inlineprivate

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

384 {
385 int slot_index = GetSlotIndexBySelection( selection_component );
386
387 if ( slot_index != -1 )
388 {
389 PluginHorticulture module_horticulture = PluginHorticulture.Cast( GetPlugin( PluginHorticulture ) );
390 string plant_type = module_horticulture.GetPlantType( seed );
391
392 Slot slot = m_Slots.Get( slot_index );
393 slot.SetState(Slot.STATE_PLANTED);
394 slot.m_PlantType = plant_type;
395 slot.SetSeed(seed);
396
397 if ( !slot.NeedsWater() )
398 {
399 seed.LockToParent();
400 //Take some small amount of time before making a plant out of seeds
401 Timer growthTimer = NULL;
402 growthTimer = new Timer( CALL_CATEGORY_SYSTEM );
403 Param createPlantParam = new Param1<Slot>(slot);
404 growthTimer.Run( 0.1, this, "CreatePlant", createPlantParam, false ); //Use a const for timer delay
405 }
406 }
407 }
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
int GetSlotIndexBySelection(string selection_component)
Определения GardenBase.c:662
ref array< ref Slot > m_Slots
Определения GardenBase.c:25
const int CALL_CATEGORY_SYSTEM
Определения tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetPlugin(), GetSlotIndexBySelection() и m_Slots.

Используется в EEItemAttached().