public static class RawMaterial.CODES
extends java.lang.Object
Constructor | Description |
---|---|
CODES() |
Constructs a CODES object for the current thread.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(int material,
java.lang.String name,
java.lang.String smell,
int value,
int frequ,
int hardness,
int buoyancy,
boolean fish,
boolean berry,
boolean woody,
java.lang.String abilityID) |
Adds a new resource to the official CODES object.
|
int[] |
all() |
Returns an array of the numeric codes for all resources
|
static int[] |
ALL() |
Returns an array of the numeric codes for all resources
|
static int[] |
ALL_SBN() |
Returns an array of the numeric codes for all resources
|
int[] |
berries() |
Returns an array of the numeric codes for the berry resources
|
static int[] |
BERRIES() |
Returns an array of the numeric codes for the berry resources
|
static int |
BOUYANCY(int code) |
Returns the buoyancy of the resource, from 0-20000
|
int |
buoyancy(int code) |
Returns the buoyancy of the resource, from 0-20000
|
static RawMaterial.CODES |
c(byte c) |
Returns the CODES object for the given thread group code, or null
|
static java.util.List<java.lang.Integer> |
COMPOSE_RESOURCES(int mat) |
Search and compose a complete list of all resources of the given
material
|
java.lang.String |
effect(int code) |
Returns the description of the code smell
|
static java.lang.String |
EFFECT(int code) |
Returns the description of the code smell
|
static Ability[] |
EFFECTA(int code) |
Parses, if necessary, EFFECT strings into ability objects, complete
with parms, ready for copying.
|
static java.lang.String[] |
EFFECTS() |
Returns the smells of the various resources
|
static int |
FIND_CaseSensitive(java.lang.String rsc) |
Returns the code of the names resource, or -1
|
static int |
FIND_IgnoreCase(java.lang.String rsc) |
Returns the code of the names resource, or -1
|
static int |
FIND_StartsWith(java.lang.String rsc) |
Returns the code of the names resource, or -1
|
int[] |
fishes() |
Returns an array of the numeric codes for the fishy resources
|
static int[] |
FISHES() |
Returns an array of the numeric codes for the fishy resources
|
static int[] |
flaggedResources(RawMaterial.ResourceFlag flag) |
Returns an array of the numeric codes for the flagged resources
|
int |
frequency(int code) |
Returns the frequency of the resource, or how rare it is.
|
static int |
FREQUENCY(int code) |
Returns the frequency of the resource, or how rare it is.
|
int |
get(int x) |
Returns an the numeric codes of the indexes resource code
|
static int |
GET(int x) |
Returns an the numeric codes of the indexes resource code
|
PairList<java.lang.Integer,java.lang.Double> |
getValueSortedResources(int material) |
For the given material, returns a value-sorted list of all resources
that are made of that material and their values.
|
int |
hardness(int code) |
Returns the hardness of the resource, from 1-10
|
static int |
HARDNESS(int code) |
Returns the hardness of the resource, from 1-10
|
static RawMaterial.CODES |
instance() |
Returns the CODES object for the current thread group, or creates one.
|
static boolean |
IS_VALID(int code) |
Returns whether the code is valid
|
static java.lang.String |
MAT_DESC(int code) |
Returns the short descriptive noun of the material in the code
|
static java.lang.String |
MAT_NAME(int code) |
Returns the short uppercase name of the material in the code
|
static int |
MOST_FREQUENT(int material) |
Returns the resource code of the most frequently found
resource of the given material mask
|
int |
mostFrequent(int material) |
Returns the resource code of the most frequently found
resource of the given material mask
|
java.lang.String |
name(int code) |
Returns the name of the code
|
static java.lang.String |
NAME(int code) |
Returns the name of the code
|
java.lang.String[] |
names() |
Returns the names of the various resources
|
static java.lang.String[] |
NAMES() |
Returns the names of the various resources
|
void |
replace(int resourceCode,
int material,
java.lang.String name,
java.lang.String smell,
int value,
int frequ,
int hardness,
int buoyancy,
boolean fish,
boolean berry,
boolean woody,
java.lang.String abilityID) |
Replaces a resource of the given code with new data
|
static void |
reset() |
Destroys and recreates the CODES object for the current thread group
|
java.lang.String |
smell(int code) |
Returns the description of the code smell
|
static java.lang.String |
SMELL(int code) |
Returns the description of the code smell
|
static java.lang.String[] |
SMELLS() |
Returns the smells of the various resources
|
int |
total() |
Returns total number of codes 0 - this-1
|
static int |
TOTAL() |
Returns total number of codes 0 - this-1
|
int |
value(int code) |
Returns the value of the resource
|
static int |
VALUE(int code) |
Returns the value of the resource
|
int[] |
woodies() |
Returns an array of the numeric codes for the wood-choppy resources
|
static int[] |
WOODIES() |
Returns an array of the numeric codes for the wood-choppy resources
|
public static RawMaterial.CODES c(byte c)
c
- the thread group codepublic static RawMaterial.CODES instance()
public static void reset()
public static int[] BERRIES()
public int[] berries()
public static int[] WOODIES()
public int[] woodies()
public static int[] FISHES()
public int[] fishes()
public static int[] flaggedResources(RawMaterial.ResourceFlag flag)
flag
- the flag to usepublic static int TOTAL()
public int total()
public static int[] ALL_SBN()
public static int[] ALL()
public int[] all()
public static int GET(int x)
x
- the indexed resource codepublic int get(int x)
x
- the indexed resource codepublic static int FIND_CaseSensitive(java.lang.String rsc)
rsc
- the names resourcepublic static int FIND_IgnoreCase(java.lang.String rsc)
rsc
- the names resourcepublic static int FIND_StartsWith(java.lang.String rsc)
rsc
- the names resourcepublic static boolean IS_VALID(int code)
code
- the resource codepublic static java.lang.String[] NAMES()
public java.lang.String[] names()
public static java.lang.String NAME(int code)
code
- the codepublic static java.lang.String MAT_NAME(int code)
code
- the code to get material frompublic static java.lang.String MAT_DESC(int code)
code
- the code to get material frompublic java.lang.String name(int code)
code
- the codepublic static java.lang.String[] SMELLS()
public static java.lang.String SMELL(int code)
code
- the code smellpublic java.lang.String smell(int code)
code
- the code smellpublic static java.lang.String[] EFFECTS()
public static java.lang.String EFFECT(int code)
code
- the code smellpublic java.lang.String effect(int code)
code
- the code smellpublic static int VALUE(int code)
code
- the resource codepublic int value(int code)
code
- the resource codepublic static int FREQUENCY(int code)
code
- the resource codepublic int frequency(int code)
code
- the resource codepublic static int MOST_FREQUENT(int material)
material
- the material maskpublic int mostFrequent(int material)
material
- the material maskpublic static int HARDNESS(int code)
code
- the resource codepublic int hardness(int code)
code
- the resource codepublic static int BOUYANCY(int code)
code
- the resource codepublic int buoyancy(int code)
code
- the resource codepublic static java.util.List<java.lang.Integer> COMPOSE_RESOURCES(int mat)
mat
- the resource codepublic static Ability[] EFFECTA(int code)
code
- the material/resource codepublic PairList<java.lang.Integer,java.lang.Double> getValueSortedResources(int material)
material
- the material type to get resources ofpublic void add(int material, java.lang.String name, java.lang.String smell, int value, int frequ, int hardness, int buoyancy, boolean fish, boolean berry, boolean woody, java.lang.String abilityID)
material
- the material type of the new resourcename
- the name of the resourcesmell
- the smell of the resourcevalue
- the value of the resource in base currencyfrequ
- the frequency of the resource 0-10hardness
- the hardness of the resource 0-10buoyancy
- the buoyancy of the resource 0-10000fish
- true if its a fishy-typeberry
- true if its a berry typewoody
- true if its a wood-choppy typeabilityID
- effects listpublic void replace(int resourceCode, int material, java.lang.String name, java.lang.String smell, int value, int frequ, int hardness, int buoyancy, boolean fish, boolean berry, boolean woody, java.lang.String abilityID)
resourceCode
- the old resource codematerial
- the material type of the new resourcename
- the name of the resourcesmell
- the smell of the resourcevalue
- the value of the resource in base currencyfrequ
- the frequency of the resource 0-10hardness
- the hardness of the resource 0-10buoyancy
- the buoyancy of the resource 0-10000fish
- true if its a fishy-typeberry
- true if its a berry typewoody
- true if its a wood-choppy typeabilityID
- effects list