Looking at the character behaviour further, it seems the problem does
not extend to normal player objects, but only to Player #1, for which
at_player_creation does not appear to work.
Another related issue is with parenting the THING class.
Using the below re-definition of the thing parent, @create an object,
then immediately do
examine <object name>
I find that the "sdesc" quality is nowhere to be seen. Now, do 'look
<object>' and redo the examine. Suddenly the sdesc quality has
appeared and will be there from now on. I haven't been able to find
out why this is. It's maybe more of a quirk, but it might hide some
other weird behavior somewhere. Added this as an issue to the issue
tracker, mainly in order to try it out. :)
.
Starkiel
-----------
from game.gamesrc.parents.base.basicobject import BasicObject
class BasicObject(BasicObject):
def __init__(self, source_obj, *args, **kwargs):
super(BasicObject,self).__init__(source_obj, *args, **kwargs)
name = self.scripted_obj.get_name
(fullname=False,show_dbref=False, show_flags=False)
self.scripted_obj.set_attribute('sdesc', str(name))
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)