Fix broken planet updates

This commit is contained in:
sudokoko 2023-12-28 13:31:20 -05:00
commit c9e5295338
No known key found for this signature in database
GPG key ID: 48BB40C0F649D603
2 changed files with 13 additions and 2 deletions

View file

@ -37,4 +37,13 @@ public static class GameResourceHelper
return LbpFile.FromHash(resource)?.FileType is LbpFileType.Png or LbpFileType.Jpeg or LbpFileType.Painting
or LbpFileType.Texture;
}
public static bool IsValidLevel(string resource)
{
if (!FileHelper.IsResourceValid(resource)) return false;
// Technically this method could be used (and is used) to check if a planet is valid,
// but I'm keeping the method name as is for semantic reasons.
return LbpFile.FromHash(resource)?.FileType is LbpFileType.Level;
}
}