From ac41428404bab70056f43f533716d5b69e6ce05d Mon Sep 17 00:00:00 2001 From: oiad Date: Mon, 28 Jan 2019 23:35:44 +1300 Subject: [PATCH] Change ComboLockUI to check if selected door is null This then matches the safe/lockbox gui check which means modders can use the GUI screens for setting /retreiving codes (as per my codeChange script): https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/RscDisplay/safegui.hpp#L306 https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/RscDisplay/safegui.hpp#L654 Also removed the check for the safeKeyPad since it's done further along in `player_unlockVault` and also matches the lockbox ui. Thanks to @AirwavesMan for reporting --- SQF/dayz_code/Configs/RscDisplay/safegui.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/Configs/RscDisplay/safegui.hpp b/SQF/dayz_code/Configs/RscDisplay/safegui.hpp index a6d77984f..85e1e343f 100644 --- a/SQF/dayz_code/Configs/RscDisplay/safegui.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/safegui.hpp @@ -303,7 +303,7 @@ class SafeKeyPad colorText[] = {0,1,0,1}; colorBackground[] = {0,0,0,0}; colorBackgroundActive[] = {0,0,0,0}; - onButtonClick = "[player,""keypad_tick"",0,false] call dayz_zombieSpeak; keypadCancel = false; ((ctrlParent (_this select 0)) closeDisplay 2); if(!isNull dayz_selectedVault and (typeOf dayz_selectedVault) in DZE_LockedStorage) then {dayz_selectedVault spawn player_unlockVault;};"; + onButtonClick = "[player,""keypad_tick"",0,false] call dayz_zombieSpeak; keypadCancel = false; ((ctrlParent (_this select 0)) closeDisplay 2); if(!isNull dayz_selectedVault) then {dayz_selectedVault spawn player_unlockVault;};"; }; }; }; @@ -458,7 +458,7 @@ class ComboLockUI y = 0.762017; w = 0.201064; h = 0.233964; - onButtonClick = "keypadCancel = false; call player_unlockDoor"; + onButtonClick = "keypadCancel = false; if (!isNull dayz_selectedDoor) then {call player_unlockDoor;};"; }; }; };