Support saving/restoring game state that has creature tokens.

This commit is contained in:
Myrd
2015-01-03 19:15:44 +00:00
parent 06801023b5
commit 2853af3a10
5 changed files with 153 additions and 33 deletions

View File

@@ -87,6 +87,13 @@ public class ImageKeys {
return ImageKeys.TOKEN_PREFIX + tokenName;
}
public static String getTokenImageName(String tokenKey) {
if (!tokenKey.startsWith(ImageKeys.TOKEN_PREFIX)) {
return null;
}
return tokenKey.substring(ImageKeys.TOKEN_PREFIX.length());
}
public static File getImageFile(String key) {
if (StringUtils.isEmpty(key)) {
return null;