Affectable, Behavable, CloseableLockable, CMObject, CMObjectWrapper, Contingent, DBIdentifiable, Environmental, Expireable, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, Rider, StatsAffecting, Tickable, Container, Item, Wearable, java.lang.Cloneable, java.lang.Comparable<CMObject>StdRideableWrapperpublic class StdContainerWrapper extends StdItemWrapper implements Item, Container, CMObjectWrapper
Wearable.CODES| Modifier and Type | Field | Description |
|---|---|---|
protected Container |
container |
idConverterCONTAIN_ANYTHING, CONTAIN_BODIES, CONTAIN_CAGED, CONTAIN_CLOTHES, CONTAIN_COINS, CONTAIN_DAGGERS, CONTAIN_DESCS, CONTAIN_DRINKABLES, CONTAIN_EATABLES, CONTAIN_FOOTWEAR, CONTAIN_KEYS, CONTAIN_LIQUID, CONTAIN_ONEHANDWEAPONS, CONTAIN_OTHERWEAPONS, CONTAIN_RAWMATERIALS, CONTAIN_READABLES, CONTAIN_SCROLLS, CONTAIN_SHIELDS, CONTAIN_SMOKEABLES, CONTAIN_SSCOMPONENTS, CONTAIN_SWORDSamDestroyed, basePhyStats, isSavable, item, myContainer, owner, ridingDEFAULT_WORN_CODES, DEFAULT_WORN_DEPENDENCYGRID, DEFAULT_WORN_DESCS, DEFAULT_WORN_ORDER, DEFAULT_WORN_USUAL_NAMES, DEFAULT_WORN_WEIGHT_POINTS, DEFAULT_WORN_WEIGHTS, FILTER_ANY, FILTER_MOBINVONLY, FILTER_ROOMONLY, FILTER_UNWORNONLY, FILTER_WORNONLY, HIGHEST_WORN_CODE, IN_INVENTORY, WORN_ABOUT_BODY, WORN_ARMS, WORN_BACK, WORN_EARS, WORN_EYES, WORN_FEET, WORN_FLOATING_NEARBY, WORN_HANDS, WORN_HEAD, WORN_HELD, WORN_LEFT_FINGER, WORN_LEFT_WRIST, WORN_LEGS, WORN_MOUTH, WORN_NECK, WORN_RIGHT_FINGER, WORN_RIGHT_WRIST, WORN_TORSO, WORN_WAIST, WORN_WIELD| Constructor | Description |
|---|---|
StdContainerWrapper() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canContain(Item I) |
Returns whether this container is allowed to contain the given object.
|
int |
capacity() |
Returns the maximum weight that can fit inside this container.
|
long |
containTypes() |
Returns a bitmap of the types of things that this container can hold.
|
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.
|
void |
emptyPlease(boolean flatten) |
Empties this container into its owner.
|
ReadOnlyList<Item> |
getContents() |
Returns all the immediate items in this container, including
other containers, but not the contents of those innner containers.
|
ReadOnlyList<Item> |
getDeepContents() |
Returns all the items in this container, including other
containers and THEIR contents, recursively.
|
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 |
hasContent() |
Returns whether there is anything at all in this container.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isInside(Item I) |
Returns whether the given item is, in fact, inside this container, even
recursively.
|
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.
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
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 |
setCapacity(int newValue) |
Sets the maximum weight that can fit inside this container.
|
void |
setContainTypes(long containTypes) |
Sets a bitmap of the types of things that this container can hold.
|
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.
|
void |
setWrappedObject(CMObject obj) |
Set the object wrapped by this one.
|
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scriptscopyOf, initializeClassgetWrappedObjectcanSaveDatabaseID, databaseID, setDatabaseIDbaseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, valueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisReadable, readableText, setReadable, setReadableTextaddBehavior, addEffect, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, affectPhyStats, amBeingWornProperly, amDestroyed, amWearingAt, baseGoldValue, basePhyStats, behaviors, canSaveDatabaseID, canWear, compareProperLocations, compareTo, container, copyOf, databaseID, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delEffect, delScript, description, description, destroy, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, executeMsg, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, genericName, getSaveStatIndex, getStat, getStatCodes, getTickStatus, getWrappedObject, image, initializeClass, isGeneric, isReadable, isSavable, isStat, L, material, maxRange, minRange, miscTextFormat, name, name, Name, numBehaviors, numberOfItems, numEffects, numScripts, okMessage, owner, phyStats, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, readableText, recoverPhyStats, recursiveWeight, removeFromOwnerContainer, riding, sameAs, scripts, secretIdentity, setBasePhyStats, setBaseValue, setContainer, setDatabaseID, setDescription, setDisplayText, setExpirationDate, setImage, setMaterial, setMiscText, setName, setOwner, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setReadable, setReadableText, setRiding, setSavable, setSecretIdentity, setStat, setUsesRemaining, stopTicking, subjectToWearAndTear, text, tick, ultimateContainer, unWear, usesRemaining, value, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWearamBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWearprotected Container container
public java.lang.String ID()
CMObjectID in interface CMObjectID in class StdItemWrapperpublic void setWrappedObject(CMObject obj)
CMObjectWrappersetWrappedObject in interface CMObjectWrappersetWrappedObject in class StdItemWrapperobj - the object to wrappublic CMObject newInstance()
CMObjectnewInstance in interface CMObjectnewInstance in class StdItemWrapperpublic boolean isOpen()
CloseableLockableisOpen in interface CloseableLockablepublic boolean isLocked()
CloseableLockableisLocked in interface CloseableLockableCloseableLockable.hasADoor(),
CloseableLockable.hasALock()public boolean hasADoor()
CloseableLockablehasADoor in interface CloseableLockableCloseableLockable.isOpen(),
CloseableLockable.isLocked()public boolean hasALock()
CloseableLockablehasALock in interface CloseableLockableCloseableLockable.isOpen(),
CloseableLockable.isLocked(),
CloseableLockable.hasADoor()public boolean defaultsLocked()
CloseableLockabledefaultsLocked in interface CloseableLockableCloseableLockable.hasADoor(),
CloseableLockable.defaultsClosed()public boolean defaultsClosed()
CloseableLockabledefaultsClosed in interface CloseableLockableCloseableLockable.hasADoor(),
CloseableLockable.defaultsLocked()public void setDoorsNLocks(boolean hasADoor,
boolean isOpen,
boolean defaultsClosed,
boolean hasALock,
boolean isLocked,
boolean defaultsLocked)
CloseableLockablesetDoorsNLocks in interface CloseableLockablehasADoor - whether this has a doorisOpen - whether this is open for usedefaultsClosed - whether this defaults closedhasALock - whether this has a lockisLocked - whether this is presently lockeddefaultsLocked - whether this defaults closed and locked.CloseableLockable.isOpen(),
CloseableLockable.isLocked(),
CloseableLockable.hasADoor(),
CloseableLockable.hasALock(),
CloseableLockable.defaultsClosed(),
CloseableLockable.defaultsLocked()public java.lang.String keyName()
CloseableLockablekeyName in interface CloseableLockableCloseableLockable.setKeyName(String)public void setKeyName(java.lang.String keyName)
CloseableLockablesetKeyName in interface CloseableLockablekeyName - the new key codeCloseableLockable.keyName()public int openDelayTicks()
CloseableLockableopenDelayTicks in interface CloseableLockableCloseableLockable.setOpenDelayTicks(int),
Tickable.TICKID_EXIT_REOPENpublic void setOpenDelayTicks(int numTicks)
CloseableLockablesetOpenDelayTicks in interface CloseableLockablenumTicks - the number of ticks this will remain openCloseableLockable.openDelayTicks(),
Tickable.TICKID_EXIT_REOPENpublic ReadOnlyList<Item> getDeepContents()
ContainergetDeepContents in interface ContainerContainer.getContents()public ReadOnlyList<Item> getContents()
ContainergetContents in interface ContainerContainer.getDeepContents()public int capacity()
Containercapacity in interface ContainerContainer.setCapacity(int)public void setCapacity(int newValue)
ContainersetCapacity in interface ContainernewValue - the maximum weight that can fit inside this containerContainer.capacity()public boolean hasContent()
ContainerhasContent in interface Containerpublic boolean canContain(Item I)
ContainercanContain in interface ContainerI - the item to check against the allowed contentContainer.setContainTypes(long),
Container.containTypes()public boolean isInside(Item I)
Containerpublic long containTypes()
ContainercontainTypes in interface ContainerContainer.setContainTypes(long),
Container.CONTAIN_ANYTHING,
Container.CONTAIN_DESCSpublic void setContainTypes(long containTypes)
ContainersetContainTypes in interface ContainercontainTypes - a bitmap of the types of things that this container can hold.Container.containTypes(),
Container.CONTAIN_ANYTHING,
Container.CONTAIN_DESCSpublic void emptyPlease(boolean flatten)
ContaineremptyPlease in interface Containerflatten - if true, will also remove all recursive items from their containers