Added some further explanation of clothing types and their purpose. I felt like it wasn't clear enough that you could change the given clothing types or even elect not to use clothing types at all in your own implementation of the system.
I added a lot more test cases to the command tests, ensuring that the system works as intended when given the appropriate arguments (as well as no arguments, as before).
Made a few changes:
- Put the helper functions above the typeclasses in the module.
- Changed the example command given and changed the default clothing type 'body' to 'fullbody', so that clothing types aren't taken to mean wear locations by default
- Added note to CLOTHING_TYPE_AUTOCOVER explaining that only clothes that are already worn get auto-covered
- Fixed a traceback issue in CmdGive
Added an example of use to the module descriptions, as well as fixed a couple of bugs where the at_get() hook wasn't functioning right and clothing with custom wear styles didn't appear correctly.
Adds a new contrib module, providing a system for wearable clothing objects that are appended to one's description. From the module itself:
Items of clothing can be used to cover other items, and many options are provided to define your own clothing types and their limits and behaviors. For example, to have undergarments automatically covered by outerwear, or to put a limit on the number of each type of item
that can be worn. Characters can also specify the style of wear for their clothing - I.E. to wear a scarf 'tied into a tight knot around the neck' or 'draped loosely across the shoulders' - to add an easy avenue of customization. The system as-is is fairly freeform - you can cover any garment with almost any other, for example - but it can easily be made more restrictive, and can even be tied into a system for armor or other equipment.
The unit tests have not been put in for this module yet, but I thought I would share it first to get people's thoughts!
Put in a line of code to stop the turn handler script when the tests are completed, as I think the script lingering and attempting to iterate causes problems with the Travis build.
I added all of the turn handler script's methods to the unit tests (excluding at_creation, at_repeat, and at_stop) - so I think with the exception of those, my module is now fully covered by unit tests!
Changed the order of the code in CmdAttack, so that it does not try to search for a target until it's established that it's a valid time to attack. This is so it doesn't raise a 'not found' error message along with the other error messages given.