mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Фикс runtime для работы с новыми опциональными модами
This commit is contained in:
parent
8e2e9d4aee
commit
97f9f034e7
3 changed files with 12 additions and 6 deletions
|
@ -98,14 +98,19 @@ var options = {
|
|||
var profile = profilesList[serverHolder.old];
|
||||
var list = profile.getOptional();
|
||||
var checkBoxList = new java.util.ArrayList;
|
||||
var dModsIds = [];
|
||||
|
||||
list.forEach(function(modFile) {
|
||||
dModsIds.push(modFile.string);
|
||||
|
||||
var modName = modFile.name, modDescription = "", subLevel = 1;
|
||||
if(!modFile.isVisible || !((loginData.permissions & modFile.permissions) != 0))
|
||||
if(!modFile.isVisible)
|
||||
{
|
||||
LogHelper.debug("optionalMod %s hidden",modFile.name);
|
||||
return;
|
||||
}
|
||||
|
||||
if(modFile.permissions != 0 && ((loginData.permissions.toLong() & modFile.permissions) != 0))
|
||||
{
|
||||
LogHelper.debug("optionalMod %s permissions deny",modFile.name);
|
||||
return;
|
||||
}
|
||||
if(modFile.info != null) //Есть ли описание?
|
||||
modDescription = modFile.info;
|
||||
if(modFile.subTreeLevel != null && modFile.subTreeLevel > 1)//Это суб-модификация?
|
||||
|
|
|
@ -46,6 +46,7 @@ public ClientPermissions(long data) {
|
|||
canUSR3 = (data & (1 << 4)) != 0;
|
||||
canBot = (data & (1 << 5)) != 0;
|
||||
}
|
||||
@LauncherAPI
|
||||
public long toLong()
|
||||
{
|
||||
long result = 0;
|
||||
|
|
|
@ -17,7 +17,7 @@ public class OptionalFile {
|
|||
@LauncherAPI
|
||||
public boolean mark;
|
||||
@LauncherAPI
|
||||
public boolean visible;
|
||||
public boolean visible = true;
|
||||
@LauncherAPI
|
||||
public String name;
|
||||
@LauncherAPI
|
||||
|
|
Loading…
Reference in a new issue