mirror of
https://github.com/evennia/evennia.git
synced 2026-03-20 23:06:31 +01:00
Added the ability to give multiple typeclass search-paths to config file. This way you can add a path to your custom directory and don't have to write so much when creating typeclassed objects using e.g. @create.
This commit is contained in:
parent
b9c1921a0b
commit
d2400a8a6b
11 changed files with 112 additions and 173 deletions
|
|
@ -161,20 +161,19 @@ CMDSET_DEFAULT = "game.gamesrc.commands.basecmdset.DefaultCmdSet"
|
|||
CMDSET_OOC = "game.gamesrc.commands.basecmdset.OOCCmdSet"
|
||||
|
||||
###################################################
|
||||
# Default Object typeclasses
|
||||
# Typeclasses
|
||||
###################################################
|
||||
|
||||
# Note that all typeclasses must originally
|
||||
# inherit from src.objects.objects.Object somewhere in
|
||||
# their path.
|
||||
# Base paths for typeclassed object classes. These paths must be
|
||||
# defined relative evennia's root directory. They will be searched in
|
||||
# order to find relative typeclass paths.
|
||||
OBJECT_TYPECLASS_PATHS = ["game.gamesrc.objects", "game.gamesrc.objects.examples"]
|
||||
SCRIPT_TYPECLASS_PATHS = ["game.gamesrc.scripts", "game.gamesrc.scripts.examples"]
|
||||
PLAYER_TYPECLASS_PATHS = ["game.gamesrc.objects"]
|
||||
|
||||
# This sets the default base dir to search when importing
|
||||
# things, so one doesn't have to write the entire
|
||||
# path in-game.
|
||||
BASE_TYPECLASS_PATH = "game.gamesrc.objects"
|
||||
# Typeclass for player objects (linked to a character) (fallback)
|
||||
BASE_PLAYER_TYPECLASS = "game.gamesrc.objects.baseobjects.Player"
|
||||
# Typeclass and base for all following objects (fallback)
|
||||
# Typeclass and base for all objects (fallback)
|
||||
BASE_OBJECT_TYPECLASS = "game.gamesrc.objects.baseobjects.Object"
|
||||
# Typeclass for character objects linked to a player (fallback)
|
||||
BASE_CHARACTER_TYPECLASS = "game.gamesrc.objects.baseobjects.Character"
|
||||
|
|
@ -183,14 +182,6 @@ BASE_ROOM_TYPECLASS = "game.gamesrc.objects.baseobjects.Room"
|
|||
# Typeclass for Exit objects (fallback)
|
||||
BASE_EXIT_TYPECLASS = "game.gamesrc.objects.baseobjects.Exit"
|
||||
|
||||
###################################################
|
||||
# Scripts
|
||||
###################################################
|
||||
|
||||
# Python path to a directory to start searching
|
||||
# for scripts.
|
||||
BASE_SCRIPT_PATH = "game.gamesrc.scripts"
|
||||
|
||||
###################################################
|
||||
# Batch processors
|
||||
###################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue