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

◆ SetSlotTextureFertilized()

void ItemBase::SetSlotTextureFertilized ( int slot_index,
string item_type )
inlineprivate

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

615 {
616 TStringArray textures = GetHiddenSelectionsTextures();
617
618 int tex_id = GetGame().ConfigGetInt( string.Format("cfgVehicles %1 Horticulture TexId", item_type) );
619
620 string str_show = SLOT_SELECTION_DIGGED_PREFIX + (slot_index + 1).ToStringLen(2);
621
622 ShowSelection( str_show );
623 SetObjectTexture( slot_index, textures.Get(tex_id) );
624
625 Slot slot = m_Slots.Get( slot_index );
626
627 int slot_index_offset = 0;
628
629 // Set material according to dry / wet states
630 if ( slot.GetWateredState() == 0 )
631 {
632 // Set dry material for garden lime
633 if ( slot.GetFertilityType() == "GardenLime" )
634 {
635 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_LIMED_DRY );
636 }
637 else if ( slot.GetFertilityType() == "PlantMaterial" )
638 {
639 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_COMPOST_DRY );
640 }
641 }
642 else
643 {
644 // Set dry material for compost
645 if ( slot.GetFertilityType() == "GardenLime" )
646 {
647 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_LIMED_WET );
648 }
649 else if ( slot.GetFertilityType() == "PlantMaterial" )
650 {
651 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_COMPOST_WET );
652 }
653 }
654 }
string ToStringLen(int len)
Integer to string with fixed length, padded with zeroes.
Определения EnConvert.c:59
proto native int ConfigGetInt(string path)
Get int value from config on path.
static const string SLOT_MATERIAL_COMPOST_DRY
Определения GardenBase.c:14
ref array< ref Slot > m_Slots
Определения GardenBase.c:26
static const string SLOT_MATERIAL_COMPOST_WET
Определения GardenBase.c:13
static const string SLOT_MATERIAL_LIMED_DRY
Определения GardenBase.c:12
static const string SLOT_MATERIAL_LIMED_WET
Определения GardenBase.c:11
static const string SLOT_SELECTION_DIGGED_PREFIX
Определения GardenBase.c:17
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:709

Перекрестные ссылки CGame::ConfigGetInt(), GetGame(), m_Slots, SLOT_MATERIAL_COMPOST_DRY, SLOT_MATERIAL_COMPOST_WET, SLOT_MATERIAL_LIMED_DRY, SLOT_MATERIAL_LIMED_WET, SLOT_SELECTION_DIGGED_PREFIX и ToStringLen().

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