use of main.content.enums.rules.VisionEnums.OUTLINE_IMAGE in project Eidolons by IDemiurge.
the class HintMaster method getHintsString.
public String getHintsString(BattleFieldObject unit) {
OUTLINE_IMAGE img = master.getOutlineMaster().getImageDark(unit);
Map<OUTLINE_IMAGE, String> map = cache.get(unit);
if (map == null) {
map = new HashMap<>();
cache.put(unit, map);
}
String hintString = map.get(img);
if (hintString != null)
return hintString;
hintString = "";
List<OUTLINE_HINT> hints = getHints(unit, img);
for (OUTLINE_HINT hint : hints) {
hintString += StringMaster.getWellFormattedString(hint.toString()) + " ";
}
map.put(img, hintString);
return hintString;
}
use of main.content.enums.rules.VisionEnums.OUTLINE_IMAGE in project Eidolons by IDemiurge.
the class VisibilityMaster method getDisplayImagePathForUnit.
public String getDisplayImagePathForUnit(DC_Obj obj) {
// construct and cache an Outline obj per unit?
OUTLINE_TYPE type = obj.getOutlineType();
if (type == null) {
return null;
}
if (type == VisionEnums.OUTLINE_TYPE.BLOCKED_OUTLINE) {
return getImagePath(VisionEnums.OUTLINE_TYPE.DEEPER_DARKNESS, obj);
}
if ((type == VisionEnums.OUTLINE_TYPE.DEEPER_DARKNESS || type == VisionEnums.OUTLINE_TYPE.BLINDING_LIGHT)) {
return getImagePath(type, obj);
}
if (obj instanceof DC_Cell) {
return null;
}
String outlinePath = "ui\\outlines\\" + type.toString();
OUTLINE_IMAGE outlineImage;
if (type == VisionEnums.OUTLINE_TYPE.VAGUE_OUTLINE) {
outlineImage = master.getOutlineMaster().getImageVague((Unit) obj);
} else {
outlineImage = master.getOutlineMaster().getImageDark((Unit) obj);
}
if (outlineImage != OUTLINE_IMAGE.UNKNOWN) {
outlinePath += "_" + outlineImage.toString();
}
if (obj.isTargetHighlighted()) {
outlinePath += TARGET;
} else {
if (obj.isInfoSelected()) {
outlinePath += INFO;
}
}
String image = (outlinePath + ".jpg");
if (ImageManager.isImage(image)) {
return image;
}
image = (outlinePath.replace("_" + outlineImage.toString(), "") + ".jpg");
if (ImageManager.isImage(image)) {
return image;
}
image = (outlinePath.replace(INFO, "").replace(TARGET, "") + ".jpg");
if (ImageManager.isImage(image)) {
return image;
}
return null;
// DIFFERENTIATE BETWEEN RANGE, CONCEALMENT, ILL AND STEALTH
}
Aggregations