All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sso.Lock

java.lang.Object
   |
   +----sso.Persistant
           |
           +----sso.GameObject
                   |
                   +----sso.Immobile
                           |
                           +----sso.Lock

public class Lock
extends Immobile

Variable Index

 o host
 o key
 o lockDifficulty
 o locked
 o picklockSkill
 o trap

Constructor Index

 o Lock()
Protected constructor.

Method Index

 o createLock()
Public Factory Method.
 o createRows()
Create the rows needed to store the Lock
 o getHost()
Get the lock host
 o getKey()
Get the lock's key
 o getLockDifficulty()
Get the lock difficulty
 o getTrap()
Get the trap for this lock
 o init()
Initializer for new locks.
 o isLocked()
Is the lock locked?
 o isTrapped()
Is the object trapped?
 o load()
Load lock object data from the database
 o loadLock(int)
Load a Lock object
 o lock(PC, Thing)
Attempt to lock the lock
 o main(String[])
Tester
 o pickLock(PC)
Attempt to pick the lock
 o setHost(GameObject)
Set the lock host
 o setKey(Thing)
Set the lock's key
 o setLockDifficulty(int)
Set the lock difficulty
 o setLocked(boolean)
Set the lock's locked status
 o setTrap(Trap)
Set the trap object for this lock
 o store()
Store the Lock object
 o unlock(PC, Thing)
Attempt to unlock the lock
 o unregister()
Unregister the lock object

Variables

 o locked
 protected boolean locked
 o key
 protected Thing key
 o lockDifficulty
 protected int lockDifficulty
 o host
 protected GameObject host
 o trap
 protected Trap trap
 o picklockSkill
 public static final String picklockSkill

Constructors

 o Lock
 protected Lock()
Protected constructor. Use factory method for new lock.

Methods

 o createLock
 public static Lock createLock()
Public Factory Method. Get a new Lock object.

 o init
 protected void init()
Initializer for new locks.

Overrides:
init in class Immobile
 o isLocked
 public boolean isLocked()
Is the lock locked?

 o setLocked
 public void setLocked(boolean locked)
Set the lock's locked status

 o getKey
 public Thing getKey()
Get the lock's key

 o setKey
 public void setKey(Thing key)
Set the lock's key

 o getLockDifficulty
 public int getLockDifficulty()
Get the lock difficulty

 o setLockDifficulty
 public void setLockDifficulty(int diff)
Set the lock difficulty

 o getHost
 public GameObject getHost()
Get the lock host

 o setHost
 public void setHost(GameObject go)
Set the lock host

 o getTrap
 public Trap getTrap()
Get the trap for this lock

 o isTrapped
 public boolean isTrapped()
Is the object trapped?

 o setTrap
 public void setTrap(Trap trap)
Set the trap object for this lock

 o pickLock
 public boolean pickLock(PC victim)
Attempt to pick the lock

 o lock
 public boolean lock(PC victim,
                     Thing o_key)
Attempt to lock the lock

 o unlock
 public boolean unlock(PC victim,
                       Thing o_key)
Attempt to unlock the lock

 o createRows
 protected void createRows()
Create the rows needed to store the Lock

Overrides:
createRows in class Immobile
 o store
 public void store()
Store the Lock object

Overrides:
store in class Immobile
 o loadLock
 public static Lock loadLock(int id)
Load a Lock object

 o load
 protected void load()
Load lock object data from the database

Overrides:
load in class Immobile
 o unregister
 public void unregister()
Unregister the lock object

Overrides:
unregister in class Immobile
 o main
 public static void main(String args[])
Tester


All Packages  Class Hierarchy  This Package  Previous  Next  Index