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,8 +8,19 @@ begin function { iKeyID }
return return
endif endif
if iKeyID != CWxVisionModeHotkey if iKeyID == 27
SetOnKeyUpEventHandler CWxBionicEyesOnHotkey 0 iKeyID 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 return
endif endif

View File

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

View File

@ -1,7 +1,6 @@
scn CWxStealthOnHotkey scn CWxStealthOnHotkey
int iKeyID int iKeyID
ref rScript
begin function { iKeyID } begin function { iKeyID }
@ -9,10 +8,20 @@ begin function { iKeyID }
return return
endif 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" printd "Cyberware: Autoremoved stealth hotkey"
set rScript to GetCurrentScript SetOnKeyUpEventHandler (GetCurrentScript) 0 iKeyID
SetOnKeyUpEventHandler rScript 0 iKeyID
return return
endif endif

View File

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