Clothing Library
A very simple module that builds wearable items into the game.
Contributed by:
You are free to use this library in your own games, without crediting me, as long as the library is not modified. If you do want to modify the library, then you are free to do so, but please keep some attribution to me with it, at a minimum as a comment in the XML.
Contents |
To use
Have garments inherit from “clothing_type”. They will be set to be takeable, and when worn will appear in the inventory with “(being worn)” appended to the name. Check the attribute “being_worn” to determine if the item is being worn in a script.
Functions
Name (object obj, string my_name)
Returns:Some value as an integer
Types
clothing_type
Items of this type can be taken, worn and removed.
Player Commands
wear #object#
Player puts on the given object.
remove #object#
Player removes the given object.