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

◆ LockOvenAttachments()

void LockOvenAttachments ( bool lock)
protected

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

2687 {
2688 //Print("LockOvenAttachments");
2689 //string path_cooking_equipment = "" + CFG_VEHICLESPATH + " " + GetType() + " GUIInventoryAttachmentsProps CookingEquipment attachmentSlots";
2690 string path_cooking_equipment = string.Format("%1 %2 GUIInventoryAttachmentsProps CookingEquipment attachmentSlots", CFG_VEHICLESPATH, GetType());
2691 //string path_direct_cooking = "" + CFG_VEHICLESPATH + " " + GetType() + " GUIInventoryAttachmentsProps DirectCooking attachmentSlots";
2692 string path_direct_cooking = string.Format("%1 %2 GUIInventoryAttachmentsProps DirectCooking attachmentSlots", CFG_VEHICLESPATH, GetType());
2693 if (GetGame().ConfigIsExisting(path_cooking_equipment) && GetGame().ConfigIsExisting(path_direct_cooking))
2694 {
2695 array<string> arr_cooking_equipment = new array<string>;
2696 array<string> arr_direct_cooking = new array<string>;
2697 GetGame().ConfigGetTextArray(path_cooking_equipment,arr_cooking_equipment);
2698 GetGame().ConfigGetTextArray(path_direct_cooking,arr_direct_cooking);
2699 for (int i = 0; i < arr_cooking_equipment.Count(); i++)
2700 {
2701 if (lock != GetInventory().GetSlotLock(InventorySlots.GetSlotIdFromString(arr_cooking_equipment[i])))
2702 {
2703 GetInventory().SetSlotLock(InventorySlots.GetSlotIdFromString(arr_cooking_equipment[i]),lock);
2704 //Print("attachment lock: " + arr_cooking_equipment[i] + " " + lock);
2705 }
2706 }
2707
2708 for (i = 0; i < arr_direct_cooking.Count(); i++)
2709 {
2710 if (lock == GetInventory().GetSlotLock(InventorySlots.GetSlotIdFromString(arr_direct_cooking[i])))
2711 {
2712 GetInventory().SetSlotLock(InventorySlots.GetSlotIdFromString(arr_direct_cooking[i]),!lock);
2713 //Print("attachment lock: " + arr_direct_cooking[i] + " " + !lock);
2714 }
2715 }
2716 }
2718 }
eBleedingSourceType GetType()
Определения BleedingSource.c:63
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
Определения constants.c:220

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

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