This is a skeleton door. It will handle opening/closing, locking/unlocking,
and exits.
Methods
|
|
|
|
close
|
close ( self )
Closes the door.
returns:
(int) 1 always |
|
closeDoor
|
closeDoor (
self,
actionString,
arguments,
rawinput,
)
This gets called when a player types close door . |
|
createDoor
|
createDoor ( self )
|
|
createObject
|
createObject ( self )
|
|
destroyDoor
|
destroyDoor ( self )
|
|
destroyObject
|
destroyObject ( self )
|
|
enterEnvironment
|
enterEnvironment ( self, environment )
This function gets called when a player enters the room
with the door in it to add the exit that the door leads to
(if the door is open). see mudlib.core.Object
|
|
getAdjoiningRoom
|
getAdjoiningRoom ( self )
Returns the room the door leads to.
returns:
(object) the adjoining room object |
|
getExitName
|
getExitName ( self )
Returns the exit name the door creates when opened.
returns:
(string) the exit name |
|
getOpposingExitName
|
getOpposingExitName ( self )
Returns the exit leading back to the room.
returns:
(string) the name of the exit leading back into this room |
|
getShortDescription
|
getShortDescription ( self )
Returns the short description of the door and where it leads.
returns:
(string) the evaluated short description of the door and where
it leads |
|
isLocked
|
isLocked ( self )
Returns a boolean as to whether the door is locked or not.
returns:
(int) 1 if locked, 0 if not locked. |
|
isOpen
|
isOpen ( self )
Returns boolean as to whether the door is open or closed.
returns:
(int) 1 if it's open, 0 if not. |
|
lock
|
lock ( self, key )
Attempts to lock the door using with a given key.
If the key combination does not match the door combination, then
this will fail and return a 0.
arguments:
-
key
- (mudlib.door.Key) the key being used to lock the door
returns:
(int) 1 if successful, 0 if not |
|
lockDoor
|
lockDoor (
self,
actionString,
arguments,
rawinput,
)
This gets called when a player types lock door . |
|
objectEnteredEnvironment
|
objectEnteredEnvironment ( self, object )
This function gets called when a player enters the room
to register the actions for manipulating the door. see mudlib.core.Object
|
|
objectLeftEnvironment
|
objectLeftEnvironment ( self, object )
This function gets called when a player leaves the room
to unregister the actions for manipulating the door. see mudlib.core.Object
|
|
open
|
open ( self )
Opens the door.
returns:
(int) 1 if it opened successfully, 0 if not |
|
openDoor
|
openDoor (
self,
actionString,
arguments,
rawinput,
)
This gets called when a player types open door . |
|
openStatus
|
openStatus ( self )
Returns status text as to whether the door is open or closed.
returns:
(string) the status of the door ("It is open." or "It is closed.") |
|
setAdjoiningRoom
|
setAdjoiningRoom ( self, roomPath )
Sets the room the door leads to.
arguments:
-
roomPath
- (string) the dotted string path of the room
|
|
setDoorLock
|
setDoorLock ( self, keyCombo )
Sets the door combination for locking/unlocking.
arguments:
-
keyCombo
- (string) the "combination" for this key
|
|
setExitName
|
setExitName ( self, exitName )
Sets the exit name that the door creates when opened.
arguments:
-
exitName
- (string) the exit created when the door opens
|
|
setOpposingExitName
|
setOpposingExitName ( self, exitName )
Sets the exit leading back to the room.
arguments:
-
exitName
- (string) the name of the exit leading back
into the room
|
|
unlock
|
unlock ( self, key )
Attempts to unlock the door with the given key.
If the key combination does not match the door combination, then
this will fail and return a 0.
arguments:
-
key
- (mudlib.door.Key) the key being used to unlock the door
returns:
(int) 1 if successful, 0 if not |
|
unlockDoor
|
unlockDoor (
self,
actionString,
arguments,
rawinput,
)
This gets called when a player types unlock door . |