When text input is unavailable, fallback to regular Master lock on the Rune-adorned chest

This commit is contained in:
Eddoursul 2024-02-20 15:48:51 +01:00
parent e2c4c03f77
commit d645976f59
2 changed files with 9 additions and 8 deletions

View File

@ -2,22 +2,23 @@ Scriptname _00E_FS_ChestOpenPassphrase extends ObjectReference
Event OnInit()
Self.BlockActivation(True)
BlockActivation(True)
Lock(100)
EndEvent
Event OnActivate(ObjectReference akActionRef)
if Self.IsActivationBlocked()
if CheckForPassphrase()
Self.Lock(False)
Self.BlockActivation(False)
Self.Activate(akActionRef)
if ! EnderalFunctions.TextInputEnabled() || ! IsLocked()
Activate(akActionRef, true)
elseif CheckForPassphrase()
Lock(False)
BlockActivation(False)
Activate(akActionRef)
else
_00E_MQ07a_sRChainNothingHappens.Show()
endif
endif
EndEvent
@ -34,4 +35,4 @@ bool Function CheckForPassphrase()
EndFunction
Message Property _00E_MQ07a_sRChainNothingHappens Auto
Message Property _00E_MQ07a_sRChainNothingHappens Auto