Greg Taylor
ffa03309fc
Local object command tables are now in. See game/gamesrc/parents/examples/red_button.py for example. Note that local command matches will override global matches. Command handler short circuits on the first command match. This will typically be the object with the lowest ID.
2009-04-25 06:11:42 +00:00
Greg Taylor
4512775dfe
Fix an error when sending an invalid command at the login screen. Still hadn't adjusted to the new Command object handling messaging.
2009-04-06 17:18:43 +00:00
Greg Taylor
b3c386a2c3
Clean up some of the methods on the script parent system. I have no idea why I was being silly and passing things around through dictionaries. Yick. Also added a at_player_creation method to basicplayer.py that is triggered after player objects are created and ready to go, but before they are logged in.
2009-03-30 00:54:05 +00:00
Greg Taylor
71a76cd1fb
Trap some more odd errors to assist in my tracking down their origin.
2009-03-26 14:03:41 +00:00
Greg Taylor
eacdf8b33c
Fix posing (for real this time.)
2009-01-25 01:37:43 +00:00
Greg Taylor
1bbffe99a8
Fix pose/say single character aliases.
2009-01-24 21:03:22 +00:00
Greg Taylor
9407eb0ee4
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.
...
As a side-effect of all of this, logging in more than once acts as behaves now. Also, this will allow things/rooms/exits (IE: not players) or un-logged in players to run commands or be forced to run them via @fo. All of this will bring us more in-line with MUX behavior.
2009-01-24 20:30:46 +00:00
Greg Taylor
7280eaf803
Add an extra_vars element to the command table that allows extra variables to be passed through the command table. Also added DOING ala MUX.
2009-01-24 03:17:43 +00:00
Greg Taylor
1045d0fabf
Restore the single-character aliases for say, pose, and pose without spaces. Also add 'p' as an alias for page in initial_data.py as per MUX.
2009-01-20 04:18:03 +00:00
Greg Taylor
9246ce684f
Fix double emitting on exit traversal.
2009-01-15 05:05:39 +00:00
Greg Taylor
156e409bda
Fix channel history to yank the broadcasting of 'last', also added a "To be implemented" notice to @reload.
2009-01-15 04:18:23 +00:00
Greg Taylor
800e84a15e
This should fix the comsys channels not behaving well.
2009-01-15 03:22:29 +00:00
Greg Taylor
1e1752bdf3
Silly fix for cmdhandler. Should eliminate all those huh?'s.
2009-01-15 02:39:11 +00:00
Michael King
86010b6ea4
Removed "finally" keyword that breaks python 2.4 compatibility.
...
This should work as expected without the "finally", as the exception will raise after the log message.
2009-01-13 06:34:28 +00:00
Greg Taylor
e0668e3573
Easy Python 2.4 compatibility tweak. Don't think the 'finally' keyword existed in Python 2.4
2009-01-13 01:42:39 +00:00
Greg Taylor
5249f27074
Things should be working again, minus the web stuff.
2008-12-15 04:35:00 +00:00
Greg Taylor
66a529ba84
The command handler has been completely overhauled and is actually readable now. It -might- be a little faster as well. It's not really that point in development to start micro-optimizing, so I haven't ran any benchmarks.
...
Our command evaluation now mirrors MUX2's. It was kind of weird before now, I'm not really sure how it got so out of order. In any case, I'm no longer ashamed of our command handler code. Hooray.
2008-12-15 01:10:26 +00:00
Greg Taylor
d58f4eb517
Looking through our command code after a long hiatus, I realized that it was pretty much awful. So here's part 1 of the command interpreter overhaul.
...
- The command handler has been drastically simplified. We were doing way too much processing in the handler that should have been done in the individual command functions themselves.
- The 'cdat' dict we were previously passing around has been replaced with a Command object that has useful methods for performing some of the parsing command functions will probably want to do from time to time.
- All commands were updated to use the new Command object, tested, and cleaned up in general.
- A lot of formatting was cleaned up.
- A lot of previously un-found bugs and limitations were fixed.
- The 'page' command has been broken out into its own file, since it's going to have a number of functions that would otherwise clutter commands/general.py.
Expect a commit (probably later today) that will clean up the second half of cmdhandler.py.
2008-12-14 20:21:02 +00:00
Greg Taylor
37d66093cc
Addition of a re-usable CommandTable class. We still have two global command tables that are now instances of this class. Game developers will use methods on CommandTable to add their own commands without modifying the base server code.
...
This is also in preparation of allowing commands to be present on objects via their script parents.
2008-12-14 01:49:37 +00:00
Greg Taylor
51a911d048
We now access the scriptlink by calling object.scriptlink instead of get_scriptlink. Shortens the typage a little and allows for some less complex fun possibilities down the road.
2008-06-21 02:05:44 +00:00
loki77
186dcc17c5
Fixed bad indentation.
2008-06-17 00:38:59 +00:00
Greg Taylor
a954069776
Finished moving stuff around, things should be in mostly working order now.
2008-06-15 20:31:25 +00:00
Greg Taylor
ff98ede98f
Moving the logging system to src/
2008-06-15 20:15:12 +00:00
Greg Taylor
811016867b
Comsys moved to src/
2008-06-15 19:41:27 +00:00
Greg Taylor
4bb00013ae
Even more death and destruction. A lot more stuff moved to src/. A lot more bugs probably introduced.
2008-06-15 19:38:39 +00:00