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

◆ RemoveSlot()

void ItemBase::RemoveSlot ( int index)
inlineprivate

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

604 {
605 if ( m_Slots != NULL )
606 {
607 Slot slot = m_Slots.Get( index );
608 PlantBase plant = slot.GetPlant();
609
610 if ( plant )
611 {
612 plant.UnlockFromParent();
613 plant.m_MarkForDeletion = true;
614 GetGame().ObjectDelete( plant );
615 }
616
617 slot.Init( GetBaseFertility() );
618
619 // Clear relevant bit
620 slot.SetFertilityState(eFertlityState.NONE);
621 m_SlotFertilityState &= ~(1 << slot.GetSlotIndex());
622
623 slot.SetFertilityType(string.Empty);
624 slot.SetFertilizerQuantity(0);
625
626 slot.SetWateredState( eWateredState.DRY );
627 m_SlotWateredState &= ~(1 << slot.GetSlotIndex());
628
629 slot.SetWater(0);
630
631 SetSynchDirty();
632
633 HideSelection( SLOT_SELECTION_COVERED_PREFIX + (index + 1).ToStringLen(2) );
634 UpdateSlotTexture( index );
635 }
636 }
string ToStringLen(int len)
Integer to string with fixed length, padded with zeroes.
Определения EnConvert.c:59
Empty
Определения Hand_States.c:14
void PlantBase()
Определения PlantBase.c:54
eFertlityState
Определения Slot.c:2
proto native void ObjectDelete(Object obj)
int m_SlotFertilityState
Определения GardenBase.c:26
ref array< ref Slot > m_Slots
Определения GardenBase.c:25
int m_SlotWateredState
Определения GardenBase.c:27
static const string SLOT_SELECTION_COVERED_PREFIX
Определения GardenBase.c:18
float GetBaseFertility()
Определения GardenBase.c:90
void UpdateSlotTexture(int slot_index)
Определения GardenBase.c:512
proto native CGame GetGame()

Перекрестные ссылки Empty, GetBaseFertility(), GetGame(), m_SlotFertilityState, m_Slots, m_SlotWateredState, CGame::ObjectDelete(), PlantBase(), SLOT_SELECTION_COVERED_PREFIX, ToStringLen() и UpdateSlotTexture().