2022-07-23 15:38:20 +00:00
|
|
|
scn EBxFillFromObject
|
|
|
|
|
|
|
|
ref rSource
|
|
|
|
ref rDrink
|
|
|
|
ref rReplaceables
|
|
|
|
array_var aArgs
|
|
|
|
|
|
|
|
begin function { rSource }
|
|
|
|
|
|
|
|
if rSource == 0
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
|
|
|
|
let aArgs := call EBxGetDrinksToUpgrade rSource
|
|
|
|
|
|
|
|
if eval 0 >= ar_size aArgs
|
|
|
|
let aArgs := ar_null
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
|
|
|
|
let rDrink := aArgs[0]
|
|
|
|
let rReplaceables := aArgs[1]
|
|
|
|
let aArgs := ar_null
|
|
|
|
|
|
|
|
if playerRef.GetItemCount caps001 < playerRef.GetItemCount rReplaceables
|
|
|
|
ShowMessage EBxMsgNoCaps
|
|
|
|
endif
|
|
|
|
|
|
|
|
call EBxReplaceFormListWithItem rDrink rReplaceables
|
|
|
|
|
2022-07-25 20:26:10 +00:00
|
|
|
call EBxReplenishCanteen rDrink 0
|
2022-07-23 15:38:20 +00:00
|
|
|
|
|
|
|
end
|