com.planet_ink.coffee_mud.Items.BasicTech
Class StdElecItem

java.lang.Object
  extended by com.planet_ink.coffee_mud.Items.Basic.StdItem
      extended by com.planet_ink.coffee_mud.Items.BasicTech.StdElecItem
All Implemented Interfaces:
Affectable, Behavable, CMObject, Contingent, DBIdentifiable, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, Rider, StatsAffecting, Tickable, Electronics, Item, Technical, Wearable, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
GenElecItem, GenTickerShield, StdElecCompItem, StdElecWeapon, StdPersonalShield

public class StdElecItem
extends StdItem
implements Electronics


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
protected  boolean activated
           
protected  Manufacturer cachedManufact
           
protected  java.lang.String manufacturer
           
protected  long power
           
protected  long powerCapacity
           
 
Fields inherited from class com.planet_ink.coffee_mud.Items.Basic.StdItem
affectPhyStats, affects, baseGoldValue, basePhyStats, behaviors, cachedImageName, CODES, databaseID, description, destroyed, displayText, dispossessionTime, material, me, miscText, myContainer, myUses, myWornCode, name, owner, phyStats, properWornBitmap, rawImageName, riding, scripts, secretIdentity, tickCtr, tickStatus, wornLogicalAnd, xtraValues
 
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
 
Constructor Summary
StdElecItem()
           
 
Method Summary
 void activate(boolean truefalse)
          Sets whether this electrical item is "turned on".
 boolean activated()
          Gets whether this electrical item is "turned on".
protected  double getComputedEfficiency()
           
 Manufacturer getFinalManufacturer()
          Returns the Manufacturer object of the manufacturer that made this electrical item.
 java.lang.String getManufacturerName()
          Gets the Manufacturer ID/Name that made this electrical item.
 Technical.TechType getTechType()
          Returns the tech type enum for this technical object, which describes more about its functionality, and is in fact a kind of class proxy.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 long powerCapacity()
          Gets the maximum amount of capacitance supported by this electrical item.
 int powerNeeds()
          Returns the immediate power needs of this electrical item.
 long powerRemaining()
          Gets the amount of power capacitance remaining in this electrical item.
 void setManufacturerName(java.lang.String name)
          Sets the Manufacturer ID/Name that made this electrical item.
 void setPowerCapacity(long capacity)
          Sets the maximum amount of capacitance supported by this electrical item.
 void setPowerRemaining(long remaining)
          Sets the amount of power capacitance remaining in this electrical item.
 void setTechLevel(int lvl)
          One of the most important methods in the tech game, this denotes the level of technology of the specific instance of this item.
 int techLevel()
          One of the most important methods in the tech game, this denotes the level of technology of the specific instance of this item.
 
Methods inherited from class com.planet_ink.coffee_mud.Items.Basic.StdItem
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, executeMsg, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, getCodeNum, getSaveStatIndex, getStat, getStatCodes, getTickStatus, I, image, initializeClass, isGeneric, isReadable, isSavable, isStat, L, material, maxRange, minRange, miscTextFormat, name, Name, name, newInstance, 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, tackOns, text, tick, ultimateContainer, unWear, usesRemaining, value, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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, 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
 

Field Detail

powerCapacity

protected long powerCapacity

power

protected long power

activated

protected boolean activated

manufacturer

protected java.lang.String manufacturer

cachedManufact

protected Manufacturer cachedManufact
Constructor Detail

StdElecItem

public StdElecItem()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdItem
Returns:
the name of this class

powerCapacity

public long powerCapacity()
Description copied from interface: Electronics
Gets the maximum amount of capacitance supported by this electrical item. This is the maximum power the item can store up and utilize before it shuts off. Only the item itself knows how much it wants to use at any particular time.

Specified by:
powerCapacity in interface Electronics
Returns:
the maximum amount of stored power capacity
See Also:
Electronics.setPowerCapacity(long)

setPowerCapacity

public void setPowerCapacity(long capacity)
Description copied from interface: Electronics
Sets the maximum amount of capacitance supported by this electrical item. This is the maximum power the item can store up and utilize before it shuts off. Only the item itself knows how much it wants to use at any particular time.

Specified by:
setPowerCapacity in interface Electronics
Parameters:
capacity - the maximum amount of stored power capacity
See Also:
Electronics.powerCapacity()

