Fixed some documentation typos/rewrites as suggested in Issue 393.
This commit is contained in:
parent
878f83aba0
commit
1e6384e40c
1 changed files with 18 additions and 20 deletions
|
|
@ -37,14 +37,14 @@ class Object(TypeClass):
|
||||||
# __init__ is only defined here in order to present docstring to API.
|
# __init__ is only defined here in order to present docstring to API.
|
||||||
def __init__(self, dbobj):
|
def __init__(self, dbobj):
|
||||||
"""
|
"""
|
||||||
This is the root typeclass object representing all entities
|
This is the root typeclass object, representing all entities
|
||||||
that has and actual presence in-game. Objects generally has a
|
that have an actual presence in-game. Objects generally have a
|
||||||
location, can be manipulated and looked at. Most game entities
|
location. They can also be manipulated and looked at. Most
|
||||||
you define should inherit from Object at some distance.
|
game entities you define should inherit from Object at some distance.
|
||||||
Important subclasses of Object are that Evennia defines by
|
Evennia defines some important subclasses of Object by default, namely
|
||||||
default for you are Characters, Exits and Rooms.
|
Characters, Exits and Rooms (see the bottom of this module).
|
||||||
|
|
||||||
Note that all Objects and its subclasses *must* always be
|
Note that all new Objects and their subclasses *must* always be
|
||||||
created using the ev.create_object() function. This is so the
|
created using the ev.create_object() function. This is so the
|
||||||
typeclass system can be correctly initiated behind the scenes.
|
typeclass system can be correctly initiated behind the scenes.
|
||||||
|
|
||||||
|
|
@ -755,7 +755,7 @@ class Object(TypeClass):
|
||||||
return message
|
return message
|
||||||
|
|
||||||
#
|
#
|
||||||
# Base Player object
|
# Base Character object
|
||||||
#
|
#
|
||||||
|
|
||||||
class Character(Object):
|
class Character(Object):
|
||||||
|
|
@ -836,14 +836,13 @@ class Character(Object):
|
||||||
|
|
||||||
class Room(Object):
|
class Room(Object):
|
||||||
"""
|
"""
|
||||||
This is the base room object. It's basically
|
This is the base room object. It's just like any Object except its
|
||||||
like any Object except its location is None.
|
location is None.
|
||||||
"""
|
"""
|
||||||
def basetype_setup(self):
|
def basetype_setup(self):
|
||||||
"""
|
"""
|
||||||
Simple setup, shown as an example
|
Simple setup, shown as an example
|
||||||
(since default is None anyway)
|
(since default is None anyway)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
super(Room, self).basetype_setup()
|
super(Room, self).basetype_setup()
|
||||||
|
|
@ -852,19 +851,18 @@ class Room(Object):
|
||||||
self.location = None
|
self.location = None
|
||||||
|
|
||||||
#
|
#
|
||||||
# Exits
|
# Base Exit object
|
||||||
#
|
#
|
||||||
|
|
||||||
class Exit(Object):
|
class Exit(Object):
|
||||||
"""
|
"""
|
||||||
This is the base exit object - it connects a location to
|
This is the base exit object - it connects a location to another.
|
||||||
another. This is done by the exit assigning a "command" on itself
|
This is done by the exit assigning a "command" on itself with the
|
||||||
with the same name as the exit object (to do this we need to
|
same name as the exit object (to do this we need to remember to
|
||||||
remember to re-create the command when the object is cached since it must be
|
re-create the command when the object is cached since it must be
|
||||||
created dynamically depending on what the exit is called). This
|
created dynamically depending on what the exit is called). This
|
||||||
command (which has a high priority) will thus allow us to traverse exits
|
command (which has a high priority) will thus allow us to traverse
|
||||||
simply by giving the exit-object's name on its own.
|
exits simply by giving the exit-object's name on its own.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Helper classes and methods to implement the Exit. These need not
|
# Helper classes and methods to implement the Exit. These need not
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue