|
|
|
@ -26,7 +26,12 @@ begin function {} |
|
|
|
|
; INI settings |
|
|
|
|
|
|
|
|
|
if FileExists "config\Bottle Rinse Repeat.ini" |
|
|
|
|
set EBxFillBottleDelay to GetINIFloat "Settings:bFillBottleDelay" "Bottle Rinse Repeat.ini" |
|
|
|
|
let EBxFillBottleDelay := GetINIFloat "Settings:iFillBottleDelay" "Bottle Rinse Repeat.ini" |
|
|
|
|
let EBxReplenishableCanteen := GetINIFloat "Settings:bReplenishableCanteen" "Bottle Rinse Repeat.ini" |
|
|
|
|
let EBxCanteenSipsMax := GetINIFloat "Settings:iReplenishableCanteenMaxSips" "Bottle Rinse Repeat.ini" |
|
|
|
|
if EBxCanteenSipsMax < 1 |
|
|
|
|
let EBxCanteenSipsMax := 4 |
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
; Add new items to form lists |
|
|
|
@ -61,17 +66,43 @@ begin function {} |
|
|
|
|
|
|
|
|
|
; Vault 13 Canteen |
|
|
|
|
|
|
|
|
|
if IsModLoaded "ClassicPack.esm" |
|
|
|
|
if eval EBxReplenishableCanteen && IsModLoaded "ClassicPack.esm" |
|
|
|
|
|
|
|
|
|
let rItem := GetFormFromMod "FalloutNV.esm" "174095" ; PreordVault13CanteenQuest |
|
|
|
|
if IsFormValid rItem |
|
|
|
|
RemoveScript rItem |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
let rItem := GetFormFromMod "FalloutNV.esm" "1735D2" ; PreordVaultCanteen |
|
|
|
|
if IsFormValid rItem |
|
|
|
|
SetScript EBxPreordVault13CanteenScript rItem |
|
|
|
|
if eval $rItem == "Vault 13 Canteen" |
|
|
|
|
SetName "Empty Vault 13 Canteen" rItem |
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
; Vault 13 Canteen effect |
|
|
|
|
|
|
|
|
|
SetOnUseAidItemEventHandler (begin function { ref rEBxVault13Canteen } |
|
|
|
|
if this == playerRef |
|
|
|
|
if eval ref rEffect := ListGetNthForm EBxCanteenEffects EBxCanteenDrink |
|
|
|
|
playerRef.CIOS rEffect |
|
|
|
|
else |
|
|
|
|
playerRef.CIOS WaterPurified |
|
|
|
|
endif |
|
|
|
|
if playerRef.GetItemCount EBxVault13Canteen == 0 |
|
|
|
|
let ref rCanteen := GetFormFromMod "FalloutNV.esm" "1735D2" ; PreordVaultCanteen |
|
|
|
|
if IsFormValid rCanteen |
|
|
|
|
playerRef.AddItem rCanteen 1 1 |
|
|
|
|
if MenuMode |
|
|
|
|
RefreshItemsList |
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
end) 1 EBxVault13Canteen |
|
|
|
|
|
|
|
|
|
; Draining on middle click |
|
|
|
|
; Short callback notation with SetOnKeyUp/DownEventHandler currently throws an exception with xNVSE 6.20 + JIP LN 56.31 |
|
|
|
|
|
|
|
|
@ -82,18 +113,6 @@ begin function {} |
|
|
|
|
SetOnMenuCloseEventHandler (begin function { i } |
|
|
|
|
SetOnKeyUpEventHandler EBxOnMiddleClick 0 258 |
|
|
|
|
end) 1 1002 |
|
|
|
|
|
|
|
|
|
; Vault 13 Canteen effect |
|
|
|
|
|
|
|
|
|
SetOnUseAidItemEventHandler (begin function { rItem } |
|
|
|
|
if this == playerRef |
|
|
|
|
if eval rItem := ListGetNthForm EBxCanteenEffects EBxCanteenDrink |
|
|
|
|
playerRef.CIOS rItem |
|
|
|
|
else |
|
|
|
|
playerRef.CIOS WaterPurified |
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
end) 1 EBxVault13Canteen |
|
|
|
|
|
|
|
|
|
; SSBottleEmptyNoFloat |
|
|
|
|
|
|
|
|
@ -139,7 +158,7 @@ begin function {} |
|
|
|
|
; Enable brahmin milking |
|
|
|
|
|
|
|
|
|
if EBxTTW |
|
|
|
|
set rBrahminScriptDC to GetFormFromMod "Fallout3.esm" "38705" ; CRBrahminScriptDC |
|
|
|
|
let rBrahminScriptDC := GetFormFromMod "Fallout3.esm" "38705" ; CRBrahminScriptDC |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
GetLoadedType rList 43 |
|
|
|
|