You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
613 B

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
if EBxCanteenSipsMax > 0
call EBxReplenishCanteen rDrink 0
endif
end