Controller support for Bionic Eyes and Stealth Nano-Bots

This commit is contained in:
Eddoursul 2024-04-28 02:32:37 +02:00
parent 6cba50dbf4
commit 339c371d82
5 changed files with 31 additions and 8 deletions

Binary file not shown.

View File

@ -8,11 +8,22 @@ begin function { iKeyID }
return
endif
if iKeyID != CWxVisionModeHotkey
SetOnKeyUpEventHandler CWxBionicEyesOnHotkey 0 iKeyID
if iKeyID == 27
if GetController
if GetCrosshairRef != 0
return
endif
if playerRef.IsSneaking && playerRef.HasPerk CWxImplantStealthPerk
return
endif
elseif iKeyID != CWxVisionModeHotkey
return
endif
elseif iKeyID != CWxVisionModeHotkey
SetOnKeyUpEventHandler (GetCurrentScript) 0 iKeyID
return
endif
if CWxVisionModeLevel == 0
SetStage CWxBionicEyesQuest 1

View File

@ -7,6 +7,7 @@ begin function { iMode }
if player.HasPerk CWxImplantVisionModePerk
SetOnKeyUpEventHandler CWxBionicEyesOnHotkey 1 CWxVisionModeHotkey
SetOnControlDownEventHandler CWxBionicEyesOnHotkey 1 27 ; Grab
; Clear list of processed actors to reapply shaders
if CWxVisionModeLevel > 0
@ -16,6 +17,7 @@ begin function { iMode }
else
SetOnKeyUpEventHandler CWxBionicEyesOnHotkey 0 CWxVisionModeHotkey
SetOnControlDownEventHandler CWxBionicEyesOnHotkey 0 27 ; Grab
endif
end

View File

@ -1,7 +1,6 @@
scn CWxStealthOnHotkey
int iKeyID
ref rScript
begin function { iKeyID }
@ -9,13 +8,23 @@ begin function { iKeyID }
return
endif
if iKeyID != CWxStealthFieldHotkey
if iKeyID == 27
if GetController
if GetCrosshairRef != 0
return
endif
if playerRef.IsSneaking == 0
return
endif
elseif iKeyID != CWxStealthFieldHotkey
return
endif
elseif iKeyID != CWxStealthFieldHotkey
printd "Cyberware: Autoremoved stealth hotkey"
set rScript to GetCurrentScript
SetOnKeyUpEventHandler rScript 0 iKeyID
SetOnKeyUpEventHandler (GetCurrentScript) 0 iKeyID
return
endif
if player.IsSpellTargetAlt CWxStealthField
printd "Cyberware: Swithing stealth off"
SetStage CWxStealthFieldQuest 0

View File

@ -9,6 +9,7 @@ begin function { iStatus }
SetOnKeyUpEventHandler CWxStealthOnHotkey bEnabled CWxStealthFieldHotkey
SetOnUseAidItemEventHandler CWxStealthOnUseSB bEnabled StealthBoy
SetOnControlDownEventHandler CWxStealthOnHotkey bEnabled 27 ; Grab
if GetUIFloat "HUDMainMenu\_CWxSFMeterEnabled"
if player.IsSpellTargetAlt CWxStealthField == 0