diff --git a/src/objects/objects.py b/src/objects/objects.py index 2c5264b7c8..160b379454 100644 --- a/src/objects/objects.py +++ b/src/objects/objects.py @@ -77,12 +77,11 @@ class Object(TypeClass): def at_init(self): """ - This is always called whenever this - object initiated -- both when the object - is first created as well as after each restart. - It is also called after each server reload, so - if something should survive a warm-reboot (rebooting - the server without the players logging out), put it here. + This is always called whenever this object is initiated -- + that is, whenever it its typeclass is cached from memory. This + happens on-demand first time the object is used or activated + in some way after being created but also after each server + restart or reload. """ pass diff --git a/src/players/player.py b/src/players/player.py index c3ea34cf32..0d8da1d474 100644 --- a/src/players/player.py +++ b/src/players/player.py @@ -53,12 +53,13 @@ class Player(TypeClass): def at_init(self): """ - This is always called whenever this - object initiated -- both when the object - is first created as well as after each restart. - It is also called after each server reload, so - if something should survive a warm-reboot (rebooting - the server without the players logging out), put it here. + This is always called whenever this object is initiated -- + that is, whenever it its typeclass is cached from memory. This + happens on-demand first time the object is used or activated + in some way after being created but also after each server + restart or reload. In the case of player objects, this usually + happens the moment the player logs in or reconnects after a + reload. """ pass diff --git a/src/scripts/scripts.py b/src/scripts/scripts.py index 2ff9f1b8e4..cdb97add97 100644 --- a/src/scripts/scripts.py +++ b/src/scripts/scripts.py @@ -221,9 +221,6 @@ class ScriptClass(TypeClass): return True # hooks - def at_init(self): - "called every typeclass initiation (reloads/restarts). not much use for scripts." - pass def at_script_creation(self): "placeholder" pass @@ -239,6 +236,9 @@ class ScriptClass(TypeClass): def at_repeat(self): "placeholder" pass + def at_init(self): + "called when typeclass re-caches. Usually not used for scripts." + pass #