com.planet_ink.coffee_mud.Libraries
Class RawCMaterial
java.lang.Object
com.planet_ink.coffee_mud.Libraries.StdLibrary
com.planet_ink.coffee_mud.Libraries.RawCMaterial
- All Implemented Interfaces:
- CMObject, Tickable, CMLibrary, MaterialLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>
public class RawCMaterial
- extends StdLibrary
- implements MaterialLibrary
| Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET |
|
Method Summary |
void |
addEffectsToResource(Item I)
|
void |
adjustResourceName(Item I)
|
protected MaterialLibrary.DeadResourceRecord |
destroyResources(java.util.List<Item> V,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
|
MaterialLibrary.DeadResourceRecord |
destroyResources(MOB M,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
|
MaterialLibrary.DeadResourceRecord |
destroyResources(Room R,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
|
int |
destroyResourcesAmt(java.util.List<Item> V,
int howMuch,
int finalMaterial,
Container C)
|
int |
destroyResourcesAmt(MOB E,
int howMuch,
int finalMaterial,
Container C)
|
int |
destroyResourcesAmt(Room E,
int howMuch,
int finalMaterial,
Container C)
|
int |
destroyResourcesValue(java.util.List<Item> V,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
|
int |
destroyResourcesValue(MOB E,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never)
|
int |
destroyResourcesValue(Room E,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never)
|
protected java.util.List<Environmental> |
disBundle(Item I,
int number,
int bundleSize,
Container C)
|
protected RawMaterial |
fetchFoundOtherEncoded(java.util.List<Item> V,
java.lang.String otherRequired)
|
RawMaterial |
fetchFoundOtherEncoded(MOB E,
java.lang.String otherRequired)
|
RawMaterial |
fetchFoundOtherEncoded(Room E,
java.lang.String otherRequired)
|
protected RawMaterial |
findFirstResource(java.util.List<Item> V,
int resource,
Container C,
java.lang.String subType)
|
RawMaterial |
findFirstResource(java.util.List<Item> V,
java.lang.String other)
|
RawMaterial |
findFirstResource(MOB E,
int resource)
|
RawMaterial |
findFirstResource(MOB E,
java.lang.String other)
|
RawMaterial |
findFirstResource(Room E,
int resource)
|
RawMaterial |
findFirstResource(Room E,
java.lang.String other)
|
protected RawMaterial |
findMostOfMaterial(java.util.List<Item> V,
int material,
java.lang.String subType)
|
protected RawMaterial |
findMostOfMaterial(java.util.List<Item> V,
java.lang.String other)
|
RawMaterial |
findMostOfMaterial(MOB E,
int material)
|
RawMaterial |
findMostOfMaterial(MOB E,
java.lang.String other)
|
RawMaterial |
findMostOfMaterial(Room E,
int material)
|
RawMaterial |
findMostOfMaterial(Room E,
java.lang.String other)
|
protected int |
findNumberOfResource(java.util.List<Item> V,
RawMaterial resource)
|
int |
findNumberOfResource(MOB E,
RawMaterial resource)
|
int |
findNumberOfResource(Room E,
RawMaterial resource)
|
java.lang.String |
genericType(Item I)
|
protected java.util.List<Item> |
getAllItems(MOB M)
|
protected java.util.List<Item> |
getAllItems(Room R)
|
int |
getBurnDuration(Environmental E)
Returns the number of ticks that the given item, whatever
will burn, or 0 if it won't burn. |
int |
getMaterialCode(java.lang.String s,
boolean exact)
|
java.lang.String |
getMaterialDesc(int MASK)
|
int |
getMaterialRelativeInt(java.lang.String s)
|
int |
getRandomResourceOfMaterial(int material)
|
int |
getResourceCode(java.lang.String s,
boolean exact)
|
java.lang.String |
getResourceDesc(int MASK)
|
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of
this object. |
Item |
makeItemResource(int type)
|
Item |
makeItemResource(int type,
java.lang.String subType)
|
PhysicalAgent |
makeResource(int myResource,
java.lang.String localeCode,
boolean noAnimals,
java.lang.String fullName,
java.lang.String subType)
|
java.lang.String |
makeResourceDescriptiveName(int rscCode,
java.lang.String subType,
boolean plural)
|
java.lang.String |
makeResourceSimpleName(int rscCode,
java.lang.String subType)
|
boolean |
quickDestroy(Item I)
|
boolean |
rebundle(Item item)
|
Environmental |
splitBundle(Item I,
int size,
Container C)
|
Environmental |
unbundle(Item I,
int number,
Container C)
|
| Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
compareTo |
RawCMaterial
public RawCMaterial()
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 StdLibrary
- Returns:
- the name of this class
getRandomResourceOfMaterial
public int getRandomResourceOfMaterial(int material)
- Specified by:
getRandomResourceOfMaterial in interface MaterialLibrary
quickDestroy
public boolean quickDestroy(Item I)
- Specified by:
quickDestroy in interface MaterialLibrary
rebundle
public boolean rebundle(Item item)
- Specified by:
rebundle in interface MaterialLibrary
splitBundle
public Environmental splitBundle(Item I,
int size,
Container C)
- Specified by:
splitBundle in interface MaterialLibrary
unbundle
public Environmental unbundle(Item I,
int number,
Container C)
- Specified by:
unbundle in interface MaterialLibrary
disBundle
protected java.util.List<Environmental> disBundle(Item I,
int number,
int bundleSize,
Container C)
getMaterialDesc
public java.lang.String getMaterialDesc(int MASK)
- Specified by:
getMaterialDesc in interface MaterialLibrary
getResourceDesc
public java.lang.String getResourceDesc(int MASK)
- Specified by:
getResourceDesc in interface MaterialLibrary
getMaterialRelativeInt
public int getMaterialRelativeInt(java.lang.String s)
- Specified by:
getMaterialRelativeInt in interface MaterialLibrary
getMaterialCode
public int getMaterialCode(java.lang.String s,
boolean exact)
- Specified by:
getMaterialCode in interface MaterialLibrary
getResourceCode
public int getResourceCode(java.lang.String s,
boolean exact)
- Specified by:
getResourceCode in interface MaterialLibrary
addEffectsToResource
public void addEffectsToResource(Item I)
- Specified by:
addEffectsToResource in interface MaterialLibrary
makeResource
public PhysicalAgent makeResource(int myResource,
java.lang.String localeCode,
boolean noAnimals,
java.lang.String fullName,
java.lang.String subType)
- Specified by:
makeResource in interface MaterialLibrary
genericType
public java.lang.String genericType(Item I)
- Specified by:
genericType in interface MaterialLibrary
makeResourceDescriptiveName
public java.lang.String makeResourceDescriptiveName(int rscCode,
java.lang.String subType,
boolean plural)
- Specified by:
makeResourceDescriptiveName in interface MaterialLibrary
makeResourceSimpleName
public java.lang.String makeResourceSimpleName(int rscCode,
java.lang.String subType)
- Specified by:
makeResourceSimpleName in interface MaterialLibrary
adjustResourceName
public void adjustResourceName(Item I)
- Specified by:
adjustResourceName in interface MaterialLibrary
makeItemResource
public Item makeItemResource(int type)
- Specified by:
makeItemResource in interface MaterialLibrary
makeItemResource
public Item makeItemResource(int type,
java.lang.String subType)
- Specified by:
makeItemResource in interface MaterialLibrary
destroyResourcesAmt
public int destroyResourcesAmt(MOB E,
int howMuch,
int finalMaterial,
Container C)
- Specified by:
destroyResourcesAmt in interface MaterialLibrary
destroyResourcesAmt
public int destroyResourcesAmt(Room E,
int howMuch,
int finalMaterial,
Container C)
- Specified by:
destroyResourcesAmt in interface MaterialLibrary
destroyResourcesAmt
public int destroyResourcesAmt(java.util.List<Item> V,
int howMuch,
int finalMaterial,
Container C)
- Specified by:
destroyResourcesAmt in interface MaterialLibrary
destroyResourcesValue
public int destroyResourcesValue(Room E,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never)
- Specified by:
destroyResourcesValue in interface MaterialLibrary
destroyResourcesValue
public int destroyResourcesValue(MOB E,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never)
- Specified by:
destroyResourcesValue in interface MaterialLibrary
destroyResourcesValue
public int destroyResourcesValue(java.util.List<Item> V,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
- Specified by:
destroyResourcesValue in interface MaterialLibrary
destroyResources
public MaterialLibrary.DeadResourceRecord destroyResources(Room R,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
- Specified by:
destroyResources in interface MaterialLibrary
destroyResources
public MaterialLibrary.DeadResourceRecord destroyResources(MOB M,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
- Specified by:
destroyResources in interface MaterialLibrary
destroyResources
protected MaterialLibrary.DeadResourceRecord destroyResources(java.util.List<Item> V,
int howMuch,
int finalMaterial,
int otherMaterial,
Item never,
Container C)
findFirstResource
public RawMaterial findFirstResource(Room E,
java.lang.String other)
- Specified by:
findFirstResource in interface MaterialLibrary
findFirstResource
public RawMaterial findFirstResource(MOB E,
java.lang.String other)
- Specified by:
findFirstResource in interface MaterialLibrary
findFirstResource
public RawMaterial findFirstResource(java.util.List<Item> V,
java.lang.String other)
findFirstResource
public RawMaterial findFirstResource(Room E,
int resource)
- Specified by:
findFirstResource in interface MaterialLibrary
findFirstResource
public RawMaterial findFirstResource(MOB E,
int resource)
- Specified by:
findFirstResource in interface MaterialLibrary
findFirstResource
protected RawMaterial findFirstResource(java.util.List<Item> V,
int resource,
Container C,
java.lang.String subType)
findMostOfMaterial
public RawMaterial findMostOfMaterial(Room E,
java.lang.String other)
- Specified by:
findMostOfMaterial in interface MaterialLibrary
findMostOfMaterial
public RawMaterial findMostOfMaterial(MOB E,
java.lang.String other)
- Specified by:
findMostOfMaterial in interface MaterialLibrary
findMostOfMaterial
protected RawMaterial findMostOfMaterial(java.util.List<Item> V,
java.lang.String other)
findNumberOfResource
public int findNumberOfResource(Room E,
RawMaterial resource)
- Specified by:
findNumberOfResource in interface MaterialLibrary
findNumberOfResource
public int findNumberOfResource(MOB E,
RawMaterial resource)
- Specified by:
findNumberOfResource in interface MaterialLibrary
findNumberOfResource
protected int findNumberOfResource(java.util.List<Item> V,
RawMaterial resource)
findMostOfMaterial
public RawMaterial findMostOfMaterial(Room E,
int material)
- Specified by:
findMostOfMaterial in interface MaterialLibrary
findMostOfMaterial
public RawMaterial findMostOfMaterial(MOB E,
int material)
- Specified by:
findMostOfMaterial in interface MaterialLibrary
findMostOfMaterial
protected RawMaterial findMostOfMaterial(java.util.List<Item> V,
int material,
java.lang.String subType)
getAllItems
protected java.util.List<Item> getAllItems(Room R)
getAllItems
protected java.util.List<Item> getAllItems(MOB M)
fetchFoundOtherEncoded
public RawMaterial fetchFoundOtherEncoded(Room E,
java.lang.String otherRequired)
- Specified by:
fetchFoundOtherEncoded in interface MaterialLibrary
fetchFoundOtherEncoded
public RawMaterial fetchFoundOtherEncoded(MOB E,
java.lang.String otherRequired)
- Specified by:
fetchFoundOtherEncoded in interface MaterialLibrary
fetchFoundOtherEncoded
protected RawMaterial fetchFoundOtherEncoded(java.util.List<Item> V,
java.lang.String otherRequired)
getBurnDuration
public int getBurnDuration(Environmental E)
- Description copied from interface:
MaterialLibrary
- Returns the number of ticks that the given item, whatever
will burn, or 0 if it won't burn.
- Specified by:
getBurnDuration in interface MaterialLibrary
- Parameters:
E - the item to check
- Returns:
- the number of ticks to burn, or 0