powerRemaining

public long powerRemaining()
Description copied from interface: Electronics
Gets the amount of power capacitance remaining in this electrical item. The item will continue to use this power until it doesn't have enough to operate, and then turn off.

Specified by:
powerRemaining in interface Electronics
Returns:
the amount of power capacitance remaining
See Also:
Electronics.setPowerRemaining(long)

setPowerRemaining

public void setPowerRemaining(long remaining)
Description copied from interface: Electronics
Sets the amount of power capacitance remaining in this electrical item. The item will continue to use this power until it doesn't have enough to operate, and then turn off.

Specified by:
setPowerRemaining in interface Electronics
Parameters:
remaining - the amount of power capacitance remaining
See Also:
Electronics.powerRemaining()

activated

public boolean activated()
Description copied from interface: Electronics
Gets whether this electrical item is "turned on". An activated item can do the stuff it is supposed to, but off it cannot.

Specified by:
activated in interface Electronics
Returns:
whether this electrical item is "turned on"
See Also:
Electronics.activate(boolean)

activate

public void activate(boolean truefalse)
Description copied from interface: Electronics
Sets whether this electrical item is "turned on". An activated item can do the stuff it is supposed to, but off it cannot.

Specified by:
activate in interface Electronics
Parameters:
truefalse - true to activate, false to deactivate
See Also:
Electronics.activated()

powerNeeds

public int powerNeeds()
Description copied from interface: Electronics
Returns the immediate power needs of this electrical item. Typically powerCapacity - powerAvailable

Specified by:
powerNeeds in interface Electronics
Returns:
the amount of power this item can still absorb
See Also:
Electronics.powerRemaining(), Electronics.powerCapacity()

techLevel

public int techLevel()
Description copied from interface: Technical
One of the most important methods in the tech game, this denotes the level of technology of the specific instance of this item. Technology progresses ever onward, and the users equipment can become outdated, and be outperformed by items with higher tech level. For that reason, they must constantly be looking to keeping their gear updates.

Specified by:
techLevel in interface Technical
Returns:
the absolute tech level of this item
See Also:
TechLibrary.getGlobalTechLevel(), Technical.setTechLevel(int)

setTechLevel

public void setTechLevel(int lvl)
Description copied from interface: Technical
One of the most important methods in the tech game, this denotes the level of technology of the specific instance of this item. Technology progresses ever onward, and the users equipment can become outdated, and be outperformed by items with higher tech level. For that reason, they must constantly be looking to keeping their gear updates.

Specified by:
setTechLevel in interface Technical
Parameters:
lvl - the absolute tech level of this item
See Also:
TechLibrary.getGlobalTechLevel(), Technical.techLevel()

getManufacturerName

public java.lang.String getManufacturerName()
Description copied from interface: Electronics
Gets the Manufacturer ID/Name that made this electrical item. This is important because benefits and detriments can come along with the manufacturer.

Specified by:
getManufacturerName in interface Electronics
Returns:
the Manufacturer ID/Name that made this
See Also:
Electronics.setManufacturerName(String), Manufacturer

getTechType

public Technical.TechType getTechType()
Description copied from interface: Technical
Returns the tech type enum for this technical object, which describes more about its functionality, and is in fact a kind of class proxy. I hope this doesn't bog things down too much.

Specified by:
getTechType in interface Technical
Returns:
the tech type eum
See Also:
Technical.TechType

setManufacturerName

public void setManufacturerName(java.lang.String name)
Description copied from interface: Electronics
Sets the Manufacturer ID/Name that made this electrical item. This is important because benefits and detriments can come along with the manufacturer.

Specified by:
setManufacturerName in interface Electronics
Parameters:
name - the Manufacturer ID/Name that made this
See Also:
Electronics.getManufacturerName(), Electronics.getFinalManufacturer(), Manufacturer

getFinalManufacturer

public Manufacturer getFinalManufacturer()
Description copied from interface: Electronics
Returns the Manufacturer object of the manufacturer that made this electrical item. This is important because benefits and detriments can come along with the manufacturer.

Specified by:
getFinalManufacturer in interface Electronics
Returns:
the Manufacturer that made this electrical item
See Also:
Electronics.getManufacturerName(), Electronics.setManufacturerName(String), Manufacturer

getComputedEfficiency

protected double getComputedEfficiency()