mirror of
https://github.com/evennia/evennia.git
synced 2026-03-20 14:56:30 +01:00
- Made it so user #1 is also affected by the on_player_creation() function. - Added an event folder for custom events, including a working example - Expanded the example commands and parents to include the changes to how they should be initialized. - Added an optional ansi scheme (not active by default)
22 lines
835 B
Python
22 lines
835 B
Python
"""
|
|
This is the base object type/interface that all parents are derived from by
|
|
default. Each object type sub-classes this class and over-rides methods as
|
|
needed.
|
|
|
|
NOTE: This file should NOT be directly modified. Sub-class the BasicObject
|
|
class in game/gamesrc/parents/base/basicobject.py and change the
|
|
SCRIPT_DEFAULT_OBJECT variable in settings.py to point to the new class.
|
|
"""
|
|
from src.script_parents.basicobject import EvenniaBasicObject
|
|
|
|
class BasicObject(EvenniaBasicObject):
|
|
pass
|
|
|
|
def class_factory(source_obj):
|
|
"""
|
|
This method is called any script you retrieve (via the scripthandler). It
|
|
creates an instance of the class and returns it transparently.
|
|
|
|
source_obj: (Object) A reference to the object being scripted (the child).
|
|
"""
|
|
return BasicObject(source_obj)
|