From b3f0e9399d94c3aa8f32d1a5f16a83cc361a3f5b Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 24 Nov 2025 17:29:36 -0500 Subject: [PATCH] Fixed tests --- core/src/mindustry/world/Block.java | 3 ++- gradle.properties | 2 +- tests/src/test/java/PatcherTests.java | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 87e68b7471..f5ddcfc8ee 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -95,8 +95,9 @@ public class Block extends UnlockableContent implements Senseable{ /** if true, double-tapping this configurable block clears configuration. */ public boolean clearOnDoubleTap = false; /** whether this block has a tile entity that updates */ + @NoPatch public boolean update; - /** whether this block has health and can be destroyed */ + /** whether this block has health and can be destroyed. note that setting this to false does nothing if update = true! */ public boolean destructible; /** whether unloaders work on this block */ public boolean unloadable = true; diff --git a/gradle.properties b/gradle.properties index b368b24836..52dee672d2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ org.gradle.caching=true org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 android.enableR8.fullMode=false -archash=65d654d634 +archash=f3e8138078 diff --git a/tests/src/test/java/PatcherTests.java b/tests/src/test/java/PatcherTests.java index ad51d1bfc8..35f9e00854 100644 --- a/tests/src/test/java/PatcherTests.java +++ b/tests/src/test/java/PatcherTests.java @@ -480,6 +480,7 @@ public class PatcherTests{ @Test void addWeapon() throws Exception{ + int oldSize = UnitTypes.flare.weapons.size; Vars.state.patcher.apply(Seq.with(""" unit.flare.weapons.+: { x: 0 @@ -493,7 +494,7 @@ public class PatcherTests{ """)); assertNoWarnings(); - assertEquals(3, UnitTypes.flare.weapons.size); + assertEquals(oldSize + 1, UnitTypes.flare.weapons.size); assertEquals(100, UnitTypes.flare.weapons.peek().bullet.damage); }