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

◆ OnDebugSpawn()

void Entity::OnDebugSpawn ( )
inlineprotected

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

3865 {
3866 array<string> slots = new array<string>;
3867 ConfigGetTextArray("Attachments", slots);
3868
3869 array<string> mags = new array<string>;
3870 ConfigGetTextArray("magazines", mags);
3871
3872 //-------
3873
3874 TStringArray all_paths = new TStringArray;
3875
3876 all_paths.Insert(CFG_VEHICLESPATH);
3877 all_paths.Insert(CFG_MAGAZINESPATH);
3878 all_paths.Insert(CFG_WEAPONSPATH);
3879
3880 string config_path;
3881 string child_name;
3882 int scope;
3883 string path;
3884 int consumable_count;
3885
3886 for (int i = 0; i < all_paths.Count(); i++)
3887 {
3888 config_path = all_paths.Get(i);
3889 int children_count = GetGame().ConfigGetChildrenCount(config_path);
3890
3891 for (int x = 0; x < children_count; x++)
3892 {
3893 GetGame().ConfigGetChildName(config_path, x, child_name);
3894 path = config_path + " " + child_name;
3895 scope = GetGame().ConfigGetInt( config_path + " " + child_name + " scope" );
3896 bool should_check = 1;
3897 if ( config_path == "CfgVehicles" && scope == 0)
3898 {
3899 should_check = 0;
3900 }
3901
3902 if ( should_check )
3903 {
3904 string inv_slot;
3905 GetGame().ConfigGetText( config_path + " " + child_name + " inventorySlot",inv_slot );
3906 for (int z = 0; z < slots.Count(); z++)
3907 {
3908 if (slots.Get(z) == inv_slot)
3909 {
3910 this.GetInventory().CreateInInventory( child_name );
3911 continue;
3912 //Print("matching attachment: " + child_name + " for inv. slot name:" +inv_slot);
3913 }
3914 }
3915 }
3916 }
3917 }
3918 };
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
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:709
const string CFG_VEHICLESPATH
Определения 3_Game/constants.c:220
const string CFG_WEAPONSPATH
Определения 3_Game/constants.c:221
const string CFG_MAGAZINESPATH
Определения 3_Game/constants.c:222

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