From 8949fd279e364eb0dca3d8f771a36ccdc370a85a Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 24 Aug 2021 09:28:51 -0400 Subject: [PATCH] Build error fix / Anuken/Mindustry-Suggestions/issues/2897 --- build.gradle | 16 +++++++++++----- core/src/mindustry/content/Blocks.java | 2 ++ core/src/mindustry/entities/Damage.java | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 08aed65042..f9d2cf3568 100644 --- a/build.gradle +++ b/build.gradle @@ -41,8 +41,8 @@ buildscript{ } plugins{ - id 'org.jetbrains.kotlin.jvm' version '1.4.32' - id "org.jetbrains.kotlin.kapt" version "1.4.32" + id 'org.jetbrains.kotlin.jvm' version '1.5.21' + id "org.jetbrains.kotlin.kapt" version "1.5.21" } allprojects{ @@ -219,10 +219,16 @@ allprojects{ options.compilerArgs += ["-Xlint:deprecation"] 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.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' + ] } } diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 515d89a2f8..b5566e463a 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1158,12 +1158,14 @@ public class Blocks implements ContentList{ battery = new Battery("battery"){{ requirements(Category.power, with(Items.copper, 5, Items.lead, 20)); consumes.powerBuffered(4000f); + baseExplosiveness = 1f; }}; batteryLarge = new Battery("battery-large"){{ requirements(Category.power, with(Items.titanium, 20, Items.lead, 40, Items.silicon, 20)); size = 3; consumes.powerBuffered(50000f); + baseExplosiveness = 5f; }}; combustionGenerator = new BurnerGenerator("combustion-generator"){{ diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index 7c69b06cb2..1d04148a84 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -49,7 +49,7 @@ public class Damage{ if(damage){ for(int i = 0; i < Mathf.clamp(power / 700, 0, 8); i++){ 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){