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

◆ LockOvenAttachments()

void LockOvenAttachments ( bool lock)
protected

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

2704 {
2705 //Print("LockOvenAttachments");
2706 //string path_cooking_equipment = "" + CFG_VEHICLESPATH + " " + GetType() + " GUIInventoryAttachmentsProps CookingEquipment attachmentSlots";
2707 string path_cooking_equipment = string.Format("%1 %2 GUIInventoryAttachmentsProps CookingEquipment attachmentSlots", CFG_VEHICLESPATH, GetType());
2708 //string path_direct_cooking = "" + CFG_VEHICLESPATH + " " + GetType() + " GUIInventoryAttachmentsProps DirectCooking attachmentSlots";
2709 string path_direct_cooking = string.Format("%1 %2 GUIInventoryAttachmentsProps DirectCooking attachmentSlots", CFG_VEHICLESPATH, GetType());
2710 if (GetGame().ConfigIsExisting(path_cooking_equipment) && GetGame().ConfigIsExisting(path_direct_cooking))
2711 {
2712 array<string> arr_cooking_equipment = new array<string>;
2713 array<string> arr_direct_cooking = new array<string>;
2714 GetGame().ConfigGetTextArray(path_cooking_equipment,arr_cooking_equipment);
2715 GetGame().ConfigGetTextArray(path_direct_cooking,arr_direct_cooking);
2716 for (int i = 0; i < arr_cooking_equipment.Count(); i++)
2717 {
2718 if (lock != GetInventory().GetSlotLock(InventorySlots.GetSlotIdFromString(arr_cooking_equipment[i])))
2719 {
2720 GetInventory().SetSlotLock(InventorySlots.GetSlotIdFromString(arr_cooking_equipment[i]),lock);
2721 //Print("attachment lock: " + arr_cooking_equipment[i] + " " + lock);
2722 }
2723 }
2724
2725 for (i = 0; i < arr_direct_cooking.Count(); i++)
2726 {
2727 if (lock == GetInventory().GetSlotLock(InventorySlots.GetSlotIdFromString(arr_direct_cooking[i])))
2728 {
2729 GetInventory().SetSlotLock(InventorySlots.GetSlotIdFromString(arr_direct_cooking[i]),!lock);
2730 //Print("attachment lock: " + arr_direct_cooking[i] + " " + !lock);
2731 }
2732 }
2733 }
2735 }
eBleedingSourceType GetType()
int m_OvenAttachmentsLockState
Определения FireplaceBase.c:29
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
Определения InventorySlots.c:6
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
const string CFG_VEHICLESPATH
Определения 3_Game/constants.c:220

Перекрестные ссылки CFG_VEHICLESPATH, CGame::ConfigGetTextArray(), GetGame(), InventorySlots::GetSlotIdFromString(), GetType() и m_OvenAttachmentsLockState.

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