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

◆ CreatePlant()

void ItemBase::CreatePlant ( Slot slot)
inlineprivate

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

475 {
476 if (g_Game.IsServer() || !g_Game.IsMultiplayer())
477 {
478 ItemBase seed = slot.GetSeed();
479 if (seed)
480 {
481 seed.UnlockFromParent();
482 GetGame().ObjectDelete(seed);
483
484 PlantBase plant = PlantBase.Cast( GetInventory().CreateAttachmentEx(slot.m_PlantType, slot.GetSlotId()));
485 int slot_index = slot.GetSlotIndex();
486 slot.SetPlant(plant);
487 slot.SetState(eGardenSlotState.STATE_PLANTED);
488 plant.Init(this, slot.GetFertility(), slot.m_HarvestingEfficiency, slot.GetWater());
489 plant.LockToParent();
490 }
491 }
492 }
DayZGame g_Game
Определения DayZGame.c:3868
class GP5GasMask extends MaskBase ItemBase
void PlantBase()
Определения PlantBase.c:54
proto native void ObjectDelete(Object obj)
proto native CGame GetGame()

Перекрестные ссылки g_Game, GetGame(), CGame::ObjectDelete() и PlantBase().

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