Starting the move of typeclass methods off *DB models and onto the typeclasses.
This commit is contained in:
parent
9321573c23
commit
0b5e2b94ff
6 changed files with 21 additions and 21 deletions
|
|
@ -123,8 +123,8 @@ class Player(PlayerDB):
|
|||
a command on a Character, the character automatically stores and
|
||||
handles the sessid).
|
||||
kwargs - extra data to send through protocol
|
||||
"""
|
||||
self.dbobj.msg(text=text, from_obj=from_obj, sessid=sessid, **kwargs)
|
||||
"""
|
||||
self.msg(text=text, from_obj=from_obj, sessid=sessid, **kwargs)
|
||||
|
||||
def swap_character(self, new_character, delete_old_character=False):
|
||||
"""
|
||||
|
|
@ -135,7 +135,7 @@ class Player(PlayerDB):
|
|||
|
||||
Returns: True/False depending on if swap suceeded or not.
|
||||
"""
|
||||
return self.dbobj.swap_character(new_character, delete_old_character=delete_old_character)
|
||||
return self.swap_character(new_character, delete_old_character=delete_old_character)
|
||||
|
||||
def execute_cmd(self, raw_string, sessid=None, **kwargs):
|
||||
"""
|
||||
|
|
@ -163,7 +163,7 @@ class Player(PlayerDB):
|
|||
be useful for coders intending to implement some sort of nested
|
||||
command structure.
|
||||
"""
|
||||
return self.dbobj.execute_cmd(raw_string, sessid=sessid, **kwargs)
|
||||
return self.execute_cmd(raw_string, sessid=sessid, **kwargs)
|
||||
|
||||
def search(self, searchdata, return_puppet=False, **kwargs):
|
||||
"""
|
||||
|
|
@ -183,7 +183,7 @@ class Player(PlayerDB):
|
|||
# handle wrapping of common terms
|
||||
if searchdata.lower() in ("me", "*me", "self", "*self",):
|
||||
return self
|
||||
return self.dbobj.search(searchdata, return_puppet=return_puppet, **kwargs)
|
||||
return self.search(searchdata, return_puppet=return_puppet, **kwargs)
|
||||
|
||||
def is_typeclass(self, typeclass, exact=False):
|
||||
"""
|
||||
|
|
@ -200,7 +200,7 @@ class Player(PlayerDB):
|
|||
|
||||
Returns: Boolean
|
||||
"""
|
||||
return self.dbobj.is_typeclass(typeclass, exact=exact)
|
||||
return self.is_typeclass(typeclass, exact=exact)
|
||||
|
||||
def swap_typeclass(self, new_typeclass, clean_attributes=False, no_default=True):
|
||||
"""
|
||||
|
|
@ -235,7 +235,7 @@ class Player(PlayerDB):
|
|||
boolean True/False depending on if the swap worked or not.
|
||||
|
||||
"""
|
||||
self.dbobj.swap_typeclass(new_typeclass,
|
||||
self.swap_typeclass(new_typeclass,
|
||||
clean_attributes=clean_attributes, no_default=no_default)
|
||||
|
||||
def access(self, accessing_obj, access_type='read', default=False, **kwargs):
|
||||
|
|
@ -248,7 +248,7 @@ class Player(PlayerDB):
|
|||
default (bool) - what to return if no lock of access_type was found
|
||||
**kwargs - passed to the at_access hook along with the result.
|
||||
"""
|
||||
result = self.dbobj.access(accessing_obj, access_type=access_type, default=default)
|
||||
result = self.access(accessing_obj, access_type=access_type, default=default)
|
||||
self.at_access(result, accessing_obj, access_type, **kwargs)
|
||||
return result
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ class Player(PlayerDB):
|
|||
on the object. (example: 'Builders')
|
||||
Note that this method does -not- call the at_access hook.
|
||||
"""
|
||||
return self.dbobj.check_permstring(permstring)
|
||||
return self.check_permstring(permstring)
|
||||
|
||||
## player hooks
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue