Baystation12/Baystation12 — pull request #4858 by mwerezak (2014-04-30 02:48:18+00:00)
Title: Storage and Clothing/Accessory Changes and Cleanup

Well, this turned into a massive amount of work. Here's a summary:

**Ties**

Code for accessories with special functions (webbings, holsters) now lives with the accessory in question! No more clothing manipulating an accessory's members in order to get it to do stuff (who the hell wrote that, anyways?).

Accessories now have procs for attaching and removing from clothing, and can tell if they have been attached to something.

clothing/under now forwards attackby() and attack_hand() to their attached accessory if they have one. clothing/under now can be unequipped by mouse dragging. Future clothing/under that implements special behaviour (like chameleon suits) should use verbs instead of overriding these procs.

**Storage**

Code for mobs accessing a storage's inventory is now separated from the code for picking it up as an item. This removed the need for the wierd bluespace hacks used by webbings. Now a storage's inventory should be accessed by calling it's open() proc.

Removed the wierd duplicate storage code for pillbottles. Now storage sounds can be disabled/alternate sounds can be specified by setting the use_sound var.

**Internal Storage**

Now literally anything can have a storage inventory by using a storage/internal instance. It's up to the using object to specify how and when the inventory is accessed, using the open() and close() procs, whether its by clicking, UI, anything really.

Coats now use storage/internal to implement their storage. Moved the file into the modules/clothing/suits folder as they no longer have special snowflake status.

storage/internal supplies optional procs to emulate storage container behaviour, see the new suit/storage code for an example of use.

webbings now use storage/internal. When attached to clothing, they are opened by attack_hand. When not, they emulate storage container using the procs supplied by storage/internal. Attackby puts the item in storage.

**Misc**

Fixed holsters and webbings shielding their contents from EMP.

Adjusted w_class for some clothing (apologies for this getting mixed in)

Showing off some of the flexibility of the new code, the unathi knife holder thing can now hold various types of knives.

Minor things.

See also: https://github.com/Baystation12/Baystation12/issues/4815