bottle-rinse-repeat/src/EBxFillFromObject.gek

34 lines
577 B
Plaintext

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