Addition of a player_search() function in functions_db. This first searches for alias matches (exact, no case-sensitivity). If it finds none, it does a normal local_and_global_search() limited by object type PLAYER. Also did some more code cleanup and commenting.

This commit is contained in:
Greg Taylor 2007-04-30 14:21:48 +00:00
parent 6d52103359
commit 98e9175582
4 changed files with 112 additions and 49 deletions

View file

@ -1,4 +1,5 @@
# Do not mess with the default types (0-5).
# Do not mess with the default types (0-5). This is passed to the Object
# model's 'choices' argument.
OBJECT_TYPES = (
(0, 'NOTHING'),
(1, 'PLAYER'),
@ -9,6 +10,15 @@ OBJECT_TYPES = (
(6, 'GARBAGE'),
)
# Hate to duplicate the above, but it's the easiest way.
OTYPE_NOTHING = 0
OTYPE_PLAYER = 1
OTYPE_ROOM = 2
OTYPE_THING = 3
OTYPE_EXIT = 4
OTYPE_GOING = 5
OTYPE_GARBAGE = 6
# This is a list of flags that the server actually uses. Anything not in this
# list is a custom flag.
SERVER_FLAGS = ["CONNECTED", "DARK", "FLOATING", "GAGGED", "HAVEN", "OPAQUE", "SAFE", "SLAVE", "SUSPECT", "TRANSPARENT"]