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

◆ UpdateConstructionParts()

void UpdateConstructionParts ( )
protected

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

236 {
237 m_ConstructionParts.Clear();
238
239 string construction_path = "cfgVehicles" + " " + GetParent().GetType() + " " + "Construction";
240
241 if ( GetGame().ConfigIsExisting( construction_path ) )
242 {
243 //main parts
244 for ( int i = 0; i < GetGame().ConfigGetChildrenCount( construction_path ); ++i )
245 {
246 string main_part_name;
247 GetGame().ConfigGetChildName( construction_path, i, main_part_name );
248 string part_path = construction_path + " " + main_part_name;
249
250 //parts
251 for ( int j = 0; j < GetGame().ConfigGetChildrenCount( part_path ); ++j )
252 {
253 string part_name;
254 GetGame().ConfigGetChildName( part_path, j, part_name );
255
256 string name;
257 GetGame().ConfigGetTextRaw( part_path + " " + part_name + " " + "name", name ); //name
259 bool show_on_init = GetGame().ConfigGetInt( part_path + " " + part_name + " " + "show_on_init" ); //show on init
260 int id = GetGame().ConfigGetInt( part_path + " " + part_name + " " + "id" ); //part id
261 bool is_base = GetGame().ConfigGetInt( part_path + " " + part_name + " " + "is_base" ); //is base (part)
262 bool is_gate = GetGame().ConfigGetInt( part_path + " " + part_name + " " + "is_gate" ); //is gate (part)
263
264 m_ConstructionParts.Insert( part_name, new ConstructionPart( name, part_name, main_part_name, id, show_on_init, is_base, is_gate, GetRequiredParts(part_name,main_part_name) ) );
265
266 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] Construction name=" + name + " part_name=" + part_name + " show=" + show_on_init + " base=" + is_base + " gate=" + is_gate);
267 }
268 }
269 }
270 }
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
Определения BaseBuildingBase.c:1292
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
array< string > GetRequiredParts(string part_name, string main_part_name)
Определения Construction.c:546
ref map< string, ref ConstructionPart > m_ConstructionParts
Определения Construction.c:15
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto bool ConfigGetTextRaw(string path, out string value)
Get raw string value from config on path.
bool FormatRawConfigStringKeys(inout string value)
Changes localization key format to script-friendly format.
Определения Game.c:475
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
static bool IsBaseBuildingLogEnable()
Определения Debug.c:698
Определения Debug.c:594
proto native CGame GetGame()
BaseBuildingBase GetParent()
Get parent of the Effect.
Определения Construction.c:40

Перекрестные ссылки bsbDebugPrint(), CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetInt(), CGame::ConfigGetTextRaw(), CGame::FormatRawConfigStringKeys(), GetGame(), GetParent(), GetRequiredParts(), LogManager::IsBaseBuildingLogEnable(), m_ConstructionParts и name.

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