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

◆ LockOvenAttachments()

void LockOvenAttachments ( bool lock)
protected

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

2706 {
2707 //Print("LockOvenAttachments");
2708 //string path_cooking_equipment = "" + CFG_VEHICLESPATH + " " + GetType() + " GUIInventoryAttachmentsProps CookingEquipment attachmentSlots";
2709 string path_cooking_equipment = string.Format("%1 %2 GUIInventoryAttachmentsProps CookingEquipment attachmentSlots", CFG_VEHICLESPATH, GetType());
2710 //string path_direct_cooking = "" + CFG_VEHICLESPATH + " " + GetType() + " GUIInventoryAttachmentsProps DirectCooking attachmentSlots";
2711 string path_direct_cooking = string.Format("%1 %2 GUIInventoryAttachmentsProps DirectCooking attachmentSlots", CFG_VEHICLESPATH, GetType());
2712 if (g_Game.ConfigIsExisting(path_cooking_equipment) && g_Game.ConfigIsExisting(path_direct_cooking))
2713 {
2714 array<string> arr_cooking_equipment = new array<string>;
2715 array<string> arr_direct_cooking = new array<string>;
2716 g_Game.ConfigGetTextArray(path_cooking_equipment,arr_cooking_equipment);
2717 g_Game.ConfigGetTextArray(path_direct_cooking,arr_direct_cooking);
2718 for (int i = 0; i < arr_cooking_equipment.Count(); i++)
2719 {
2720 if (lock != GetInventory().GetSlotLock(InventorySlots.GetSlotIdFromString(arr_cooking_equipment[i])))
2721 {
2722 GetInventory().SetSlotLock(InventorySlots.GetSlotIdFromString(arr_cooking_equipment[i]),lock);
2723 //Print("attachment lock: " + arr_cooking_equipment[i] + " " + lock);
2724 }
2725 }
2726
2727 for (i = 0; i < arr_direct_cooking.Count(); i++)
2728 {
2729 if (lock == GetInventory().GetSlotLock(InventorySlots.GetSlotIdFromString(arr_direct_cooking[i])))
2730 {
2731 GetInventory().SetSlotLock(InventorySlots.GetSlotIdFromString(arr_direct_cooking[i]),!lock);
2732 //Print("attachment lock: " + arr_direct_cooking[i] + " " + !lock);
2733 }
2734 }
2735 }
2737 }
eBleedingSourceType GetType()
DayZGame g_Game
Определения DayZGame.c:3942
int m_OvenAttachmentsLockState
Определения FireplaceBase.c:29
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.
const string CFG_VEHICLESPATH
Определения 3_Game/DayZ/constants.c:220

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

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