mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17:17 +02:00
Some cleanup. Fixed all examples to match the changes in the states and help systems, also
ran them through pylint to pretty them up. /Griatch
This commit is contained in:
parent
8074617285
commit
84aeabb272
11 changed files with 323 additions and 211 deletions
|
|
@ -6,13 +6,15 @@ gamesrc/parents and set SCRIPT_DEFAULT_OBJECT = 'custom_basicobject'
|
|||
in game/settings.py.
|
||||
|
||||
Generally, if you want to conveniently set future objects to inherit from this
|
||||
script parent, this files and others like it need to be
|
||||
script parent, this file and others like it need to be
|
||||
located under the game/gamesrc/parent directory.
|
||||
"""
|
||||
from game.gamesrc.parents.base.basicobject import BasicObject
|
||||
|
||||
class CustomBasicObject(BasicObject):
|
||||
|
||||
"""
|
||||
This defines the base class of all non-player objects in game.
|
||||
"""
|
||||
def at_object_creation(self):
|
||||
"""
|
||||
This function is called whenever the object is created. Use
|
||||
|
|
@ -31,7 +33,7 @@ class CustomBasicObject(BasicObject):
|
|||
show_dbref=False,
|
||||
show_flags=False)
|
||||
#assign the name to the new attribute
|
||||
obj.set_attribute('sdesc',name)
|
||||
obj.set_attribute('sdesc', name)
|
||||
|
||||
def at_object_destruction(self, pobject=None):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue