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

◆ TraverseShowedItems()

void VicinityContainer::TraverseShowedItems ( )
inlineprotected

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

63 {
64 map<string, bool> serialized_types = new map<string, bool>();
65 for ( int i = 0; i < m_ShowedItems.Count(); i++ )
66 {
67 EntityAI entity = m_ShowedItems.GetKey( i );
68 Container container = m_ShowedItems.GetElement( i );
69 string type = entity.GetType();
70 if ( container.IsInherited( ContainerWithCargo ) )
71 {
72 if ( !serialized_types.Contains( type ) )
73 {
74 ContainerWithCargo item_with_cargo = ContainerWithCargo.Cast( container );
75 serialized_types.Insert( type, item_with_cargo.IsOpened() );
76 }
77 }
78 }
79
80 if ( serialized_types.Count() > 0 )
81 {
82 FileSerializer file = new FileSerializer();
83 if ( file.Open( "inventory_state.save", FileMode.APPEND ) )
84 {
85 file.Write( serialized_types.Count() );
86
87 for ( i = 0; i < serialized_types.Count(); i++ )
88 {
89 file.Write( serialized_types.GetKey( i ) );
90 file.Write( serialized_types.GetElement( i ) );
91 }
92 }
93 file.Close();
94 }
95 }
class LogManager EntityAI
const string Container
Определения CentralEconomy.c:6
map
Определения ControlsXboxNew.c:4
proto native bool Open(string path, FileMode mode=FileMode.READ)
proto native void Close()
proto bool Write(void value_out)
ref map< EntityAI, ref Container > m_ShowedItems
Определения VicinityContainer.c:4
FileMode
Определения EnSystem.c:383

Перекрестные ссылки FileSerializer::Close(), m_ShowedItems, FileSerializer::Open() и Serializer::Write().