Update of /cvsroot/wpdev/xmlscripts/scripts/speech
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28093/speech
Modified Files:
banker.py
Log Message:
- Replaced access to .events with the calls hasevent/addevent/removeevent in all relevant places.
Notice that addevent() is expected to add the event to the head of the list.
I recognized no situation (of those changed) where it would make a difference adding the event to the end of the list, so in those cases used addevent aswell.
- Fixed a copy&paste error in trap.py on removing the tags (pointed out by Incannus).
note: .events can now be made read only, bearing in mind that in doing so there is no way to make a distinction between adding an event at the top or at the end of the event list.
Index: banker.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/speech/banker.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** banker.py 26 May 2004 13:07:25 -0000 1.10
--- banker.py 24 Aug 2004 18:10:29 -0000 1.11
***************
*** 140,144 ****
def onDropOnChar( char, item ):
! if "speech_banker" in char.events:
char.socket.clilocmessage( 0x7A2A4, "", 0x3b2, 3, listener )
#backpack = char.getbackpack()
--- 140,144 ----
def onDropOnChar( char, item ):
! if char.hasevent( 'speech_banker' ):
char.socket.clilocmessage( 0x7A2A4, "", 0x3b2, 3, listener )
#backpack = char.getbackpack()
|