[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = RetVar is if you want to save the quantity to a variable. IF will check to see if the ware can be placed in the cargobay and return True / False.
<RefObj> = The 'Object' (Ship/Station) that the command is to be run on.
<Var/Ware> = What you want to know how much of would fit into an empty cargobay.
Use this command to check how much of an item would fit into a cargobay if the cargobay was empty. This command if run on a station that has set limits for particular wares will take these limits into account and only report on the available space assigned for that ware.
Example:
$target = get tracking aim
If $target is of class ship
| $max.amount = $target get max amount of ware Space Fuel in cargo bay
| IF $max.amount > 0
| | $message = sprintf: fmt='Maximum amount for Space Fuel is %s', $max.amount, null, null, null, null
| | display subtitle text: text=$message duration=5000 ms
| end
end
This will get the players tracking aim and if it is a ship it will check to see how much Space Fuel it can carry in its cargobay. If it can carry Space Fuel it will display the subtitle $message for 5 seconds. The message will contain the $max.amount of Space Fuel that would fit into an empty cargobay.
Command Location:
- »» Trade Commands
- »» for Ships and Stations
<RetVar/IF><RefObj> get max amount of ware <Var/Ware> in cargo bay
- »» for Ships and Stations