wyvern.lib.classes.construct
Class Lock

java.lang.Object
  extended bywyvern.kernel.properties.PList
      extended bywyvern.lib.classes.construct.Lock
All Implemented Interfaces:
PropertyList

public class Lock
extends PList

A lock that can be placed on chests, doors, or other objects. If you set a code on the lock, then only keys with that code can open it, and it can't be picked or magically unlocked. If there's no code, then the lock level determines how hard it is to pick it.

Version:
1.0, Oct 27, 1998
Author:
Steve Yegge

Field Summary
 
Fields inherited from class wyvern.kernel.properties.PList
readOnly_
 
Fields inherited from interface wyvern.lib.PropertyList
PROPERTY_PACKAGE
 
Constructor Summary
Lock()
          Constructs a new Lock with no code
Lock(int code)
          Constructs a new Lock
 
Method Summary
 int getCode()
          Returns the 32-bit code that opens this lock.
 int getLockLevel()
          Returns how difficult the lock is to pick on a 0-100 scale.
 void setCode(int code)
          Sets the 32-bit combination that opens the lock.
 void setLockLevel(int lockLevel)
          Sets the lockLevel level for the lock, from 0-100.
 
Methods inherited from class wyvern.kernel.properties.PList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, debugProperties, dismantlePropertyList, getDoubleProperty, getInheritedProperty, getInteger, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProfilingInfo, 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, toString, transientlyRemoveProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Lock

public Lock()
Constructs a new Lock with no code


Lock

public Lock(int code)
Constructs a new Lock

Method Detail

getCode

public int getCode()
Returns the 32-bit code that opens this lock.

Returns:
the lock code

setCode

public void setCode(int code)
Sets the 32-bit combination that opens the lock.

Parameters:
code - the lock code

getLockLevel

public int getLockLevel()
Returns how difficult the lock is to pick on a 0-100 scale.

Returns:
the difficulty from 0-100

setLockLevel

public void setLockLevel(int lockLevel)
Sets the lockLevel level for the lock, from 0-100. Anything above 100 won't normally be pickable.

Parameters:
lockLevel - the lock lockLevel