Friday, June 23, 2006

Zomg, change!

That's right!
Today, I made several huge changes.
Well, more additions, I guess.

First and most importantly - bags and other containers now completely work! In theory!

  • Containers are correctly stored in the database, theoretically.
  • Containers are correctly pulled from the database, in theory.
  • Containers can now have items put in them and retrieved from them, supposedly.
  • Containers can now be looked inside of, hypothetically.
  • Bags can be opened and closed, if all's gone well.

The only problem is that all of these changes are completely untested, as I have yet to make functionality for scripting bags! Zing!

In addition, from a code standpoint, I added more niceness. The 'player' plugin was split into another 'items' plugin, for code that deals with, well, items. Eventually some commands from 'client' will move there as well. I also added 'put' to the help doc, and cleaned up a little code. In terms of functionality, I moved a lot of code from Door back to Openable, where it was belong, tidied some stuff up, and added a Bag class that extends both Openable and Container (in reverse order). Pity Ruby can't do that. Take that Barnett, multiple inheritance wins. In addition to all this, I added obj_type filters to Container and EquipmentModel, which Room has had for a long time.

Finally, I removed all hope from 'open' and 'close' every functioning on other players. No longer can you open or close other peoples' bags with these commands... yet. I intend to add a Subtlety skill called 'target' that will allow for such features.

Over and out.

No comments: