diff --git a/Bottle Rinse Repeat.esp b/Bottle Rinse Repeat.esp index 9142abe..9c32515 100644 Binary files a/Bottle Rinse Repeat.esp and b/Bottle Rinse Repeat.esp differ diff --git a/config/Bottle Rinse Repeat.ini b/config/Bottle Rinse Repeat.ini index a78204a..e22b5ad 100644 --- a/config/Bottle Rinse Repeat.ini +++ b/config/Bottle Rinse Repeat.ini @@ -2,3 +2,4 @@ iFillBottleDelay = 1 bReplenishableCanteen = 1 iReplenishableCanteenMaxSips = 4 +bAddEmptyBottlesOnConsumption = 1 diff --git a/src/EBxBootstrap.gek b/src/EBxBootstrap.gek index aee190b..7952b0b 100644 --- a/src/EBxBootstrap.gek +++ b/src/EBxBootstrap.gek @@ -29,9 +29,10 @@ begin function {} 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 + + if EBxCanteenSipsMax < 1 + let EBxCanteenSipsMax := 4 endif ; Add new items to form lists diff --git a/src/EBxOnGameLoad.gek b/src/EBxOnGameLoad.gek index 8d71c81..a17d360 100644 --- a/src/EBxOnGameLoad.gek +++ b/src/EBxOnGameLoad.gek @@ -8,6 +8,7 @@ ref rEntry ref rBottleUp ref rBottleDown int iCounter +int bAddEmpties begin function { i } @@ -93,7 +94,7 @@ begin function { i } ListAddForm EBxUpgradableToPurifiedList rItem endif - set rItem to GetFormFromMod "BrokenSteel.esm" "104F" ; DLC03AquaPura + let rItem := GetFormFromMod "BrokenSteel.esm" "104F" ; DLC03AquaPura if IsFormValid rItem ListAddForm EBxUpgradableToPurifiedList rItem endif @@ -107,10 +108,17 @@ begin function { i } let rBottleDown := ITMBottleDown endif + let bAddEmpties := 1 + if FileExists "config\Bottle Rinse Repeat.ini" + let bAddEmpties := GetINIFloat "Settings:bAddEmptyBottlesOnConsumption" "Bottle Rinse Repeat.ini" + endif + let i := 0 while rItem := ListGetNthForm EBxDrinkLists i - SetOnUseAidItemEventHandler EBxOnDrink 1 rItem - + if bAddEmpties + SetOnUseAidItemEventHandler EBxOnDrink 1 rItem + endif + if GetType rItem == 85 ; form list let n := 0 while rEntry := ListGetNthForm rItem n