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

◆ AddedToCargoEx()

void Container::AddedToCargoEx ( EntityAI item,
bool refresh = true )
inlineprotected

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

69 {
70 InventoryLocation il = new InventoryLocation;
71 item.GetInventory().GetCurrentInventoryLocation( il );
72 int x = il.GetCol();
73 int y = il.GetRow();
74
75 if ( m_ShowedItemPositions.Contains( item ) )
76 {
77 Param3<ref Icon, int, int> item_pos = m_ShowedItemPositions.Get( item );
78 InitIconEx( item_pos.param1, item, x, y, refresh );
79 item_pos.param2 = x;
80 item_pos.param3 = y;
81 }
82 else
83 {
84 ref Icon icon = new Icon( this, false );
85 m_Icons.Insert( icon );
86 InitIconEx( icon, item, x, y, refresh );
87 m_ShowedItemPositions.Insert( item, new Param3<ref Icon, int, int>( icon, x, y ) );
88 }
89
90 if (refresh)
92
93 #ifdef PLATFORM_CONSOLE
94 for ( int i = 0; i < m_Cargo.GetItemCount(); i++ )
95 {
96 EntityAI item2 = m_Cargo.GetItem( i );
97 Param3<ref Icon, int, int> data = m_ShowedItemPositions.Get( item2 );
98 if ( data )
99 {
100 data.param1.SetCargoPos( i );
101 data.param1.SetPos();
102 }
103 }
104
106
107 if (refresh)
108 Refresh();
109 #endif
110 }
class LogManager EntityAI
Icon x
Icon y
ref array< ref Icon > m_Icons
Определения CargoContainer.c:11
int m_FocusedItemPosition
Определения CargoContainer.c:9
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedItemPositions
Определения CargoContainer.c:12
CargoBase m_Cargo
Определения CargoContainer.c:6
override void Refresh()
Определения CargoContainer.c:526
void UpdateHeaderText()
Определения CargoContainer.c:289
Icon InitIconEx(Icon icon, EntityAI item, int pos_x, int pos_y, bool refresh=true)
Определения CargoContainer.c:554
proto native int GetCol()
returns column of cargo if current type is Cargo / ProxyCargo
proto native int GetRow()
returns row of cargo if current type is Cargo / ProxyCargo

Перекрестные ссылки InventoryLocation::GetCol(), InventoryLocation::GetRow(), InitIconEx(), m_Cargo, m_FocusedItemPosition, m_Icons, m_ShowedItemPositions, Math::Min(), Refresh(), UpdateHeaderText(), x и y.

Используется в AddedToCargo() и SetEntity().