This commit is contained in:
Anuken
2021-06-28 09:25:38 -04:00
parent 0bd1b4eedc
commit 082c17da85
8 changed files with 19 additions and 12 deletions

View File

@@ -84,9 +84,9 @@ public class AndroidLauncher extends AndroidApplication{
try{ try{
//try to load own class first //try to load own class first
loadedClass = findClass(name); loadedClass = findClass(name);
}catch(ClassNotFoundException e){ }catch(ClassNotFoundException | NoClassDefFoundError e){
//use parent if not found //use parent if not found
loadedClass = super.loadClass(name, resolve); return parent.loadClass(name);
} }
} }

View File

@@ -148,6 +148,8 @@ public class Vars implements Loadable{
public static int maxTextureSize = 2048; public static int maxTextureSize = 2048;
/** Whether to show the core landing animation. */ /** Whether to show the core landing animation. */
public static boolean showLandAnimation = true; public static boolean showLandAnimation = true;
/** Whether to check for memory use before taking screenshots. */
public static boolean checkScreenshotMemory = true;
/** Whether to prompt the user to confirm exiting. */ /** Whether to prompt the user to confirm exiting. */
public static boolean confirmExit = true; public static boolean confirmExit = true;
/** if true, UI is not drawn */ /** if true, UI is not drawn */

View File

@@ -51,7 +51,7 @@ public class Blocks implements ContentList{
melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge, melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge,
//sandbox //sandbox
powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, payloadVoid, payloadSource, illuminator, powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, payloadSource, payloadVoid, illuminator,
//defense //defense
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, plastaniumWall, plastaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, plastaniumWall, plastaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
@@ -2068,12 +2068,12 @@ public class Blocks implements ContentList{
alwaysUnlocked = true; alwaysUnlocked = true;
}}; }};
payloadVoid = new PayloadVoid("payload-void"){{ payloadSource = new PayloadSource("payload-source"){{
requirements(Category.units, BuildVisibility.sandboxOnly, with()); requirements(Category.units, BuildVisibility.sandboxOnly, with());
size = 5; size = 5;
}}; }};
payloadSource = new PayloadSource("payload-source"){{ payloadVoid = new PayloadVoid("payload-void"){{
requirements(Category.units, BuildVisibility.sandboxOnly, with()); requirements(Category.units, BuildVisibility.sandboxOnly, with());
size = 5; size = 5;
}}; }};

View File

@@ -2113,7 +2113,7 @@ public class UnitTypes implements ContentList{
bullet = new ContinuousLaserBulletType(){{ bullet = new ContinuousLaserBulletType(){{
maxRange = 90f; maxRange = 90f;
damage = 26f; damage = 27f;
length = 95f; length = 95f;
hitEffect = Fx.hitMeltHeal; hitEffect = Fx.hitMeltHeal;
drawSize = 200f; drawSize = 200f;
@@ -2144,7 +2144,7 @@ public class UnitTypes implements ContentList{
x = 70f/4f; x = 70f/4f;
y = -26f/4f; y = -26f/4f;
reload = 70f; reload = 65f;
shake = 3f; shake = 3f;
rotateSpeed = 2f; rotateSpeed = 2f;
shadow = 30f; shadow = 30f;
@@ -2161,7 +2161,7 @@ public class UnitTypes implements ContentList{
timeIncrease = 3f; timeIncrease = 3f;
timeDuration = 60f * 20f; timeDuration = 60f * 20f;
powerDamageScl = 3f; powerDamageScl = 3f;
damage = 50; damage = 60;
hitColor = lightColor = Pal.heal; hitColor = lightColor = Pal.heal;
lightRadius = 70f; lightRadius = 70f;
clipSize = 250f; clipSize = 250f;
@@ -2177,7 +2177,7 @@ public class UnitTypes implements ContentList{
trailWidth = 6f; trailWidth = 6f;
trailColor = Pal.heal; trailColor = Pal.heal;
trailInterval = 3f; trailInterval = 3f;
splashDamage = 60f; splashDamage = 70f;
splashDamageRadius = rad; splashDamageRadius = rad;
hitShake = 4f; hitShake = 4f;
trailRotation = true; trailRotation = true;

View File

@@ -11,6 +11,7 @@ import arc.scene.ui.layout.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import arc.util.async.*; import arc.util.async.*;
import mindustry.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.game.EventType.*; import mindustry.game.EventType.*;
import mindustry.gen.*; import mindustry.gen.*;
@@ -355,7 +356,7 @@ public class Renderer implements ApplicationListener{
int w = world.width() * tilesize, h = world.height() * tilesize; int w = world.width() * tilesize, h = world.height() * tilesize;
int memory = w * h * 4 / 1024 / 1024; int memory = w * h * 4 / 1024 / 1024;
if(memory >= (mobile ? 65 : 120)){ if(Vars.checkScreenshotMemory && memory >= (mobile ? 65 : 120)){
ui.showInfo("@screenshot.invalid"); ui.showInfo("@screenshot.invalid");
return; return;
} }

View File

@@ -11,6 +11,10 @@ public class ModClassLoader extends ClassLoader{
} }
}; };
public ModClassLoader(ClassLoader parent){
super(parent);
}
public void addChild(ClassLoader child){ public void addChild(ClassLoader child){
children.add(child); children.add(child);
} }

View File

@@ -39,7 +39,7 @@ public class Mods implements Loadable{
private int totalSprites; private int totalSprites;
private MultiPacker packer; private MultiPacker packer;
private ModClassLoader mainLoader = new ModClassLoader(); private ModClassLoader mainLoader = new ModClassLoader(getClass().getClassLoader());
Seq<LoadedMod> mods = new Seq<>(); Seq<LoadedMod> mods = new Seq<>();
private ObjectMap<Class<?>, ModMeta> metas = new ObjectMap<>(); private ObjectMap<Class<?>, ModMeta> metas = new ObjectMap<>();

View File

@@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
kotlin.stdlib.default.dependency=false kotlin.stdlib.default.dependency=false
#needed for android compilation #needed for android compilation
android.useAndroidX=true android.useAndroidX=true
archash=2767f83cd523aa0f7f71e2c6d34950ad6eba60b0 archash=1142cfc35b6671c6a2c5566632ff044a46527b82