com.planet_ink.coffee_mud.Libraries
Class CMAbleParms

java.lang.Object
  extended by com.planet_ink.coffee_mud.Libraries.StdLibrary
      extended by com.planet_ink.coffee_mud.Libraries.CMAbleParms
All Implemented Interfaces:
CMObject, AbilityParameters, CMLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class CMAbleParms
extends StdLibrary
implements AbilityParameters


Nested Class Summary
protected  class CMAbleParms.AbilityParmEditorImpl
           
protected  class CMAbleParms.AbilityRecipeDataImpl
           
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.AbilityParameters
AbilityParameters.AbilityParmEditor, AbilityParameters.AbilityRecipeData
 
Field Summary
protected  java.util.Hashtable DEFAULT_EDITORS
           
 
Fields inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.AbilityParameters
PARMTYPE_CHOICES, PARMTYPE_MULTICHOICES, PARMTYPE_NUMBER, PARMTYPE_ONEWORD, PARMTYPE_SPECIAL, PARMTYPE_STRING, PARMTYPE_STRINGORNULL
 
Constructor Summary
CMAbleParms()
           
 
Method Summary
protected  void calculateRecipeCols(int[] lengths, java.lang.String[] headers, java.util.Vector rowsV)
           
protected  java.lang.StringBuffer cleanDataRowEOLs(java.lang.StringBuffer str)
           
protected  boolean fixDataColumn(DVector dataRow, int rowShow)
           
protected  void fixDataColumns(java.util.Vector rowsV)
           
protected static int getClassFieldIndex(DVector dataRow)
           
 java.util.Vector getCodedSpells(java.lang.String spells)
           
 java.util.Hashtable getEditors()
           
 java.lang.StringBuffer getRecipeList(ItemCraftor iA)
           
protected  Item getSampleItem(DVector dataRow)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 void modifyRecipesList(MOB mob, java.lang.String recipeFilename, java.lang.String recipeFormat)
           
protected  java.util.Vector parseDataRows(java.lang.StringBuffer recipeData, java.util.Vector columnsV, int numberOfDataColumns)
           
protected  java.lang.String parseLayers(short[] layerAtt, short[] clothingLayers, java.lang.String misctype)
           
 AbilityParameters.AbilityRecipeData parseRecipe(java.lang.String recipeFilename, java.lang.String recipeFormat)
           
 java.util.Vector parseRecipeFormatColumns(java.lang.String recipeFormat)
           
 void parseWearLocation(short[] layerAtt, short[] layers, long[] wornLoc, boolean[] logicalAnd, double[] hardBonus, java.lang.String wearLocation)
           
 void resaveRecipeFile(MOB mob, java.lang.String recipeFilename, java.util.Vector rowsV, java.util.Vector columnsV, boolean saveToVFS)
           
protected  java.lang.String stripData(java.lang.StringBuffer str, java.lang.String div)
           
 void testRecipeParsing(java.lang.String recipeFilename, java.lang.String recipeFormat, boolean save)
           
 
Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary
activate, compareTo, copyOf, getSupportThread, initializeClass, newInstance, shutdown
 
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.Libraries.interfaces.CMLibrary
activate, getSupportThread, shutdown
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

DEFAULT_EDITORS

protected java.util.Hashtable DEFAULT_EDITORS
Constructor Detail

CMAbleParms

public CMAbleParms()
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, MiscTech. 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

getCodedSpells

public java.util.Vector getCodedSpells(java.lang.String spells)
Specified by:
getCodedSpells in interface AbilityParameters

parseLayers

protected java.lang.String parseLayers(short[] layerAtt,
                                       short[] clothingLayers,
                                       java.lang.String misctype)

parseWearLocation

public void parseWearLocation(short[] layerAtt,
                              short[] layers,
                              long[] wornLoc,
                              boolean[] logicalAnd,
                              double[] hardBonus,
                              java.lang.String wearLocation)
Specified by:
parseWearLocation in interface AbilityParameters

parseRecipeFormatColumns

public java.util.Vector parseRecipeFormatColumns(java.lang.String recipeFormat)

getClassFieldIndex

protected static int getClassFieldIndex(DVector dataRow)

getSampleItem

protected Item getSampleItem(DVector dataRow)

stripData

protected java.lang.String stripData(java.lang.StringBuffer str,
                                     java.lang.String div)

parseDataRows

protected java.util.Vector parseDataRows(java.lang.StringBuffer recipeData,
                                         java.util.Vector columnsV,
                                         int numberOfDataColumns)
                                  throws CMException
Throws:
CMException

fixDataColumn

protected boolean fixDataColumn(DVector dataRow,
                                int rowShow)
                         throws CMException
Throws:
CMException

fixDataColumns

protected void fixDataColumns(java.util.Vector rowsV)
                       throws CMException
Throws:
CMException

cleanDataRowEOLs

protected java.lang.StringBuffer cleanDataRowEOLs(java.lang.StringBuffer str)

testRecipeParsing

public void testRecipeParsing(java.lang.String recipeFilename,
                              java.lang.String recipeFormat,
                              boolean save)
Specified by:
testRecipeParsing in interface AbilityParameters

calculateRecipeCols

protected void calculateRecipeCols(int[] lengths,
                                   java.lang.String[] headers,
                                   java.util.Vector rowsV)

parseRecipe

public AbilityParameters.AbilityRecipeData parseRecipe(java.lang.String recipeFilename,
                                                       java.lang.String recipeFormat)
Specified by:
parseRecipe in interface AbilityParameters

getRecipeList

public java.lang.StringBuffer getRecipeList(ItemCraftor iA)
Specified by:
getRecipeList in interface AbilityParameters

modifyRecipesList

public void modifyRecipesList(MOB mob,
                              java.lang.String recipeFilename,
                              java.lang.String recipeFormat)
                       throws java.io.IOException
Specified by:
modifyRecipesList in interface AbilityParameters
Throws:
java.io.IOException

resaveRecipeFile

public void resaveRecipeFile(MOB mob,
                             java.lang.String recipeFilename,
                             java.util.Vector rowsV,
                             java.util.Vector columnsV,
                             boolean saveToVFS)
Specified by:
resaveRecipeFile in interface AbilityParameters

getEditors

public java.util.Hashtable getEditors()
Specified by:
getEditors in interface AbilityParameters