NamedHero selectedHero = (NamedHero) currentDropdown.getSelectedItem();
Path scriptPath = Paths.get(this.installDir, "/dota/scripts/game_sounds_heroes/game_sounds_" + selectedHero.getInternalName() + ".txt");
File scriptFile = new File(scriptPath.toString());
String scriptKey = "game_sounds_" + selectedHero.getInternalName() + ".txt".toLowerCase();
VPKEntry entry;
boolean needsValidation = false;
//if it doesn't exist yet, don't bother validating, and just write it out
if (!scriptFile.isFile())
{
entry = this.getHeroScriptFile(selectedHero.getInternalName());
this.writeHeroScriptFile(entry, false);
this.updateCache(scriptKey, entry.getCRC32());
}
else //if it exists, we need to validate it
{
needsValidation = true;
}