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

◆ SetSlotTextureFertilized()

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

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

562 {
563 TStringArray textures = GetHiddenSelectionsTextures();
564
565 int tex_id = GetGame().ConfigGetInt( string.Format("cfgVehicles %1 Horticulture TexId", item_type) );
566
567 string str_show = SLOT_SELECTION_DIGGED_PREFIX + (slot_index + 1).ToStringLen(2);
568
569 ShowSelection( str_show );
570 SetObjectTexture( slot_index, textures.Get(tex_id) );
571
572 Slot slot = m_Slots.Get( slot_index );
573
574 int slot_index_offset = 0;
575
576 // Set material according to dry / wet states
577 if ( slot.GetWateredState() == 0 )
578 {
579 // Set dry material for garden lime
580 if ( slot.GetFertilityType() == "GardenLime" )
581 {
582 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_LIMED_DRY );
583 }
584 else if ( slot.GetFertilityType() == "PlantMaterial" )
585 {
586 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_COMPOST_DRY );
587 }
588 }
589 else
590 {
591 // Set dry material for compost
592 if ( slot.GetFertilityType() == "GardenLime" )
593 {
594 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_LIMED_WET );
595 }
596 else if ( slot.GetFertilityType() == "PlantMaterial" )
597 {
598 SetObjectMaterial( slot_index + slot_index_offset, SLOT_MATERIAL_COMPOST_WET );
599 }
600 }
601 }
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:25
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:685

Перекрестные ссылки 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().