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

◆ PlantSeed()

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

Adjust slot water

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

444 {
445 int slot_index = GetSlotIndexBySelection( selection_component );
446
447 if ( slot_index != -1 )
448 {
449 PluginHorticulture module_horticulture = PluginHorticulture.Cast( GetPlugin( PluginHorticulture ) );
450 string plant_type = module_horticulture.GetPlantType( seed );
451
452 Slot slot = m_Slots.Get( slot_index );
453 slot.SetState(eGardenSlotState.STATE_PLANTED);
454 slot.m_PlantType = plant_type;
455 slot.SetSeed(seed);
456
457 if ( !slot.NeedsWater() || slot.GetWateredState() == eWateredState.WET)
458 {
460 if (slot.GetWateredState() == eWateredState.WET && slot.NeedsWater())
461 {
462 int waterMax = slot.GetWaterMax();
463 slot.SetWater(waterMax);
464 }
465
466 seed.LockToParent();
467 //Take some small amount of time before making a plant out of seeds
469 }
470 }
471 }
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
int GetSlotIndexBySelection(string selection_component)
Определения GardenBase.c:720
static const float CREATE_PLANT_DELAY
Определения GardenBase.c:23
ref array< ref Slot > m_Slots
Определения GardenBase.c:26
void CreatePlant(Slot slot)
Определения GardenBase.c:474
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/tools/tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, ScriptCallQueue::CallLater(), CREATE_PLANT_DELAY, CreatePlant(), CGame::GetCallQueue(), GetGame(), GetPlugin(), GetSlotIndexBySelection() и m_Slots.

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