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 |
idConverter
CONTAIN_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_SWORDS
capacity, 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, xtraValues
DEFAULT_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, scripts
defaultsClosed, defaultsLocked, hasADoor, hasALock, isLocked, isOpen, keyName, openDelayTicks, setDoorsNLocks, setKeyName, setOpenDelayTicks
copyOf, initializeClass, newInstance
canContain, capacity, containTypes, emptyPlease, getContents, getDeepContents, hasContent, isInside, setCapacity, setContainTypes
canSaveDatabaseID, databaseID, setDatabaseID
keyName, setKeyName
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isReadable, setReadable
canContain, capacity, containTypes, defaultsClosed, defaultsLocked, emptyPlease, genericName, getContents, getDeepContents, hasADoor, hasALock, hasContent, isInside, isLocked, isOpen, numberOfItems, openDelayTicks, recursiveWeight, setCapacity, setContainTypes, setDoorsNLocks, setOpenDelayTicks
abilityImbuesMagic, 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, whereCantWear
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
protected 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()
CMObject
ID
in interface CMObject
ID
in class GenContainer
public void setDuration(int duration)
Light
setDuration
in interface Light
duration
- the duration of the light source, in ticks.Light.getDuration()
public int getDuration()
Light
getDuration
in interface Light
Light.setDuration(int)
public boolean isGeneric()
Environmental
isGeneric
in interface Environmental
isGeneric
in class GenContainer
Environmental.text()
public java.lang.String text()
Environmental
text
in interface Environmental
text
in class GenContainer
public java.lang.String readableText()
Readable
readableText
in interface Readable
readableText
in class GenContainer
Readable.isReadable()
,
Readable.setReadable(boolean)
,
Readable.setReadableText(String)
public void setReadableText(java.lang.String text)
Readable
setReadableText
in interface Readable
setReadableText
in class GenContainer
text
- the readable textReadable.isReadable()
,
Readable.setReadable(boolean)
,
Readable.readableText()
public void setMiscText(java.lang.String newText)
Environmental
setMiscText
in interface Environmental
setMiscText
in class GenContainer
newText
- either an open internal text string, or XMLpublic int getTicksPerFuelConsume()
FuelConsumer
getTicksPerFuelConsume
in interface FuelConsumer
FuelConsumer.setTicksPerFuelConsume(int)
public void setTicksPerFuelConsume(int tick)
FuelConsumer
setTicksPerFuelConsume
in interface FuelConsumer
tick
- the number of ticks between each consumption of fuel.FuelConsumer.getTicksPerFuelConsume()
public int[] getConsumedFuelTypes()
FuelConsumer
getConsumedFuelTypes
in interface FuelConsumer
FuelConsumer.setConsumedFuelType(int[])
,
RawMaterial
public void setConsumedFuelType(int[] resources)
FuelConsumer
setConsumedFuelType
in interface FuelConsumer
resources
- an array of RawMaterial codesFuelConsumer.getConsumedFuelTypes()
,
RawMaterial
protected boolean isFuel(Item I)
public int getFuelRemaining()
FuelConsumer
getFuelRemaining
in interface FuelConsumer
FuelConsumer.getTotalFuelCapacity()
protected java.util.List<Item> getFuel()
public void setOwner(ItemPossessor newOwner)
Item
setOwner
in interface Item
setOwner
in class StdItem
newOwner
- the mob or room where the item is locatedItemCollection.addItem(Item)
public boolean consumeFuel(int amount)
FuelConsumer
consumeFuel
in interface FuelConsumer
amount
- the amount of fuel to consumepublic int getTotalFuelCapacity()
FuelConsumer
getTotalFuelCapacity
in interface FuelConsumer
FuelConsumer.getFuelRemaining()
public boolean destroyedWhenBurnedOut()
Light
destroyedWhenBurnedOut
in interface Light
Light.setDestroyedWhenBurntOut(boolean)
public void setDestroyedWhenBurntOut(boolean truefalse)
Light
setDestroyedWhenBurntOut
in interface Light
truefalse
- true if it is destroyed after use, false otherwiseLight.destroyedWhenBurnedOut()
public boolean goesOutInTheRain()
Light
goesOutInTheRain
in interface Light
public boolean isLit()
Light
isLit
in interface Light
Light.light(boolean)
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
okMessage
in class StdContainer
myHost
- 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)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class StdContainer
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
public void light(boolean isLit)
Light
light
in interface Light
isLit
- true if it is lit and emitting lightLight.isLit()
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class StdContainer
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
getStat
in class GenContainer
code
- the name of the field to read.Modifiable.getStatCodes()
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
setStat
in class GenContainer
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
getStatCodes
in class GenContainer
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public boolean sameAs(Environmental E)
Environmental
sameAs
in interface Environmental
sameAs
in class GenContainer
E
- the object to compare this one toModifiable.getStatCodes()
,
Modifiable.getStat(String)