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

◆ OnDebugSpawn()

void Entity::OnDebugSpawn ( )
inlineprotected

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

3860 {
3861 array<string> slots = new array<string>;
3862 ConfigGetTextArray("Attachments", slots);
3863
3864 array<string> mags = new array<string>;
3865 ConfigGetTextArray("magazines", mags);
3866
3867 //-------
3868
3869 TStringArray all_paths = new TStringArray;
3870
3871 all_paths.Insert(CFG_VEHICLESPATH);
3872 all_paths.Insert(CFG_MAGAZINESPATH);
3873 all_paths.Insert(CFG_WEAPONSPATH);
3874
3875 string config_path;
3876 string child_name;
3877 int scope;
3878 string path;
3879 int consumable_count;
3880
3881 for (int i = 0; i < all_paths.Count(); i++)
3882 {
3883 config_path = all_paths.Get(i);
3884 int children_count = GetGame().ConfigGetChildrenCount(config_path);
3885
3886 for (int x = 0; x < children_count; x++)
3887 {
3888 GetGame().ConfigGetChildName(config_path, x, child_name);
3889 path = config_path + " " + child_name;
3890 scope = GetGame().ConfigGetInt( config_path + " " + child_name + " scope" );
3891 bool should_check = 1;
3892 if ( config_path == "CfgVehicles" && scope == 0)
3893 {
3894 should_check = 0;
3895 }
3896
3897 if ( should_check )
3898 {
3899 string inv_slot;
3900 GetGame().ConfigGetText( config_path + " " + child_name + " inventorySlot",inv_slot );
3901 for (int z = 0; z < slots.Count(); z++)
3902 {
3903 if (slots.Get(z) == inv_slot)
3904 {
3905 this.GetInventory().CreateInInventory( child_name );
3906 continue;
3907 //Print("matching attachment: " + child_name + " for inv. slot name:" +inv_slot);
3908 }
3909 }
3910 }
3911 }
3912 }
3913 };
Icon x
string path
Определения OptionSelectorMultistate.c:142
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native GameInventory GetInventory()
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
Определения Inventory.c:874
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685
const string CFG_VEHICLESPATH
Определения constants.c:220
const string CFG_WEAPONSPATH
Определения constants.c:221
const string CFG_MAGAZINESPATH
Определения constants.c:222

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetInt(), CGame::ConfigGetText(), GetGame(), GetInventory(), path и x.