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

◆ RemoveSlot()

void ItemBase::RemoveSlot ( int index)
inlineprivate

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

657 {
658 if (m_Slots)
659 {
660 Slot slot = m_Slots.Get(index);
661 PlantBase plant = slot.GetPlant();
662
663 if (plant && !plant.IsPendingDeletion())
664 {
665 plant.UnlockFromParent();
666 plant.m_MarkForDeletion = true;
667 plant.Delete();
668 }
669
670 slot.Init(GetBaseFertility());
671
672 int idx = slot.GetSlotIndex();
673 int mask = 1 << idx;
674
675 // Clear the relevant bits from bitmaps
676 m_SlotFertilityState &= ~mask;
677 m_SlotWateredState &= ~mask;
678
679 // Reset states
680 m_SlotFertilityState |= (slot.GetFertilityState() << idx);
681 m_SlotWateredState |= (slot.GetWateredState() << idx);
682
683 // Reset stol quantities
684 SetWaterQuantity(index, 0);
685 SetFertilizerQuantity(index, 0);
686
687 UpdateSlots();
688
689 HideSelection(SLOT_SELECTION_COVERED_PREFIX + (index + 1).ToStringLen(2));
691
692 SetSynchDirty();
693 }
694 }
string ToStringLen(int len)
Integer to string with fixed length, padded with zeroes.
Определения EnConvert.c:59
void PlantBase()
Определения PlantBase.c:54
void SetWaterQuantity(int slotIndex, int value)
Определения GardenBase.c:933
int m_SlotFertilityState
Определения GardenBase.c:27
ref array< ref Slot > m_Slots
Определения GardenBase.c:26
int m_SlotWateredState
Определения GardenBase.c:28
static const string SLOT_SELECTION_COVERED_PREFIX
Определения GardenBase.c:18
void SetFertilizerQuantity(int slotIndex, int value)
Определения GardenBase.c:962
void UpdateSlots()
Определения GardenBase.c:104
float GetBaseFertility()
Определения GardenBase.c:148
void UpdateSlotTexture(int slot_index)
This should be only called on server as the selections are synced to clients in C++.
Определения GardenBase.c:563

Перекрестные ссылки GetBaseFertility(), m_SlotFertilityState, m_Slots, m_SlotWateredState, PlantBase(), SetFertilizerQuantity(), SetWaterQuantity(), SLOT_SELECTION_COVERED_PREFIX, ToStringLen(), UpdateSlots() и UpdateSlotTexture().