|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.util.SimpleDataRecord<AvatarClass>
org.starhope.appius.user.AvatarClass
public class AvatarClass
The avatar class defines a type of avatar which can be used by a game player or NPC. Different avatar classes may use different physical models, accept different clothing, &c. For example, different alien races or mythical species might be represented by different avatar classes.
Field Summary | |
---|---|
private AvatarBodyFormat |
bodyFormat
|
private boolean |
canColor
whether the avatar class can be colorised |
private PolygonPrimitive<?> |
collisionBounds
the bounding space for collision detection |
private String |
collisionBoundsString
string describing the bounding space for collision detection |
private Colour |
defaultBaseColour
the default base colour for the avatar class |
private Colour |
defaultExtraColour
the default extra/highlight/feature colour for the avatar class |
private GenericItemReference |
defaultPattern
the default pattern/hairstyle type for the avatar class |
private Colour |
defaultPatternColour
the default pattern/hair/additional colour for the avatar class |
private String |
filename
avatar class filename |
private boolean |
forFree
A cache of whether each avatar class is available to free users |
private String |
format
WRITEME: Document this brpocock@star-hope.org |
private boolean |
forPaid
A cache of whether each avatar class is available to paid users |
private double |
height
|
private int |
id
unique ID |
private String |
ident
string identifier |
private static long |
serialVersionUID
Java serialisation unique ID |
Fields inherited from class org.starhope.appius.util.SimpleDataRecord |
---|
myLoader, timeLastChanged, timeLastSaved |
Constructor Summary | |
---|---|
AvatarClass()
nil constructor |
|
AvatarClass(RecordLoader<AvatarClass> loader)
|
Method Summary | |
---|---|
boolean |
canColor()
/** Return whether this avatar class can be colorised (2 planes) or not. |
int |
compareTo(AvatarClass o)
|
String |
getAvatarString(int avatarNum)
Deprecated. this is really dumb |
AvatarBodyFormat |
getBodyFormat()
|
static AvatarClass |
getByID(int id)
Deprecated. use Nomenclator.getDataRecord(Class, int) |
int |
getCacheableID()
Note that all records must have either a numeric ID ( DataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both. |
String |
getCacheableIdent()
Note that all records must have either a numeric ID ( DataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both. |
String |
getCollisionBounds_string()
|
PolygonPrimitive<?> |
getCollisionBounds()
|
Colour |
getDefaultBaseColor()
|
Colour |
getDefaultBaseColour()
|
Colour |
getDefaultExtraColor()
|
Colour |
getDefaultExtraColour()
|
GenericItemReference |
getDefaultPattern()
|
Colour |
getDefaultPatternColor()
|
Colour |
getDefaultPatternColour()
|
String |
getFilename()
|
String |
getFormat()
WRITEME: Document this method brpocock@star-hope.org |
double |
getHeight()
FIXME: Avatar heights should be some kind of database entry? |
int |
getID()
|
ItemManager |
getItemManager(Inventory inventory)
WRITEME: Document this method brpocock@star-hope.org |
String |
getName()
|
String |
getSubversionRevision()
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence. |
boolean |
isForFree()
|
boolean |
isForPaid()
|
boolean |
isForVIT()
Deprecated. use isForPaid() — VIT is
Tootsville™-specific terminology |
void |
setBodyFormat(AvatarBodyFormat newBodyFormat)
WRITEME: Document this method brpocock@star-hope.org |
void |
setCanColor(boolean really)
|
void |
setCollisionBounds(String newString)
|
void |
setDefaultBaseColour(Colour newColour)
|
void |
setDefaultExtraColour(Colour newColour)
|
void |
setDefaultPattern(GenericItemReference newPattern)
|
void |
setDefaultPatternColour(Colour newColour)
|
void |
setFilename(String newFile)
|
void |
setForFree(boolean really)
|
String |
setFormat(String newFormat)
WRITEME: Document this method brpocock@star-hope.org |
void |
setForPaid(boolean really)
|
void |
setHeight(double heightScalar)
WRITEME: Document this method brpocock@star-hope.org |
void |
setID(int newID)
Note: does not call SimpleDataRecord.changed() |
void |
setName(String newName)
|
org.json.JSONObject |
toJSON()
This returns a copy of the object's data cast into a JSON form. |
String |
toString()
String representation is currently the JSON data |
Methods inherited from class org.starhope.appius.util.SimpleDataRecord |
---|
changed, checkStale, equals, finalize, getRecordLoader, getTimeLastChanged, getTimeLastSaved, hashCode, isBeingLoaded, markAsLoaded, markAsSaved, markForReload, onRemove, onRetrieve, onStore, save, setRecordLoader |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private AvatarBodyFormat bodyFormat
private boolean canColor
private PolygonPrimitive<?> collisionBounds
private String collisionBoundsString
private Colour defaultBaseColour
private Colour defaultExtraColour
private GenericItemReference defaultPattern
private Colour defaultPatternColour
private String filename
private boolean forFree
private String format
private boolean forPaid
private double height
private int id
private String ident
Constructor Detail |
---|
public AvatarClass()
public AvatarClass(RecordLoader<AvatarClass> loader)
loader
- record loaderMethod Detail |
---|
@Deprecated public static AvatarClass getByID(int id)
Nomenclator.getDataRecord(Class, int)
id
- ID
public boolean canColor()
public int compareTo(AvatarClass o)
compareTo
in interface Comparable<AvatarClass>
compareTo
in class SimpleDataRecord<AvatarClass>
SimpleDataRecord.compareTo(org.starhope.appius.util.SimpleDataRecord)
@Deprecated public String getAvatarString(int avatarNum)
avatarNum
- ID number
public AvatarBodyFormat getBodyFormat()
AvatarBodyFormat
that best describes the
layout of this AvatarClass
with respect to
InventoryItemType
slots.public int getCacheableID() throws NotFoundException
DataRecord
DataRecord.getCacheableID()
or a string identifier (
DataRecord.getCacheableIdent()
or both.
getCacheableID
in interface DataRecord
NotFoundException
- if the item doesn't have a distinct
numeric IDDataRecord.getCacheableID()
public String getCacheableIdent() throws NotFoundException
DataRecord
DataRecord.getCacheableID()
or a string identifier (
DataRecord.getCacheableIdent()
or both.
getCacheableIdent
in interface DataRecord
NotFoundException
- if the item doesn't have a distinct
string identifierDataRecord.getCacheableIdent()
public PolygonPrimitive<?> getCollisionBounds()
public String getCollisionBounds_string()
public Colour getDefaultBaseColor()
public Colour getDefaultBaseColour()
public Colour getDefaultExtraColor()
public Colour getDefaultExtraColour()
public GenericItemReference getDefaultPattern()
public Colour getDefaultPatternColor()
public Colour getDefaultPatternColour()
public String getFilename()
public String getFormat()
public double getHeight()
public int getID()
public ItemManager getItemManager(Inventory inventory)
inventory
- the user's inventory (which user must be of this
AvatarClass
for the ItemManager
returned to be meaningful)
ItemManager
which encompasses this avatar class
and the given Inventory
public String getName()
public String getSubversionRevision()
HasSubversionRevision
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence.
As an example,the Subversion revision string for this file is "$Rev: 1968 $"
@Override public String getSubversionRevision () { return "$Rev: "; }
getSubversionRevision
in interface HasSubversionRevision
HasSubversionRevision.getSubversionRevision()
public boolean isForFree()
public boolean isForPaid()
@Deprecated public boolean isForVIT()
isForPaid()
— VIT is
Tootsville™-specific terminology
public void setBodyFormat(AvatarBodyFormat newBodyFormat)
newBodyFormat
- WRITEMEpublic void setCanColor(boolean really)
really
- whether the avatar class can be colorisedpublic void setCollisionBounds(String newString)
newString
- a string somehow describing a collision
polyhedron/subspace/…public void setDefaultBaseColour(Colour newColour)
newColour
- the defaultBaseColour to setpublic void setDefaultExtraColour(Colour newColour)
newColour
- the defaultExtraColour to setpublic void setDefaultPattern(GenericItemReference newPattern)
newPattern
- the defaultPattern to setpublic void setDefaultPatternColour(Colour newColour)
newColour
- the defaultPatternColour to setpublic void setFilename(String newFile)
newFile
- the filename to setpublic void setForFree(boolean really)
really
- the forFree to setpublic String setFormat(String newFormat)
newFormat
- WRITEME
public void setForPaid(boolean really)
really
- the forPaid to setpublic void setHeight(double heightScalar)
heightScalar
- WRITEMEpublic void setID(int newID)
SimpleDataRecord.changed()
newID
- new IDpublic void setName(String newName)
newName
- new namepublic org.json.JSONObject toJSON()
CastsToJSON
toJSON
in interface CastsToJSON
CastsToJSON.toJSON()
public String toString()
toString
in class SimpleDataRecord<AvatarClass>
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |