use of main.system.auxiliary.StrPathBuilder in project Eidolons by IDemiurge.
the class AttackAnim method findWeaponSprite.
protected String findWeaponSprite(DC_WeaponObj weapon) {
if (weapon == null) {
return "";
}
String path = PathFinder.getImagePath();
StrPathBuilder builder = new StrPathBuilder(PathFinder.getSpritesPath(), "weapons");
builder.append(weapon.isNatural() ? "natural" : null);
builder.append(weapon.isRanged() ? "ranged" : null);
builder.append(weapon.isAmmo() ? "ammo" : null);
builder.append(TestMasterContent.isArtifact(weapon) ? "artifact" : null);
path += builder.toString();
String file = findWeaponSprite(path, weapon);
if (file == null) {
if (TestMasterContent.isArtifact(weapon))
file = findWeaponSprite(StringMaster.cropLastPathSegment(path), weapon);
if (file == null) {
file = findWeaponSprite(path, weapon, false);
if (file == null)
file = findWeaponSprite(StringMaster.cropLastPathSegment(path), weapon, false);
}
}
return path + file;
}
use of main.system.auxiliary.StrPathBuilder in project Eidolons by IDemiurge.
the class AnimMaster3d method getAtlasPath.
public static String getAtlasPath(DC_WeaponObj weapon, String name) {
String groupName = weapon.getWeaponGroup().toString().replace("_", " ");
StrPathBuilder s = new StrPathBuilder(PathFinder.getWeaponAnimPath(), "atlas", weapon.getWeaponType().toString().replace("_", " "), groupName, name + TexturePackerLaunch.ATLAS_EXTENSION);
return s.toString();
}
Aggregations