CMObject, Tickable, AbilityParameters, CMLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>public class CMAbleParms extends StdLibrary implements AbilityParameters
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
CMAbleParms.AbilityParmEditorImpl |
|
protected class |
CMAbleParms.AbilityRecipeDataImpl |
AbilityParameters.AbilityParmEditor, AbilityParameters.AbilityRecipeData, AbilityParameters.ParmType| Modifier and Type | Field | Description |
|---|---|---|
protected static java.lang.String[] |
ADJUSTER_TOKENS |
|
protected static int[] |
ALL_BUCKET_MATERIAL_CHOICES |
|
protected static int[] |
ALLOWED_BUCKET_ACODES |
|
protected static int[] |
ALLOWED_BUCKET_QUALITIES |
|
protected java.util.Map<java.lang.String,AbilityParameters.AbilityParmEditor> |
DEFAULT_EDITORS |
|
protected static java.lang.String[] |
RESISTER_IMMUNER_TOKENS |
idConverterisDebugging, name, serviceClient, tickStatusSTATUS_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_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, 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_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET| Constructor | Description |
|---|---|
CMAbleParms() |
| Modifier and Type | Method | Description |
|---|---|---|
protected static void |
addExtraAbilityMaterial(java.util.Map<java.lang.Integer,int[]> extraMatsM,
Item I,
Ability A) |
|
protected static void |
addExtraMaterial(java.util.Map<java.lang.Integer,int[]> extraMatsM,
Item I,
java.lang.Object A,
double weight) |
|
protected void |
calculateRecipeCols(int[] lengths,
java.lang.String[] headers,
java.util.Vector<DVector> rowsV) |
|
protected java.lang.StringBuffer |
cleanDataRowEOLs(java.lang.StringBuffer str) |
|
Ability |
convertAbilityToGeneric(Ability A) |
Attempts to convert a coded Ability into a generic one.
|
static java.util.Map<java.lang.Integer,int[]> |
extraMaterial(Item I) |
|
protected boolean |
fixDataColumn(DVector dataRow,
int rowShow) |
|
protected boolean |
fixDataColumn(DVector dataRow,
int rowShow,
java.lang.Object classModelI) |
|
protected void |
fixDataColumns(java.util.Vector<DVector> rowsV) |
|
protected static int |
getAppropriateResourceBucket(Item I,
java.lang.Object A) |
|
protected static Pair<java.lang.String[],java.lang.String[]> |
getBuildingCodesNFlags() |
|
protected static int |
getClassFieldIndex(DVector dataRow) |
|
java.util.Map<java.lang.String,AbilityParameters.AbilityParmEditor> |
getEditors() |
Map of all the Ability Parameter editor objects, keyed by their parameter
column ID.
|
java.lang.String |
getGenericClassID(Ability A) |
Return the generic class type that most closely matches the
given ability.
|
java.lang.StringBuffer |
getRecipeList(RecipeDriven iA) |
Given an CraftorAbility object (usually a common skill), this method will load the raw
recipe file and return it as a stringbuffer.
|
protected java.lang.Object |
getSampleObject(DVector dataRow) |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
java.lang.String |
makeRecipeFromItem(ItemCraftor C,
Item I) |
Given an ItemCraftor object (usually a common skill), and an item which the ItemCraftor
might have crafted, this method will construct a single Recipe text line coded for use
by a Recipe object.
|
void |
modifyRecipesList(MOB mob,
java.lang.String recipeFilename,
java.lang.String recipeFormat) |
Main method for altering a particular recipe list from any of the crafting common
skills, from the command line, for the given mob.
|
protected java.util.Vector<DVector> |
parseDataRows(java.lang.StringBuffer recipeData,
java.util.Vector<? extends java.lang.Object> 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) |
Mian parser for the crafting common skill recipe parsers.
|
java.util.Vector<java.lang.Object> |
parseRecipeFormatColumns(java.lang.String recipeFormat) |
|
void |
parseWearLocation(short[] layerAtt,
short[] layers,
long[] wornLoc,
boolean[] logicalAnd,
double[] hardBonus,
java.lang.String wearLocation) |
Parses a coded wear location, for armor-type items that have particular
wear locations, and fills in the given arrays with the information
contained therein.
|
void |
resaveRecipeFile(MOB mob,
java.lang.String recipeFilename,
java.util.List<DVector> rowsV,
java.util.List<? extends java.lang.Object> columnsV,
boolean saveToVFS) |
Resaves the given recipe file given the editor and data information, already parsed for easy
manipulation.
|
protected java.lang.String |
stripData(java.lang.StringBuffer str,
java.lang.String div) |
|
void |
testRecipeParsing(java.lang.StringBuffer recipesString,
java.lang.String recipeFormat) |
Test method for the crafting common skill recipe parsers.
|
void |
testRecipeParsing(java.lang.StringBuffer str,
java.lang.String recipeFormat,
java.lang.String saveRecipeFilename) |
|
void |
testRecipeParsing(java.lang.String recipeFilename,
java.lang.String recipeFormat,
boolean save) |
Test method for the crafting common skill recipe parsers.
|
activate, getServiceClient, L, propertiesLoaded, shutdowncopyOf, initializeClass, name, newInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tickprotected java.util.Map<java.lang.String,AbilityParameters.AbilityParmEditor> DEFAULT_EDITORS
protected static final int[] ALL_BUCKET_MATERIAL_CHOICES
protected static final int[] ALLOWED_BUCKET_ACODES
protected static final int[] ALLOWED_BUCKET_QUALITIES
protected static final java.lang.String[] ADJUSTER_TOKENS
protected static final java.lang.String[] RESISTER_IMMUNER_TOKENS
public java.lang.String ID()
CMObjectID in interface CMObjectID in class StdLibrarypublic java.lang.String getGenericClassID(Ability A)
AbilityParametersgetGenericClassID in interface AbilityParametersA - the Ability to lookpublic Ability convertAbilityToGeneric(Ability A)
AbilityParametersconvertAbilityToGeneric in interface AbilityParametersA - the Ability to convertprotected java.lang.String parseLayers(short[] layerAtt,
short[] clothingLayers,
java.lang.String misctype)
public void parseWearLocation(short[] layerAtt,
short[] layers,
long[] wornLoc,
boolean[] logicalAnd,
double[] hardBonus,
java.lang.String wearLocation)
AbilityParametersparseWearLocation in interface AbilityParameterslayerAtt - one dimensional array with the layer attributeslayers - one dimensional array with the layer levelwornLoc - one dimensional array with the wear location bitmaplogicalAnd - one dimensional array with the boolean for whether the location bitmap is AND or ORhardBonus - one dimensional array with the hardness bonus (an armor bonus basically)wearLocation - The coded wear location stringpublic java.util.Vector<java.lang.Object> parseRecipeFormatColumns(java.lang.String recipeFormat)
public java.lang.String makeRecipeFromItem(ItemCraftor C, Item I) throws CMException
AbilityParametersmakeRecipeFromItem in interface AbilityParametersC - the ItemCraftor skillI - the Item to return a recipe forCMException - a recipe syntax error in generating the recipeItemCraftor,
Recipesprotected static int getClassFieldIndex(DVector dataRow)
protected java.lang.Object getSampleObject(DVector dataRow)
protected java.lang.String stripData(java.lang.StringBuffer str,
java.lang.String div)
protected java.util.Vector<DVector> parseDataRows(java.lang.StringBuffer recipeData, java.util.Vector<? extends java.lang.Object> columnsV, int numberOfDataColumns) throws CMException
CMExceptionprotected boolean fixDataColumn(DVector dataRow, int rowShow) throws CMException
CMExceptionprotected boolean fixDataColumn(DVector dataRow, int rowShow, java.lang.Object classModelI) throws CMException
CMExceptionprotected void fixDataColumns(java.util.Vector<DVector> rowsV) throws CMException
CMExceptionprotected java.lang.StringBuffer cleanDataRowEOLs(java.lang.StringBuffer str)
public void testRecipeParsing(java.lang.StringBuffer recipesString,
java.lang.String recipeFormat)
throws CMException
AbilityParameterstestRecipeParsing in interface AbilityParametersrecipesString - the raw loaded recipe datarecipeFormat - the recipe format coded string fromCMException - a parse error, if anyRecipeDriven.getRecipeFilename(),
RecipeDriven.getRecipeFormat()public void testRecipeParsing(java.lang.String recipeFilename,
java.lang.String recipeFormat,
boolean save)
throws CMException
AbilityParameterstestRecipeParsing in interface AbilityParametersrecipeFilename - the unpathed regular filename of the recipe data to start withrecipeFormat - the recipe format coded string fromsave - true to re-save the recipes file, false not toCMException - a parse error, if anyRecipeDriven.getRecipeFilename(),
RecipeDriven.getRecipeFormat()public void testRecipeParsing(java.lang.StringBuffer str,
java.lang.String recipeFormat,
java.lang.String saveRecipeFilename)
throws CMException
CMExceptionprotected void calculateRecipeCols(int[] lengths,
java.lang.String[] headers,
java.util.Vector<DVector> rowsV)
public AbilityParameters.AbilityRecipeData parseRecipe(java.lang.String recipeFilename, java.lang.String recipeFormat)
AbilityParametersparseRecipe in interface AbilityParametersrecipeFilename - the unpathed regular filename of the recipe data to start withrecipeFormat - the recipe format coded string fromRecipeDriven.getRecipeFilename(),
RecipeDriven.getRecipeFormat(),
AbilityParameters.AbilityRecipeDatapublic java.lang.StringBuffer getRecipeList(RecipeDriven iA)
AbilityParametersgetRecipeList in interface AbilityParametersiA - the CraftorAbility skillRecipeDrivenpublic void modifyRecipesList(MOB mob, java.lang.String recipeFilename, java.lang.String recipeFormat) throws java.io.IOException
AbilityParametersmodifyRecipesList in interface AbilityParametersmob - the mob who is editing this recipe filerecipeFilename - the unpathed regular filename of the recipe file to editrecipeFormat - the recipe format from the crafting skill recipe format stringjava.io.IOException - an i/o error in session communicationRecipeDriven.getRecipeFilename(),
RecipeDriven.getRecipeFormat()public void resaveRecipeFile(MOB mob, java.lang.String recipeFilename, java.util.List<DVector> rowsV, java.util.List<? extends java.lang.Object> columnsV, boolean saveToVFS)
AbilityParametersresaveRecipeFile in interface AbilityParametersmob - the mob doing the save, used only for loggingrecipeFilename - the plain unpathedrowsV - the altered data rowscolumnsV - the recipe column informationsaveToVFS - true to save to vfs, false for local hard driveSee also dev notes belowprotected static int getAppropriateResourceBucket(Item I, java.lang.Object A)
protected static void addExtraMaterial(java.util.Map<java.lang.Integer,int[]> extraMatsM,
Item I,
java.lang.Object A,
double weight)
protected static Pair<java.lang.String[],java.lang.String[]> getBuildingCodesNFlags()
protected static void addExtraAbilityMaterial(java.util.Map<java.lang.Integer,int[]> extraMatsM,
Item I,
Ability A)
public static java.util.Map<java.lang.Integer,int[]> extraMaterial(Item I)
public java.util.Map<java.lang.String,AbilityParameters.AbilityParmEditor> getEditors()
AbilityParametersgetEditors in interface AbilityParameters