com.planet_ink.coffee_mud.Items.interfaces
Interface FuelConsumer

All Superinterfaces:
Affectable, Behavable, java.lang.Cloneable, CloseableLockable, CMObject, java.lang.Comparable<CMObject>, Container, Contingent, DBIdentifiable, Electronics, Environmental, Item, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, Rider, StatsAffecting, Technical, Tickable, Wearable
All Known Implementing Classes:
GenCompGenerator, GenShipEngine, GenShipThruster, StdCompFuelConsumer, StdCompGenerator, StdShipEngine, StdShipThruster

public interface FuelConsumer
extends Electronics, Container

An interface for an Electrical item that also consumes some other sort of fuel other than electrical power, if it consumes any electricity at all. Because they require fuel, these items are typically containers that can only hold the type of fuel they need to operate. Generators are typical of Fuel Consumers.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Technical
Technical.TechCommand, Technical.TechType
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable
Wearable.CODES
 
Field Summary
 
Fields inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable
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
 
Fields inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Container
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_SMOKEABLES, CONTAIN_SSCOMPONENTS, CONTAIN_SWORDS
 
Method Summary
 boolean consumeFuel(int amount)
          Forces this fuel consumer to consumer some amount of its fuel, without any other effect.
 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 getFuelRemaining()
          Returns the amount of fuel remaining in this container.
 int getTicksPerFuelConsume()
          Gets the number of ticks between each consumption of fuel.
 int getTotalFuelCapacity()
          Returns the amount of total fuel this container can hold.
 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 setTicksPerFuelConsume(int tick)
          Sets the number of ticks between each consumption of fuel.
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Electronics
activate, activated, getFinalManufacturer, getManufacturerName, powerCapacity, powerNeeds, powerRemaining, setManufacturerName, setPowerCapacity, setPowerRemaining
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Technical
getTechType, setTechLevel, techLevel
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Item
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Rider
riding, setRiding
 
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.DBIdentifiable
canSaveDatabaseID, databaseID, setDatabaseID
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Readable
isReadable, readableText, setReadable, setReadableText
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Container
canContain, capacity, containTypes, emptyPlease, getContents, getDeepContents, hasContent, isInside, setCapacity, setContainTypes
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CloseableLockable
defaultsClosed, defaultsLocked, hasADoor, hasALock, isLocked, isOpen, keyName, openDelayTicks, setDoorsNLocks, setKeyName, setOpenDelayTicks
 

Method Detail

getConsumedFuelTypes

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.

Returns:
an array of RawMaterial codes
See Also:
setConsumedFuelType(int[]), RawMaterial

setConsumedFuelType

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.

Parameters:
resources - an array of RawMaterial codes
See Also:
getConsumedFuelTypes(), RawMaterial

getTicksPerFuelConsume

int getTicksPerFuelConsume()
Gets the number of ticks between each consumption of fuel. This determines the rate of fuel consumption, assuming the amount of fuel itself is fixed, or determined internally. This is the only way variation in consumption is controlled from outside.

Returns:
the number of ticks between each consumption of fuel.
See Also:
setTicksPerFuelConsume(int)

setTicksPerFuelConsume

void setTicksPerFuelConsume(int tick)
Sets the number of ticks between each consumption of fuel. This determines the rate of fuel consumption, assuming the amount of fuel itself is fixed, or determined internally. This is the only way variation in consumption is controlled from outside.

Parameters:
tick - the number of ticks between each consumption of fuel.
See Also:
getTicksPerFuelConsume()

getFuelRemaining

int getFuelRemaining()
Returns the amount of fuel remaining in this container.

Returns:
the amount of fuel remaining in this container.
See Also:
getTotalFuelCapacity()

consumeFuel

boolean consumeFuel(int amount)
Forces this fuel consumer to consumer some amount of its fuel, without any other effect. If there was not enough fuel to be consumed, it might result in de-activation.

Parameters:
amount - the amount of fuel to consume
Returns:
true if there was NOT enough fuel, false if fuel was consumed OK.

getTotalFuelCapacity

int getTotalFuelCapacity()
Returns the amount of total fuel this container can hold.

Returns:
the amount of total fuel this container can hold.
See Also:
getFuelRemaining()