Fix door penalty when door management was off

DZE_doorManagementHarderPenalty had no effect when the door management was disabled.

Thanks @IsGoose for pointing that out
This commit is contained in:
A Man
2022-04-12 11:35:24 +02:00
parent 495d7dfa0d
commit fb2bf9462d
6 changed files with 30 additions and 21 deletions

View File

@@ -102,7 +102,7 @@ class Metal_DrawbridgeLocked_DZ: CinderWallDoorLocked_DZ_Base
{
displayName = $STR_EPOCH_ACTION_UNLOCK_BRIDGE;
condition = "!keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
statement = "dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
statement = "dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog 'DoorAccess';} else {if (DZE_doorManagementHarderPenalty && {dayz_lastCodeFail > diag_tickTime}) then {format [localize 'STR_EPOCH_PLAYER_19_WAIT',round(dayz_lastCodeFail - diag_tickTime)] call dayz_rollingMessages;} else {createdialog 'ComboLockUI';};};";
};
};
};