(SourceGame game, TexturePack pack)
| 96 | public static final String TEXTURES_OK = "Textures are in the right folder."; |
| 97 | |
| 98 | public static boolean areTexturesUpToDate(SourceGame game, TexturePack pack) { |
| 99 | File materiaPath = game.getMatriealPath(pack); |
| 100 | if (materiaPath == null) { |
| 101 | return false; |
| 102 | } |
| 103 | Loggger.log("checking textures in " + materiaPath.toString()); |
| 104 | if (materiaPath == null || materiaPath.getParentFile() |
| 105 | .exists() == false) { |
| 106 | Loggger.warn("Cannot find material path."); |
| 107 | return false; |
| 108 | } |
| 109 | Path optionsGamePath = new File(materiaPath.toString() + File.separator + TexturePack.TEXTURE_OPTIONS_FILE).toPath(); |
| 110 | TextureOptions toGame = TexturePack.readTextureOptions(new TextureOptions(), optionsGamePath); |
| 111 | TextureOptions toSourcecraft = pack.getTextureOptions(); |
| 112 | return TextureOptions.isUpToDate(toGame, toSourcecraft); |
| 113 | } |
| 114 | |
| 115 | public static void updateTextures(TexturePack pack, SourceGame game) { |
| 116 | File srcFolder = pack.getFolder(); |
no test coverage detected