CMCommon
, Manufacturer
, CMObject
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class DefaultManufacturer extends java.lang.Object implements Manufacturer
Modifier and Type | Field | Description |
---|---|---|
protected MaskingLibrary.CompiledZMask |
compiledItemMask |
|
protected double |
efficiency |
|
protected byte |
maxTechLevelDiff |
|
protected byte |
minTechLevelDiff |
|
protected java.lang.String |
name |
|
protected java.lang.String |
rawItemMask |
|
protected double |
reliability |
|
protected java.util.Set<Technical.TechType> |
types |
idConverter
Constructor | Description |
---|---|
DefaultManufacturer() |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(CMObject o) |
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
double |
getEfficiencyPct() |
Returns a pct, from 0-2, to multiply by the power requirements
of electronic items for certain purposes.
|
MaskingLibrary.CompiledZMask |
getItemMask() |
Returns the item mask that describes what kind of items this
manufacturer makes.
|
java.lang.String |
getItemMaskStr() |
Returns the item mask that describes what kind of items this
manufacturer makes.
|
java.lang.String |
getManufactureredTypesList() |
Returns a comma-delimited list of the types of things this manufacturer will make.
|
byte |
getMaxTechLevelDiff() |
Returns a positive difference from Max Tech Level-10.
|
byte |
getMinTechLevelDiff() |
Returns a positive difference from Max Tech Level-10.
|
double |
getReliabilityPct() |
Returns a pct, from 0-2, to multiply by the amt of damage taken,
and the chance of failure, esp.
|
java.lang.String |
getXml() |
Returns an Xml document representing this manufacturer.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
boolean |
isManufactureredType(Technical T) |
Returns whether the given item will be manufacturered by this manufacturer.
|
java.lang.String |
name() |
The displayable name of this object.
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
void |
setEfficiencyPct(double pct) |
Sets a pct, from 0-2, to multiply by the power requirements
of electronic items for certain purposes.
|
void |
setItemMask(java.lang.String newMask) |
Sets the item mask that describes what kind of items this
manufacturer makes.
|
void |
setManufactureredTypesList(java.lang.String list) |
Sets the comma-delimited list of the types of things this manufacturer will make.
|
void |
setMaxTechLevelDiff(byte max) |
Sets a positive difference from Max Tech Level-10.
|
void |
setMinTechLevelDiff(byte min) |
Sets a positive difference from Max Tech Level-10.
|
void |
setName(java.lang.String name) |
Sets the name of the manufacturer
|
void |
setReliabilityPct(double pct) |
Sets a pct, from 0-2, to multiply by the amt of damage taken,
and the chance of failure, esp.
|
void |
setXml(java.lang.String xml) |
Sets an Xml document representing this manufacturer.
|
protected java.lang.String name
protected byte maxTechLevelDiff
protected byte minTechLevelDiff
protected double efficiency
protected double reliability
protected java.lang.String rawItemMask
protected java.util.Set<Technical.TechType> types
protected MaskingLibrary.CompiledZMask compiledItemMask
public java.lang.String ID()
CMObject
public java.lang.String name()
CMObject
name
in interface CMObject
Environmental.Name()
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public CMObject copyOf()
CMObject
public byte getMaxTechLevelDiff()
Manufacturer
getMaxTechLevelDiff
in interface Manufacturer
public void setMaxTechLevelDiff(byte max)
Manufacturer
setMaxTechLevelDiff
in interface Manufacturer
max
- a number from 0-10public byte getMinTechLevelDiff()
Manufacturer
getMinTechLevelDiff
in interface Manufacturer
public void setMinTechLevelDiff(byte min)
Manufacturer
setMinTechLevelDiff
in interface Manufacturer
min
- a number from 0-10public void setName(java.lang.String name)
Manufacturer
setName
in interface Manufacturer
name
- of the manufacturerpublic double getEfficiencyPct()
Manufacturer
getEfficiencyPct
in interface Manufacturer
public void setEfficiencyPct(double pct)
Manufacturer
setEfficiencyPct
in interface Manufacturer
pct
- from 0-2public double getReliabilityPct()
Manufacturer
getReliabilityPct
in interface Manufacturer
public void setReliabilityPct(double pct)
Manufacturer
setReliabilityPct
in interface Manufacturer
pct
- from 0-2public java.lang.String getItemMaskStr()
Manufacturer
getItemMaskStr
in interface Manufacturer
MaskingLibrary
public void setItemMask(java.lang.String newMask)
Manufacturer
setItemMask
in interface Manufacturer
newMask
- the zapperMaskMaskingLibrary
public boolean isManufactureredType(Technical T)
Manufacturer
isManufactureredType
in interface Manufacturer
T
- the item typepublic java.lang.String getManufactureredTypesList()
Manufacturer
getManufactureredTypesList
in interface Manufacturer
public void setManufactureredTypesList(java.lang.String list)
Manufacturer
setManufactureredTypesList
in interface Manufacturer
list
- the comma-delimited list of the types of things this manufacturer will make.public MaskingLibrary.CompiledZMask getItemMask()
Manufacturer
getItemMask
in interface Manufacturer
MaskingLibrary
public java.lang.String getXml()
Manufacturer
getXml
in interface Manufacturer
public void setXml(java.lang.String xml)
Manufacturer
setXml
in interface Manufacturer
xml
- Xml document representing this manufacturer.