Commit graph

6 commits

Author SHA1 Message Date
Greg Taylor
fadf3933af Move the presentation part of the 'look' command out to the new scripting system. You can now make different scripted objects appear vastly different by overriding basicobject's return_appearance (or any of its submethods). Also fixed word wrapping, and we are now wrapping descriptions to 78 characters by default. We'll see how gracefully it handles this, and we might eventually apply it to all output. 2007-07-17 14:39:10 +00:00
Greg Taylor
94779a86a5 Added new SCRIPT_ROOT variable to settings.py, you'll need to copy this over from settings.py.dist if you're running a test game. We also now have rudimentary support for default, enter, and use locks per the basicobject.py file. Take a look at the example locks in there. A returned boolean value determines whether the player passes. Make sure you emit an error message within the lock if you're going to return false. We will have simple in-game attribute or dbref locks via an @lock command similar to MUX/MUSH that override scripted behaviors. 2007-07-12 13:45:23 +00:00
Greg Taylor
679ef8dc74 Whoops, fixed some comment stuff. 2007-07-10 15:34:36 +00:00
Greg Taylor
9c57e1cf7a Adding some more script hooks. 2007-07-10 15:34:07 +00:00
Greg Taylor
94ceec3719 Scripting support is now in! See cmd_look (the end of it), scripthandler.py, and scripts/basicobject.py for very brief examples. I'm not sure how well this is going to scale, I had to kludge the import a bit due to some oddities with __import__. There has to be a better way to do this, hopefully I'll be able to figure it out. In any case, expect basicobject to start fleshing out. You'll be able to use it directly or sub-class it with your own stuff. 2007-06-04 20:01:03 +00:00
Greg Taylor
27c0e7a873 Really basic proof-of-concept scripthandler.py for review and discussion. This should illustrate my basic idea about script support. I think this will be a very elegant solution to the scripting situation. This will be filled out in the coming days and will hopefully make more and more sense as I tie it in. Database changes are likely, make sure to keep an eye on the commit logs. Also edited some svn:ignore props and added a placeholder for the basicobject script. 2007-06-04 17:33:31 +00:00