Build error fix / Anuken/Mindustry-Suggestions/issues/2897

This commit is contained in:
Anuken
2021-08-24 09:28:51 -04:00
parent 901d594768
commit 8949fd279e
3 changed files with 14 additions and 6 deletions

View File

@ -41,8 +41,8 @@ buildscript{
} }
plugins{ plugins{
id 'org.jetbrains.kotlin.jvm' version '1.4.32' id 'org.jetbrains.kotlin.jvm' version '1.5.21'
id "org.jetbrains.kotlin.kapt" version "1.4.32" id "org.jetbrains.kotlin.kapt" version "1.5.21"
} }
allprojects{ allprojects{
@ -219,10 +219,16 @@ allprojects{
options.compilerArgs += ["-Xlint:deprecation"] options.compilerArgs += ["-Xlint:deprecation"]
dependsOn clearCache dependsOn clearCache
options.forkOptions.jvmArgs.addAll([ options.forkOptions.jvmArgs += [
'--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED', '--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED',
]) '--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED'
]
} }
} }

View File

@ -1158,12 +1158,14 @@ public class Blocks implements ContentList{
battery = new Battery("battery"){{ battery = new Battery("battery"){{
requirements(Category.power, with(Items.copper, 5, Items.lead, 20)); requirements(Category.power, with(Items.copper, 5, Items.lead, 20));
consumes.powerBuffered(4000f); consumes.powerBuffered(4000f);
baseExplosiveness = 1f;
}}; }};
batteryLarge = new Battery("battery-large"){{ batteryLarge = new Battery("battery-large"){{
requirements(Category.power, with(Items.titanium, 20, Items.lead, 40, Items.silicon, 20)); requirements(Category.power, with(Items.titanium, 20, Items.lead, 40, Items.silicon, 20));
size = 3; size = 3;
consumes.powerBuffered(50000f); consumes.powerBuffered(50000f);
baseExplosiveness = 5f;
}}; }};
combustionGenerator = new BurnerGenerator("combustion-generator"){{ combustionGenerator = new BurnerGenerator("combustion-generator"){{

View File

@ -49,7 +49,7 @@ public class Damage{
if(damage){ if(damage){
for(int i = 0; i < Mathf.clamp(power / 700, 0, 8); i++){ for(int i = 0; i < Mathf.clamp(power / 700, 0, 8); i++){
int length = 5 + Mathf.clamp((int)(power / 500), 1, 20); int length = 5 + Mathf.clamp((int)(power / 500), 1, 20);
Time.run(i * 0.8f + Mathf.random(4f), () -> Lightning.create(Team.derelict, Pal.power, 3, x, y, Mathf.random(360f), length + Mathf.range(2))); Time.run(i * 0.8f + Mathf.random(4f), () -> Lightning.create(Team.derelict, Pal.power, 3 + Mathf.pow(power, 0.35f), x, y, Mathf.random(360f), length + Mathf.range(2)));
} }
if(fire){ if(fire){