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() Event OnInit()
Self.BlockActivation(True) BlockActivation(True)
Lock(100)
EndEvent EndEvent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
if Self.IsActivationBlocked() if Self.IsActivationBlocked()
if ! EnderalFunctions.TextInputEnabled() || ! IsLocked()
if CheckForPassphrase() Activate(akActionRef, true)
Self.Lock(False) elseif CheckForPassphrase()
Self.BlockActivation(False) Lock(False)
Self.Activate(akActionRef) BlockActivation(False)
Activate(akActionRef)
else else
_00E_MQ07a_sRChainNothingHappens.Show() _00E_MQ07a_sRChainNothingHappens.Show()
endif endif
endif endif
EndEvent EndEvent
@ -34,4 +35,4 @@ bool Function CheckForPassphrase()
EndFunction EndFunction
Message Property _00E_MQ07a_sRChainNothingHappens Auto Message Property _00E_MQ07a_sRChainNothingHappens Auto