evennia/src/objects
Griatch c7cbc4854e Reworked object command tables.
Object commands used to require re-adding every call in the script parent's __init__ or factory functions, adding the commands to a new command table directly on the object. Since all other attributes can be set up in at_object_creation(), this was both inconsistent and a bit confusing to work with. There is now a method add_commands() directly defined on all objects. It takes the same arguments as the normal add_command()o but use a reserved attribute to create and update a command table on the object. This has the advantange of completely removing the __init__ call in the script parent, all definitions can now be kept in at_object_creation() and are, more importantly, persistent without having to be recreated every call.
- I updated the examine command to show all the commands defined on an object (if any).
- I updated gamesrc/parents/examples/red_button.py considerably using the new command methodology and also using the updated Events.
.
Griatch
2009-12-03 00:41:53 +00:00
..
managers Reworked object command tables. 2009-12-03 00:41:53 +00:00
util Huge overhaul in the way objects and sessions are used with commands. We now pass all commands through objects (aside from unlogged commands), which means session.msg() is now deprecated for any use other than unlogged out. 2009-01-24 20:30:46 +00:00
__init__.py Starting here, trunk is broken pending re-organizations. Check out the previous revision if you'd like to tinker. 2008-12-15 04:00:25 +00:00
admin.py I've been meaning to do this for a while as well. Break CommChannel and CommChannelMessage out into a separate app. I had them lumped in with objects/models.py due to some funkage with the admin site registering that is now resolved. 2009-04-17 04:15:54 +00:00
exceptions.py Starting here, trunk is broken pending re-organizations. Check out the previous revision if you'd like to tinker. 2008-12-15 04:00:25 +00:00
models.py Reworked object command tables. 2009-12-03 00:41:53 +00:00
views.py Starting here, trunk is broken pending re-organizations. Check out the previous revision if you'd like to tinker. 2008-12-15 04:00:25 +00:00