FutureProg functions

splitcommodity

Itemscomputer function, computer program, standard futureprog

Overload 1

splitcommodity overload 1

Item splitcommodity(Item item, Number weight)
Available in
  • 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.
ParameterTypeDescription
item Item The item to take the weight from
weight Number The weight of the material to split off in base units for this MUD. See MUD owner for configuration info

Overload 2

splitcommodity overload 2

Item splitcommodity(Item item, Text weight)
Available in
  • 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.
ParameterTypeDescription
item Item The item to take the weight from
weight Text The weight of the material to split off, e.g. 120kg, 15lb 3oz, etc