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

◆ TraverseShowedItems()

void VicinityContainer::TraverseShowedItems ( )
inlineprotected

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

82 {
83 map<string, bool> serialized_types = new map<string, bool>();
84 for ( int i = 0; i < m_ShowedItems.Count(); i++ )
85 {
86 EntityAI entity = m_ShowedItems.GetKey( i );
87 Container container = m_ShowedItems.GetElement( i );
88 string type = entity.GetType();
89 if ( container.IsInherited( ContainerWithCargo ) )
90 {
91 if ( !serialized_types.Contains( type ) )
92 {
93 ContainerWithCargo item_with_cargo = ContainerWithCargo.Cast( container );
94 serialized_types.Insert( type, item_with_cargo.IsOpened() );
95 }
96 }
97 }
98
99 if ( serialized_types.Count() > 0 )
100 {
101 FileSerializer file = new FileSerializer();
102 if ( file.Open( "inventory_state.save", FileMode.APPEND ) )
103 {
104 file.Write( serialized_types.Count() );
105
106 for ( i = 0; i < serialized_types.Count(); i++ )
107 {
108 file.Write( serialized_types.GetKey( i ) );
109 file.Write( serialized_types.GetElement( i ) );
110 }
111 }
112 file.Close();
113 }
114 }
class LogManager EntityAI
const string Container
Определения CentralEconomy.c:6
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().