MCPcopy Create free account
hub / github.com/Garten/sourcecraft / areTexturesUpToDate

Method areTexturesUpToDate

src/main/Steam.java:98–113  ·  view source on GitHub ↗
(SourceGame game, TexturePack pack)

Source from the content-addressed store, hash-verified

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();

Callers 2

MainMethod · 0.95

Calls 7

logMethod · 0.95
warnMethod · 0.95
readTextureOptionsMethod · 0.95
isUpToDateMethod · 0.95
getMatriealPathMethod · 0.80
getTextureOptionsMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected