Added method to get color class by id.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@902 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -397,7 +397,7 @@ public class ColorPository implements Serializable
|
|||||||
*/
|
*/
|
||||||
public ColorRecord getColorRecord (int classId, int colorId)
|
public ColorRecord getColorRecord (int classId, int colorId)
|
||||||
{
|
{
|
||||||
ClassRecord record = _classes.get(classId);
|
ClassRecord record = getClassRecord(classId);
|
||||||
if (record == null) {
|
if (record == null) {
|
||||||
// if they request color class zero, we assume they're just
|
// if they request color class zero, we assume they're just
|
||||||
// decoding a blank colorprint, otherwise we complain
|
// decoding a blank colorprint, otherwise we complain
|
||||||
@@ -433,6 +433,14 @@ public class ColorPository implements Serializable
|
|||||||
return record.colors.get(colorId);
|
return record.colors.get(colorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Looks up the requested color class record.
|
||||||
|
*/
|
||||||
|
public ClassRecord getClassRecord (int classId)
|
||||||
|
{
|
||||||
|
return _classes.get(classId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a fully configured color class record to the pository. This is only called by the XML
|
* Adds a fully configured color class record to the pository. This is only called by the XML
|
||||||
* parsing code, so pay it no mind.
|
* parsing code, so pay it no mind.
|
||||||
|
|||||||
Reference in New Issue
Block a user