Affectable, Behavable, CloseableLockable, CMObject, Contingent, DBIdentifiable, Environmental, Expireable, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, Rider, StatsAffecting, Tickable, Container, FuelConsumer, Item, Light, Wearable, java.lang.Cloneable, java.lang.Comparable<CMObject>public class GenStove extends GenContainer implements Light, FuelConsumer
Wearable.CODES| Modifier and Type | Field | Description |
|---|---|---|
protected boolean |
destroyedWhenBurnedOut |
|
protected int |
durationTicks |
|
protected int |
fuelTickDown |
|
protected int[] |
generatedFuelTypes |
|
protected boolean |
goesOutInTheRain |
|
protected boolean |
lit |
|
protected java.lang.String |
readableText |
|
protected int |
ticksPerFuelConsume |
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_SWORDScapacity, containType, defaultsClosed, defaultsLocked, hasALid, hasALock, isLocked, isOpen, openDelayTicks_name, affectPhyStats, affects, baseGoldValue, basePhyStats, behaviors, cachedImageName, CODES, databaseID, description, destroyed, displayText, dispossessionTime, material, me, miscText, myContainer, myUses, myWornCode, owner, phyStats, properWornBitmap, rawImageName, riding, scripts, secretIdentity, tickCtr, tickStatus, wornLogicalAnd, xtraValuesDEFAULT_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 |
|---|---|
GenStove() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
consumeFuel(int amount) |
Forces this fuel consumer to consumer some amount of its
fuel, without any other effect.
|
boolean |
destroyedWhenBurnedOut() |
Gets whether this Light item automatically destroys itself after
it is lit, and then its duration runs out.
|
void |
executeMsg(Environmental myHost,
CMMsg msg) |
The general message event handler for the object.
|
int[] |
getConsumedFuelTypes() |
Gets an array of RawMaterial codes representing the
type of fuel that must be put inside this fuel container
for it to consume it.
|
int |
getDuration() |
Gets the duration, in ticks, that this light object will emit
light before stopping for whatever reason.
|
protected java.util.List<Item> |
getFuel() |
|
int |
getFuelRemaining() |
Returns the amount of fuel remaining in this container.
|
java.lang.String |
getStat(java.lang.String code) |
An alternative means of retreiving the values of those fields on this object which are modifiable at
run-time by builders.
|
java.lang.String[] |
getStatCodes() |
Returns an array of the string names of those fields which are modifiable on this object at run-time by
builders.
|
int |
getTicksPerFuelConsume() |
Gets the number of ticks between each consumption of fuel.
|
int |
getTotalFuelCapacity() |
Returns the amount of total fuel this container can hold.
|
boolean |
goesOutInTheRain() |
Returns true if this particular light item is sensitive to rain
and nasty weather such that rain or water will cause it to stop
being lit.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
protected boolean |
isFuel(Item I) |
|
boolean |
isGeneric() |
Whether the fields of this item are set in code, or set by builders.
|
boolean |
isLit() |
Gets whether this light item is presently emitting any light.
|
void |
light(boolean isLit) |
Sets whether this light item is presently emitting any light.
|
boolean |
okMessage(Environmental myHost,
CMMsg msg) |
The general message event previewer for the object.
|
java.lang.String |
readableText() |
For things that are readable, this returns the readable string
for this thing.
|
boolean |
sameAs(Environmental E) |
Whether this object instance is functionally identical to the object passed in.
|
void |
setConsumedFuelType(int[] resources) |
Sets an array of RawMaterial codes representing the
type of fuel that must be put inside this fuel container
for it to consume it.
|
void |
setDestroyedWhenBurntOut(boolean truefalse) |
Sets whether this Light item automatically destroys itself after
it is lit, and then its duration runs out.
|
void |
setDuration(int duration) |
Sets the duration, in ticks, that this light object will emit
light before stopping for whatever reason.
|
void |
setMiscText(java.lang.String newText) |
For objects which have false for their isGeneric method, this is used to set any internally
coded strings to change the nature or behavior of the object.
|
void |
setOwner(ItemPossessor newOwner) |
Sets the Room or MOB representing where this item is located.
|
void |
setReadableText(java.lang.String text) |
For things that are readable, this set the readable string
for this thing.
|
void |
setStat(java.lang.String code,
java.lang.String val) |
An alternative means of setting the values of those fields on this object which are modifiable at
run-time by builders.
|
void |
setTicksPerFuelConsume(int tick) |
Sets the number of ticks between each consumption of fuel.
|
java.lang.String |
text() |
For objects which have false for their isGeneric method, this is used to set any internally
coded strings to change the nature or behavior of the object.
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scriptsdefaultsClosed, defaultsLocked, hasADoor, hasALock, isLocked, isOpen, keyName, openDelayTicks, setDoorsNLocks, setKeyName, setOpenDelayTickscopyOf, initializeClass, newInstancecanContain, capacity, containTypes, emptyPlease, getContents, getDeepContents, hasContent, isInside, setCapacity, setContainTypescanSaveDatabaseID, databaseID, setDatabaseIDkeyName, setKeyNamebaseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, valueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisReadable, setReadablecanContain, capacity, containTypes, defaultsClosed, defaultsLocked, emptyPlease, genericName, getContents, getDeepContents, hasADoor, hasALock, hasContent, isInside, isLocked, isOpen, numberOfItems, openDelayTicks, recursiveWeight, setCapacity, setContainTypes, setDoorsNLocks, setOpenDelayTicksabilityImbuesMagic, addBehavior, addEffect, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, affectPhyStats, alreadyWornMsg, amBeingWornProperly, amDestroyed, amWearingAt, baseGoldValue, basePhyStats, behaviors, canSaveDatabaseID, canWear, canWearComplete, cloneFix, compareProperLocations, compareTo, container, copyOf, databaseID, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delEffect, delScript, description, description, destroy, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, getSaveStatIndex, getTickStatus, I, image, initializeClass, isReadable, isSavable, isStat, L, material, maxRange, minRange, miscTextFormat, name, name, Name, newInstance, numBehaviors, numEffects, numScripts, owner, phyStats, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, recoverPhyStats, removeFromOwnerContainer, riding, scripts, secretIdentity, setBasePhyStats, setBaseValue, setContainer, setDatabaseID, setDescription, setDisplayText, setExpirationDate, setImage, setMaterial, setName, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setReadable, setRiding, setSavable, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, tackOns, 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 java.lang.String readableText
protected boolean lit
protected int durationTicks
protected boolean destroyedWhenBurnedOut
protected boolean goesOutInTheRain
protected int[] generatedFuelTypes
protected int ticksPerFuelConsume
protected volatile int fuelTickDown
public java.lang.String ID()
CMObjectID in interface CMObjectID in class GenContainerpublic void setDuration(int duration)
LightsetDuration in interface Lightduration - the duration of the light source, in ticks.Light.getDuration()public int getDuration()
LightgetDuration in interface LightLight.setDuration(int)public boolean isGeneric()
EnvironmentalisGeneric in interface EnvironmentalisGeneric in class GenContainerEnvironmental.text()public java.lang.String text()
Environmentaltext in interface Environmentaltext in class GenContainerpublic java.lang.String readableText()
ReadablereadableText in interface ReadablereadableText in class GenContainerReadable.isReadable(),
Readable.setReadable(boolean),
Readable.setReadableText(String)public void setReadableText(java.lang.String text)
ReadablesetReadableText in interface ReadablesetReadableText in class GenContainertext - the readable textReadable.isReadable(),
Readable.setReadable(boolean),
Readable.readableText()public void setMiscText(java.lang.String newText)
EnvironmentalsetMiscText in interface EnvironmentalsetMiscText in class GenContainernewText - either an open internal text string, or XMLpublic int getTicksPerFuelConsume()
FuelConsumergetTicksPerFuelConsume in interface FuelConsumerFuelConsumer.setTicksPerFuelConsume(int)public void setTicksPerFuelConsume(int tick)
FuelConsumersetTicksPerFuelConsume in interface FuelConsumertick - the number of ticks between each consumption of fuel.FuelConsumer.getTicksPerFuelConsume()public int[] getConsumedFuelTypes()
FuelConsumergetConsumedFuelTypes in interface FuelConsumerFuelConsumer.setConsumedFuelType(int[]),
RawMaterialpublic void setConsumedFuelType(int[] resources)
FuelConsumersetConsumedFuelType in interface FuelConsumerresources - an array of RawMaterial codesFuelConsumer.getConsumedFuelTypes(),
RawMaterialprotected boolean isFuel(Item I)
public int getFuelRemaining()
FuelConsumergetFuelRemaining in interface FuelConsumerFuelConsumer.getTotalFuelCapacity()protected java.util.List<Item> getFuel()
public void setOwner(ItemPossessor newOwner)
ItemsetOwner in interface ItemsetOwner in class StdItemnewOwner - the mob or room where the item is locatedItemCollection.addItem(Item)public boolean consumeFuel(int amount)
FuelConsumerconsumeFuel in interface FuelConsumeramount - the amount of fuel to consumepublic int getTotalFuelCapacity()
FuelConsumergetTotalFuelCapacity in interface FuelConsumerFuelConsumer.getFuelRemaining()public boolean destroyedWhenBurnedOut()
LightdestroyedWhenBurnedOut in interface LightLight.setDestroyedWhenBurntOut(boolean)public void setDestroyedWhenBurntOut(boolean truefalse)
LightsetDestroyedWhenBurntOut in interface Lighttruefalse - true if it is destroyed after use, false otherwiseLight.destroyedWhenBurnedOut()public boolean goesOutInTheRain()
LightgoesOutInTheRain in interface Lightpublic boolean isLit()
LightisLit in interface LightLight.light(boolean)public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListenerokMessage in interface MsgListenerokMessage in class StdContainermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that wants to be executedCMMsg,
CMMsg.source()public void executeMsg(Environmental myHost, CMMsg msg)
MsgListenerexecuteMsg in interface MsgListenerexecuteMsg in class StdContainermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that needs to be executedCMMsgpublic void light(boolean isLit)
Lightlight in interface LightisLit - true if it is lit and emitting lightLight.isLit()public boolean tick(Tickable ticking, int tickID)
Tickabletick in interface Tickabletick in class StdContainerticking - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in TickableTickable,
ServiceEngine,
TickableGrouppublic java.lang.String getStat(java.lang.String code)
ModifiablegetStat in interface ModifiablegetStat in class GenContainercode - the name of the field to read.Modifiable.getStatCodes()public void setStat(java.lang.String code,
java.lang.String val)
ModifiablesetStat in interface ModifiablesetStat in class GenContainercode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public java.lang.String[] getStatCodes()
ModifiablegetStatCodes in interface ModifiablegetStatCodes in class GenContainerModifiable.getStat(String),
Modifiable.setStat(String, String)public boolean sameAs(Environmental E)
EnvironmentalsameAs in interface EnvironmentalsameAs in class GenContainerE - the object to compare this one toModifiable.getStatCodes(),
Modifiable.getStat(String)