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

◆ UpdateSlotTexture()

void ItemBase::UpdateSlotTexture ( int slot_index)
inlineprivate

This should be only called on server as the selections are synced to clients in C++.

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

564 {
565 if (!m_Slots || m_Slots.Count() - 1 < slot_index)
566 return;
567
568 Slot slot = m_Slots.Get( slot_index );
569
570 // Show / Hide selections according to DIGGED or COVERED states.
571 if ( slot.IsDigged() || slot.IsPlanted() )
572 {
573 string str_hide = SLOT_SELECTION_COVERED_PREFIX + (slot_index + 1).ToStringLen(2);
574 string str_show = SLOT_SELECTION_DIGGED_PREFIX + (slot_index + 1).ToStringLen(1);
575
576 HideSelection( str_hide );
577 ShowSelection( str_show );
578 }
579
580 if ( slot.GetFertilityState() == eFertlityState.FERTILIZED && slot.GetFertilityType() != "" )
581 {
582 SetSlotTextureFertilized( slot_index, slot.GetFertilityType() );
583 }
584 else
585 {
586 SetSlotTextureDigged( slot_index );
587 }
588 }
string ToStringLen(int len)
Integer to string with fixed length, padded with zeroes.
Определения EnConvert.c:59
eFertlityState
Определения Slot.c:2
ref array< ref Slot > m_Slots
Определения GardenBase.c:26
static const string SLOT_SELECTION_COVERED_PREFIX
Определения GardenBase.c:18
void SetSlotTextureDigged(int slot_index)
Определения GardenBase.c:590
static const string SLOT_SELECTION_DIGGED_PREFIX
Определения GardenBase.c:17
void SetSlotTextureFertilized(int slot_index, string item_type)
Определения GardenBase.c:614

Перекрестные ссылки m_Slots, SetSlotTextureDigged(), SetSlotTextureFertilized(), SLOT_SELECTION_COVERED_PREFIX, SLOT_SELECTION_DIGGED_PREFIX и ToStringLen().

Используется в Fertilize(), RemoveSlot(), SlotFertilityStateUpdate(), SlotWaterStateUpdate(), SyncSlots(), UpdateTexturesOnAllSlots() и WaterAllSlots().