com.planet_ink.coffee_mud.core.interfaces
Interface CloseableLockable

All Superinterfaces:
Affectable, java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, Environmental, Modifiable, MsgListener, Physical, StatsAffecting, Tickable
All Known Subinterfaces:
Container, DeadBody, DeckOfCards, Exit, FuelConsumer, HandOfCards, PrepositionExit
All Known Implementing Classes:
AjarDoor, Backpack, BagOfEndlessness, BagOfHolding, BandedArmor, Bed, Boat, ChainMailArmor, ChainMailVest, Chair, ClimbableExit, CloseableContainer, Corpse, Door, Dress, DrowChainMailArmor, EternityBarkArmor, EternityLeafArmor, EternityLeafShield, FieldPlate, FlyingExit, FullPlate, GapExit, Gate, GenAirLock, GenArmor, GenBagOfEndlessness, GenBed, GenBelt, GenBoat, GenCage, GenCageRideable, GenChair, GenCigar, GenClanCommonContainer, GenClanContainer, GenCloak, GenCompGenerator, GenComputerConsole, GenContainer, GenCorpse, GenCurtain, GenDoor, GenDress, GenDrink, GenElecContainer, GenElecPanel, GenEmptyDrink, GenExit, GenFountain, GenGrapples, GenLiquidResource, GenMobilePortal, GenMultiPotion, GenPants, GenPerfume, GenPiano, GenPipe, GenPortal, GenPotion, GenRideable, GenSailingShip, GenShield, GenShipEngine, GenShipPanel, GenShipThruster, GenShirt, GenShoes, GenSiegeWeapon, GenSpaceShip, GenTable, GenTriCorder, GenTub, GenWater, GlovesSpeed, GlowingMageArmor, GoodyBag, Grate, GreatHelm, Hat, Hat_Intelligence, Helmet, HerbChest, HiddenClosedDoorway, HiddenWalkway, HideArmor, HoleInTheGround, Hood, HorseCart, Impassable, Ingredients, LargeChest, LargeSack, LeatherArmor, LeatherBoots, LeatherBracers, LeatherCap, LeatherGauntlets, LifeFountain, LockableContainer, LockedDoor, LockedGate, MetalBracers, MichaelsMithrilChain, NeedleChest, NeedleDoor, OilFlask, Open, OpenDescriptable, OpenNameable, OpenPrepositional, PaddedArmor, Pan, Pants, PitOpen, PortableHole, Pot, RingMail, Robes, ScaleMail, Shirt, Shoes, SmallChest, SmallSack, SplintMail, Spring, StdArmor, StdBoardable, StdCage, StdCageRideable, StdClanCommonContainer, StdClanContainer, StdClosedDoorway, StdCompFuelConsumer, StdCompGenerator, StdCompPanel, StdComputerConsole, StdContainer, StdDeckOfCards, StdDrink, StdElecCompContainer, StdElecContainer, StdElecPanel, StdExit, StdGrapples, StdHandOfCards, StdLockedDoorway, StdOpenDoorway, StdPerfume, StdPortal, StdPotion, StdRideable, StdShield, StdShipEngine, StdShipThruster, StdSiegeWeapon, StdSmokable, StdTriCorder, StdTub, SteelGauntlets, StuddedLeatherArmor, ThreadbareRobes, TrappedChest, TrappedDoor, TrappedLockedDoor, UnseenWalkway, WalkingBoots, Waterskin, Wineskin

public interface CloseableLockable
extends Physical

An interface for all mechanisms that has a lockable door or lid, such as containers and exits

See Also:
Exit, Container

Field Summary
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Method Summary
 boolean defaultsClosed()
          For exits with a door, this returns whether this defaults in a closed state.
 boolean defaultsLocked()
          For exits with a door and lock, this returns whether this defaults in a closed and locked state.
 boolean hasADoor()
          Returns whether this has a door, and must be opened before being used.
 boolean hasALock()
          Returns whether this has a lock on it, and, if locked, must be unlocked before being used.
 boolean isLocked()
          Returns whether this is LOCKED, and must be unlocked before being used.
 boolean isOpen()
          Returns whether this is OPEN and may be accessed or travelled through
 java.lang.String keyName()
          For things with doors and locks, this returns the unique string representing the key code required to unlock/lock it.
 int openDelayTicks()
          Returns the number of ticks that this remains open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.
 void setDoorsNLocks(boolean hasADoor, boolean isOpen, boolean defaultsClosed, boolean hasALock, boolean isLocked, boolean defaultsLocked)
          Modifies the various door/lock settings for this thing.
 void setKeyName(java.lang.String keyName)
          For things with doors and locks, this sets the unique string representing the key code required to unlock/lock it.
 void setOpenDelayTicks(int numTicks)
          Sets the number of ticks that this will remain open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Physical
description, displayText, name
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener
executeMsg, okMessage
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent
amDestroyed, destroy, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable
addEffect, addNonUninvokableEffect, basePhyStats, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, setBasePhyStats
 

Method Detail

isOpen

boolean isOpen()
Returns whether this is OPEN and may be accessed or travelled through

Returns:
whether this is OPEN and may be accessed or travelled through

isLocked

boolean isLocked()
Returns whether this is LOCKED, and must be unlocked before being used.

Returns:
true if locked, false otherwise
See Also:
hasADoor(), hasALock()

hasADoor

boolean hasADoor()
Returns whether this has a door, and must be opened before being used.

Returns:
true if a door is present, false otherwise.
See Also:
isOpen(), isLocked()

hasALock

boolean hasALock()
Returns whether this has a lock on it, and, if locked, must be unlocked before being used.

Returns:
whether a lock is present
See Also:
isOpen(), isLocked(), hasADoor()

defaultsLocked

boolean defaultsLocked()
For exits with a door and lock, this returns whether this defaults in a closed and locked state.

Returns:
true if defaults closed and locked, false otherwise
See Also:
hasADoor(), defaultsClosed()

defaultsClosed

boolean defaultsClosed()
For exits with a door, this returns whether this defaults in a closed state.

Returns:
true if defaults closed, false otherwise
See Also:
hasADoor(), defaultsLocked()

setDoorsNLocks

void setDoorsNLocks(boolean hasADoor,
                    boolean isOpen,
                    boolean defaultsClosed,
                    boolean hasALock,
                    boolean isLocked,
                    boolean defaultsLocked)
Modifies the various door/lock settings for this thing.

Parameters:
hasADoor - whether this has a door
isOpen - whether this is open for use
defaultsClosed - whether this defaults closed
hasALock - whether this has a lock
isLocked - whether this is presently locked
defaultsLocked - whether this defaults closed and locked.
See Also:
isOpen(), isLocked(), hasADoor(), hasALock(), defaultsClosed(), defaultsLocked()

keyName

java.lang.String keyName()
For things with doors and locks, this returns the unique string representing the key code required to unlock/lock it.

Returns:
the key code
See Also:
setKeyName(String)

setKeyName

void setKeyName(java.lang.String keyName)
For things with doors and locks, this sets the unique string representing the key code required to unlock/lock it.

Parameters:
keyName - the new key code
See Also:
keyName()

openDelayTicks

int openDelayTicks()
Returns the number of ticks that this remains open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.

Returns:
the number of ticks this remains open
See Also:
setOpenDelayTicks(int), Tickable.TICKID_EXIT_REOPEN

setOpenDelayTicks

void setOpenDelayTicks(int numTicks)
Sets the number of ticks that this will remain open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.

Parameters:
numTicks - the number of ticks this will remain open
See Also:
openDelayTicks(), Tickable.TICKID_EXIT_REOPEN