mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 05:57:16 +02:00
Restructured the way typeclasses are loaded. This makes it possible to run at_init() hooks at initiation also for objects without any custom cases for character/players. at_init() hooks are called only when an object is initiated. This means that a room's at_init() hook is only called when someone looks or enters it or a script operates on it, for example, rest of the time these objects are dormant, most efficiently.
This commit is contained in:
parent
0a1bcd36c2
commit
23cd9e31b1
14 changed files with 142 additions and 109 deletions
|
|
@ -54,9 +54,10 @@ def create_objects():
|
|||
# is inherited from the user so we don't specify it again here.
|
||||
|
||||
god_character = create.create_player(god_user.username, None, None,
|
||||
user=god_user,
|
||||
create_character=True,
|
||||
typeclass=character_typeclass,
|
||||
user=god_user)
|
||||
character_typeclass=character_typeclass)
|
||||
|
||||
god_character.id = 1
|
||||
god_character.db.desc = _('This is User #1.')
|
||||
god_character.locks.add("examine:perm(Immortals);edit:false();delete:false();boot:false();msg:all();puppet:false()")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue