FutureProg functions

splitcommodity

Items · computer function, computer program, standard futureprog

Item splitcommodity(Item item, Number weight)
Contexts: computer function, computer program, standard futureprog
This function takes weight from one commodity pile and creates a new commodity pile item with the taken weight, which it then returns. It does not put the item anywhere, so you must then insert it somewhere like in a room or a character's inventory. If the quantity is the whole weight of the original item or larger, it will just return the original item and no new item will be created.
item: The item to take the weight from
weight: The weight of the material to split off in base units for this MUD. See MUD owner for configuration info

Item splitcommodity(Item item, Text weight)
Contexts: computer function, computer program, standard futureprog
This function takes weight from one commodity pile and creates a new commodity pile item with the taken weight, which it then returns. It does not put the item anywhere, so you must then insert it somewhere like in a room or a character's inventory. If the quantity is the whole weight of the original item or larger, it will just return the original item and no new item will be created.
item: The item to take the weight from
weight: The weight of the material to split off, e.g. 120kg, 15lb 3oz, etc

← Back to FutureProg functions