|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.planet_ink.coffee_mud.Libraries.StdLibrary
com.planet_ink.coffee_mud.Libraries.CMAbleParms
public class CMAbleParms
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, AbilityParameters.ParmType |
Field Summary | |
---|---|
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
|
Fields inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
---|
isDebugging, name, serviceClient, tickStatus |
Constructor Summary | |
---|---|
CMAbleParms()
|
Method Summary | |
---|---|
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)
|
java.lang.String |
encodeCodedSpells(Affectable I)
Returns all of the given effect Abilities on the given Affectable as a semicolon delimited string of Ability IDs. |
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.List<Ability> |
getCodedSpells(java.lang.String spells)
Parses the coded effects available from an ability parameter column and generates the Ability objects with any parameters of their own. |
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.StringBuffer |
getRecipeList(CraftorAbility 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. |
protected static boolean |
isResourceCodeRoomMapped(int resourceCode)
|
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. |
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 com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary |
---|
activate, getServiceClient, L, propertiesLoaded, shutdown |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
---|
copyOf, initializeClass, name, newInstance |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected 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
Constructor Detail |
---|
public CMAbleParms()
Method Detail |
---|
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
public java.lang.String encodeCodedSpells(Affectable I)
AbilityParameters
encodeCodedSpells
in interface AbilityParameters
I
- the Affectable one to look at the effects of
Affectable.effects()
,
AbilityParameters.getCodedSpells(String)
public java.util.List<Ability> getCodedSpells(java.lang.String spells)
AbilityParameters
getCodedSpells
in interface AbilityParameters
spells
- the coded ability parameter affectable effects string
Affectable.effects()
,
AbilityParameters.encodeCodedSpells(Affectable)
protected 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)
AbilityParameters
parseWearLocation
in interface AbilityParameters
layerAtt
- 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
AbilityParameters
makeRecipeFromItem
in interface AbilityParameters
C
- the ItemCraftor skillI
- the Item to return a recipe for
CMException
- a recipe syntax error in generating the recipeItemCraftor
,
Recipe
protected 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
CMException
protected boolean fixDataColumn(DVector dataRow, int rowShow) throws CMException
CMException
protected boolean fixDataColumn(DVector dataRow, int rowShow, java.lang.Object classModelI) throws CMException
CMException
protected void fixDataColumns(java.util.Vector<DVector> rowsV) throws CMException
CMException
protected java.lang.StringBuffer cleanDataRowEOLs(java.lang.StringBuffer str)
public void testRecipeParsing(java.lang.StringBuffer recipesString, java.lang.String recipeFormat) throws CMException
AbilityParameters
testRecipeParsing
in interface AbilityParameters
recipesString
- the raw loaded recipe datarecipeFormat
- the recipe format coded string from
CMException
- a parse error, if anyCraftorAbility.parametersFile()
,
CraftorAbility.parametersFormat()
public void testRecipeParsing(java.lang.String recipeFilename, java.lang.String recipeFormat, boolean save) throws CMException
AbilityParameters
testRecipeParsing
in interface AbilityParameters
recipeFilename
- 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 to
CMException
- a parse error, if anyCraftorAbility.parametersFile()
,
CraftorAbility.parametersFormat()
public void testRecipeParsing(java.lang.StringBuffer str, java.lang.String recipeFormat, java.lang.String saveRecipeFilename) throws CMException
CMException
protected 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)
AbilityParameters
parseRecipe
in interface AbilityParameters
recipeFilename
- the unpathed regular filename of the recipe data to start withrecipeFormat
- the recipe format coded string from
CraftorAbility.parametersFile()
,
CraftorAbility.parametersFormat()
,
AbilityParameters.AbilityRecipeData
public java.lang.StringBuffer getRecipeList(CraftorAbility iA)
AbilityParameters
getRecipeList
in interface AbilityParameters
iA
- the CraftorAbility skill
CraftorAbility
public void modifyRecipesList(MOB mob, java.lang.String recipeFilename, java.lang.String recipeFormat) throws java.io.IOException
AbilityParameters
modifyRecipesList
in interface AbilityParameters
mob
- 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 string
java.io.IOException
- an i/o error in session communicationCraftorAbility.parametersFile()
,
CraftorAbility.parametersFormat()
public void resaveRecipeFile(MOB mob, java.lang.String recipeFilename, java.util.List<DVector> rowsV, java.util.List<? extends java.lang.Object> columnsV, boolean saveToVFS)
AbilityParameters
resaveRecipeFile
in interface AbilityParameters
mob
- 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 below
protected static int getAppropriateResourceBucket(Item I, java.lang.Object A)
protected static boolean isResourceCodeRoomMapped(int resourceCode)
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()
AbilityParameters
getEditors
in interface AbilityParameters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |