Limit mod browser to mods for 136 and above

This commit is contained in:
Anuken
2022-06-27 12:07:30 -04:00
parent d857ef6290
commit b4d46ca137
2 changed files with 10 additions and 2 deletions

View File

@@ -46,8 +46,13 @@ public class Version{
}
}
/** @return whether the version is greater than the specified version string, e.g. "120.1"*/
/** @return whether the current game version is greater than the specified version string, e.g. "120.1"*/
public static boolean isAtLeast(String str){
return isAtLeast(build, revision, str);
}
/** @return whether the version numbers are greater than the specified version string, e.g. "120.1"*/
public static boolean isAtLeast(int build, int revision, String str){
if(build <= 0 || str == null || str.isEmpty()) return true;
int dot = str.indexOf('.');

View File

@@ -427,7 +427,10 @@ public class ModsDialog extends BaseDialog{
}
for(ModListing mod : listings){
if((mod.hasJava && Vars.ios) || (!Strings.matches(searchtxt, mod.name) && !Strings.matches(searchtxt, mod.repo)) || (Vars.ios && mod.hasScripts)) continue;
if(((mod.hasJava || mod.hasScripts) && Vars.ios) ||
(!Strings.matches(searchtxt, mod.name) && !Strings.matches(searchtxt, mod.repo)) ||
//hack, I'm basically testing if 135.10 >= modVersion, which is equivalent to modVersion >= 136
(Version.isAtLeast(135, 10, mod.minGameVersion))) continue;
float s = 64f;