[wpdev-commits] xmlscripts/scripts door.py,1.4,1.5
Brought to you by:
rip,
thiagocorrea
|
From: <dr...@us...> - 2004-01-14 12:48:33
|
Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv19722
Modified Files:
door.py
Log Message:
The door linking works even better now.
Sleeping on things really helps :D
Index: door.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/door.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** door.py 14 Jan 2004 03:11:41 -0000 1.4
--- door.py 14 Jan 2004 12:48:29 -0000 1.5
***************
*** 62,66 ****
[ 0x6bF, 0x6c0, 1, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
[ 0x6c1, 0x6c2, 0, 0, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
! [ 0x6c3, 0x6c4, 0, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
[ 0x6c5, 0x6c6, -1, 1, SOUND_OPENSTEEL, SOUND_CLOSESTEEL ],
--- 62,66 ----
[ 0x6bF, 0x6c0, 1, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
[ 0x6c1, 0x6c2, 0, 0, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
! [ 0x6c3, 0x6c4, 0, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
[ 0x6c5, 0x6c6, -1, 1, SOUND_OPENSTEEL, SOUND_CLOSESTEEL ],
***************
*** 99,103 ****
[ 0x82e, 0x82f, 1, -1, SOUND_OPENGATE, SOUND_CLOSEGATE ],
[ 0x830, 0x831, 0, 0, SOUND_OPENGATE, SOUND_CLOSEGATE ],
! [ 0x832, 0x833, 0, -1, SOUND_OPENGATE, SOUND_CLOSEGATE ],
# Wooden Gate 1
--- 99,103 ----
[ 0x82e, 0x82f, 1, -1, SOUND_OPENGATE, SOUND_CLOSEGATE ],
[ 0x830, 0x831, 0, 0, SOUND_OPENGATE, SOUND_CLOSEGATE ],
! [ 0x832, 0x833, 0, -1, SOUND_OPENGATE, SOUND_CLOSEGATE ],
# Wooden Gate 1
***************
*** 129,133 ****
[ 0x870, 0x871, 1, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
[ 0x872, 0x873, 0, 0, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
! [ 0x874, 0x875, 0, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
# Barred Metal Door
--- 129,133 ----
[ 0x870, 0x871, 1, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
[ 0x872, 0x873, 0, 0, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
! [ 0x874, 0x875, 0, -1, SOUND_OPENWOOD, SOUND_CLOSEWOOD ],
# Barred Metal Door
***************
*** 149,153 ****
[ 0xF2, 0xF3, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0xF4, 0xF5, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0xF6, 0xF7, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x314, 0x315, -1, 1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
--- 149,153 ----
[ 0xF2, 0xF3, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0xF4, 0xF5, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0xF6, 0xF7, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x314, 0x315, -1, 1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
***************
*** 167,171 ****
[ 0x32E, 0x32F, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x330, 0x331, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0x332, 0x333, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x334, 0x335, -1, 1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
--- 167,171 ----
[ 0x32E, 0x32F, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x330, 0x331, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0x332, 0x333, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x334, 0x335, -1, 1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
***************
*** 185,189 ****
[ 0x34E, 0x34F, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x350, 0x351, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0x352, 0x353, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x354, 0x355, -1, 1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
--- 185,189 ----
[ 0x34E, 0x34F, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x350, 0x351, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0x352, 0x353, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x354, 0x355, -1, 1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
***************
*** 194,198 ****
[ 0x35E, 0x35F, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x360, 0x361, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0x362, 0x363, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
]
--- 194,198 ----
[ 0x35E, 0x35F, 1, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
[ 0x360, 0x361, 0, 0, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
! [ 0x362, 0x363, 0, -1, SOUND_OPENSECRET, SOUND_CLOSESECRET ],
]
***************
*** 235,242 ****
if not item.hastag('opened'):
item.settag( 'opened', 'true' )
- else:
- item.deltag( 'opened' )
! # Add an autoclose tempeffect
item.addtimer( CLOSEDOOR_DELAY, "door.autoclose", [ opencount ], 1 )
--- 235,240 ----
if not item.hastag('opened'):
item.settag( 'opened', 'true' )
! # Add an autoclose tempeffect
item.addtimer( CLOSEDOOR_DELAY, "door.autoclose", [ opencount ], 1 )
***************
*** 257,262 ****
item.id = door[0]
item.moveto( pos.x - door[2], pos.y - door[3] )
item.update()
-
# Soundeffect (close)
char.soundeffect( door[5] )
--- 255,261 ----
item.id = door[0]
item.moveto( pos.x - door[2], pos.y - door[3] )
+ if item.hastag('opened'):
+ item.deltag( 'opened' )
item.update()
# Soundeffect (close)
char.soundeffect( door[5] )
***************
*** 275,285 ****
# We are not supposed to close this door
if opencount != args[0]:
! return
!
! item.deltag( 'opencount' )
- if item.hastag( 'opened' ):
- item.deltag( 'opened' )
-
# Find the door definition for this item
for door in doors:
--- 274,279 ----
# We are not supposed to close this door
if opencount != args[0]:
! return
# Find the door definition for this item
for door in doors:
***************
*** 290,293 ****
--- 284,289 ----
item.id = door[0]
item.moveto( pos.x - door[2], pos.y - door[3] )
+ if item.hastag( 'opened' ):
+ item.deltag( 'opened' )
item.update()
***************
*** 300,306 ****
char.objectdelay = 0
! if item.hastag('link') and not item.gettag('opened'):
doubledoor = wolfpack.finditem( hex2dec(item.gettag('link')) )
! if not doubledoor.gettag('opened'):
opendoor( char, doubledoor )
--- 296,304 ----
char.objectdelay = 0
! # Do we have a linked door, is this door not open?
! if item.hastag('link') and not item.hastag('opened'):
doubledoor = wolfpack.finditem( hex2dec(item.gettag('link')) )
! # Double check to make sure either door isn't open.
! if not item.hastag('opened') and not doubledoor.hastag('opened'):
opendoor( char, doubledoor )
|