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

◆ OnDebugSpawn()

void Entity::OnDebugSpawn ( )
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 3955

3956 {
3957 array<string> slots = new array<string>;
3958 ConfigGetTextArray("Attachments", slots);
3959
3960 array<string> mags = new array<string>;
3961 ConfigGetTextArray("magazines", mags);
3962
3963 //-------
3964
3965 TStringArray all_paths = new TStringArray;
3966
3967 all_paths.Insert(CFG_VEHICLESPATH);
3968 all_paths.Insert(CFG_MAGAZINESPATH);
3969 all_paths.Insert(CFG_WEAPONSPATH);
3970
3971 string config_path;
3972 string child_name;
3973 int scope;
3974 string path;
3975 int consumable_count;
3976
3977 for (int i = 0; i < all_paths.Count(); i++)
3978 {
3979 config_path = all_paths.Get(i);
3980 int children_count = g_Game.ConfigGetChildrenCount(config_path);
3981
3982 for (int x = 0; x < children_count; x++)
3983 {
3984 g_Game.ConfigGetChildName(config_path, x, child_name);
3985 path = config_path + " " + child_name;
3986 scope = g_Game.ConfigGetInt( config_path + " " + child_name + " scope" );
3987 bool should_check = true;
3988 if ( config_path == "CfgVehicles" && scope == 0)
3989 {
3990 should_check = false;
3991 }
3992
3993 if ( should_check )
3994 {
3995 string inv_slot;
3996 g_Game.ConfigGetText( config_path + " " + child_name + " inventorySlot",inv_slot );
3997 for (int z = 0; z < slots.Count(); z++)
3998 {
3999 if (slots.Get(z) == inv_slot)
4000 {
4001 this.GetInventory().CreateInInventory( child_name );
4002 continue;
4003 //Print("matching attachment: " + child_name + " for inv. slot name:" +inv_slot);
4004 }
4005 }
4006 }
4007 }
4008 }
4009 };
DayZGame g_Game
Определения DayZGame.c:4074
Icon x
string path
Определения OptionSelectorMultistate.c:142
proto native GameInventory GetInventory()
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
proto int Insert(T value)
class array< Class T > TStringArray
const string CFG_VEHICLESPATH
Определения 3_Game/DayZ/constants.c:228
const string CFG_WEAPONSPATH
Определения 3_Game/DayZ/constants.c:229
const string CFG_MAGAZINESPATH
Определения 3_Game/DayZ/constants.c:230
proto string Get(int index)
Gets n-th character from string.

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, g_Game, string::Get(), GetInventory(), path, TStringArray и x.