Added Validate warnings about FTL 1.6.1 for PNG, MP3, and TTF files
This commit is contained in:
parent
3aedf9b561
commit
cbd1a610ce
3 changed files with 36 additions and 3 deletions
|
@ -11,6 +11,15 @@
|
|||
"notice" : "Reminder: Return FTL to an unmodded state before upgrading SMM.\nAnd delete SMM's backups when upgrading FTL."
|
||||
},
|
||||
"changelog" : [
|
||||
{
|
||||
"version" : "1.9.1",
|
||||
"hidden" : true,
|
||||
"changes" : [
|
||||
"Edited a comment in boilerplate mod metadata to include AE ships",
|
||||
"Fixed omitted Validate warnings for PNG files",
|
||||
"Added Validate warnings about FTL 1.6.1+ for TTF, MP3, and PNG files"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version" : "1.9",
|
||||
"hidden" : false,
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
Changelog
|
||||
|
||||
1.9.1:
|
||||
- Edited a comment in boilerplate mod metadata to include AE ships
|
||||
- Fixed omitted Validate warnings for PNG files
|
||||
- Added Validate warnings about FTL 1.6.1+ for TTF, MP3, and PNG files
|
||||
|
||||
1.9:
|
||||
- Fixed corrupted civilian sector music in FTL 1.6.1+
|
||||
|
||||
|
|
|
@ -494,10 +494,23 @@ public class ModUtilities {
|
|||
) );
|
||||
modValid = false;
|
||||
}
|
||||
else if ( innerPath.endsWith( "[.]png" ) ) {
|
||||
else if ( innerPath.matches( "^.*[.]mp3$" ) ) {
|
||||
pendingMsgs.add( new ReportMessage(
|
||||
ReportMessage.WARNING,
|
||||
String.format( "As of FTL 1.6.1, MP3 audio is not supported (Use OGG or WAV)" )
|
||||
) );
|
||||
}
|
||||
else if ( innerPath.matches( "^.*[.]png$" ) ) {
|
||||
try {
|
||||
PngReader pngr = new PngReader( zis );
|
||||
|
||||
if ( pngr.interlaced ) {
|
||||
pendingMsgs.add( new ReportMessage(
|
||||
ReportMessage.WARNING,
|
||||
String.format( "As of FTL 1.6.1, interlaced PNG images are not supported (Re-save it as non-interlaced)" )
|
||||
) );
|
||||
}
|
||||
|
||||
// Check for Truecolor+Alpha (32bit RGBA).
|
||||
if ( pngr.imgInfo.channels != 4 || pngr.imgInfo.bitDepth != 8 ) {
|
||||
|
||||
|
@ -520,7 +533,7 @@ public class ModUtilities {
|
|||
}
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
log.error( String.format( "Error while validating \"%s:%s\".", modFile.getName(), innerPath ), e );
|
||||
log.error( String.format( "Error while validating \"%s:%s\"", modFile.getName(), innerPath ), e );
|
||||
pendingMsgs.add( new ReportMessage(
|
||||
ReportMessage.ERROR,
|
||||
"An error occurred. See log for details."
|
||||
|
@ -528,6 +541,12 @@ public class ModUtilities {
|
|||
modValid = false;
|
||||
}
|
||||
}
|
||||
else if ( innerPath.matches( "^.*[.]ttf$" ) ) {
|
||||
pendingMsgs.add( new ReportMessage(
|
||||
ReportMessage.WARNING,
|
||||
String.format( "FTL 1.01-1.5.13 had TTF fonts, but FTL 1.6.1 switched to *.font (A special bitmap format from the SIL library)" )
|
||||
) );
|
||||
}
|
||||
else if ( innerPath.matches( "^.*(?:[.]xml[.]append|[.]append[.]xml)$" ) ||
|
||||
innerPath.matches( "^.*(?:[.]xml[.]rawappend|[.]rawappend[.]xml)$" ) ||
|
||||
innerPath.matches( "^.*(?:[.]xml[.]rawclobber|[.]rawclobber[.]xml)$" ) ||
|
||||
|
@ -560,7 +579,7 @@ public class ModUtilities {
|
|||
if ( decodeResult.encoding.equalsIgnoreCase( "windows-1252" ) ) {
|
||||
pendingMsgs.add( new ReportMessage(
|
||||
ReportMessage.WARNING,
|
||||
String.format( "Fancy %s chars. (UTF-8 is recommended for that)", decodeResult.encoding )
|
||||
String.format( "Fancy %s chars (UTF-8 is recommended for that)", decodeResult.encoding )
|
||||
) );
|
||||
modValid = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue