wyvern.lib.properties
Interface Openable

All Superinterfaces:
Broadcaster, GameObject, MethodHookable, PropertyList
All Known Implementing Classes:
Chest, Door

public interface Openable
extends GameObject

Interface for things that can be opened and closed. Seems like a reasonable place to implement the lock API as well.

Version:
1.0, May 01, 1998
Author:
Steve Yegge

Field Summary
 
Fields inherited from interface wyvern.lib.PropertyList
PROPERTY_PACKAGE
 
Method Summary
 boolean close(Commandable agent)
          Notifies object that it's being closed.
 boolean isLocked()
          Returns true if the object is locked.
 boolean isOpen()
          Returns true if the object is currently open.
 void lock(Commandable agent)
          Locks the lock.
 boolean open(Commandable agent)
          Notifies object that it's being opened.
 void unlock(Commandable agent)
          Unlocks the lock.
 
Methods inherited from interface wyvern.lib.GameObject
addContainerChangeListener, addMapChangeListener, addMapMotionListener, addMotionTracker, addObjectTracker, addPrefix, addSuffix, bless, canEnter, canEnterBlockedBy, canMove, canMove, canMoveBlockedBy, canMoveBlockedBy, canMoveTo, canMoveToBlockedBy, checkDrop, curse, cycleFrame, destroy, externalize, getAlpha, getAppearance, getArchetype, getBaseWeight, getBitmap, getBounds, getCanonicalClassName, getCategory, getContainer, getCreator, getDamagedDescription, getDescription, getDirection, getGenderPossessive, getGenderPronoun, getImage, getImageDescriptor, getImageDescriptors, getLayer, getLocations, getMap, getMapLink, getMaterial, getMaterialDescription, getMover, getOwningPlayer, getParentMap, getPrefixes, getQuantity, getReferenceLoc, getRelativeLocs, getShortDesc, getSuffixes, getTile, getTile, getValue, getWeight, inContainer, initialize, inMapEditor, invalidate, invalidateImage, invalidateParent, invalidateText, isAnimated, isAttackable, isBlessed, isCommandable, isCursed, isDamned, isGroupable, isIdentified, isMonster, isMonsterOrPlayer, isPlayer, isTerrain, isUncursed, isUnpaid, isWizard, makeClone, markPaid, markUnpaid, move, occupies, positionAt, positionAtMap, remove, removeContainerChangeListener, removeMapChangeListener, removeMapMotionListener, removeMotionTracker, removeObjectTracker, removePrefix, removeSuffix, setAlpha, setAnimated, setBitmap, setCategory, setContainer, setDirection, setImage, setImage, setLayer, setLocations, setMap, setMapLink, setQuantity, setShape, setSize, setTransientSize, setWeight, setWeight, teleport
 
Methods inherited from interface wyvern.lib.PropertyList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, getDoubleProperty, getInheritedProperty, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, transientlyRemoveProperty
 
Methods inherited from interface wyvern.lib.MethodHookable
addMethodHook, removeMethodHook, runMethodHook
 
Methods inherited from interface wyvern.lib.Broadcaster
broadcast, broadcast, broadcast, broadcast, broadcast
 

Method Detail

isLocked

public boolean isLocked()
Returns true if the object is locked.


isOpen

public boolean isOpen()
Returns true if the object is currently open.


open

public boolean open(Commandable agent)
Notifies object that it's being opened.

Parameters:
agent - the agent opening it (can be null)
Returns:
true if it opened successfully

close

public boolean close(Commandable agent)
Notifies object that it's being closed.

Parameters:
agent - the agent closed it (can be null)
Returns:
true if it closed successfully

lock

public void lock(Commandable agent)
Locks the lock.


unlock

public void unlock(Commandable agent)
Unlocks the lock.