diff --git a/core/src/mindustry/ai/types/MinerAI.java b/core/src/mindustry/ai/types/MinerAI.java index c15e8485bf..6646124942 100644 --- a/core/src/mindustry/ai/types/MinerAI.java +++ b/core/src/mindustry/ai/types/MinerAI.java @@ -25,6 +25,7 @@ public class MinerAI extends AIController{ if(ore != null && !unit.validMine(ore)){ ore = null; + unit.mineTile = null; } if(mining){ diff --git a/core/src/mindustry/content/TechTree.java b/core/src/mindustry/content/TechTree.java index 933f0e6c45..b782b8204d 100644 --- a/core/src/mindustry/content/TechTree.java +++ b/core/src/mindustry/content/TechTree.java @@ -127,6 +127,7 @@ public class TechTree{ }); content.techNode = this; + content.techNodes.add(this); all.add(this); } diff --git a/core/src/mindustry/ctype/UnlockableContent.java b/core/src/mindustry/ctype/UnlockableContent.java index bab283dc93..faf53c8363 100644 --- a/core/src/mindustry/ctype/UnlockableContent.java +++ b/core/src/mindustry/ctype/UnlockableContent.java @@ -6,6 +6,7 @@ import arc.graphics.*; import arc.graphics.g2d.*; import arc.graphics.g2d.TextureAtlas.*; import arc.scene.ui.layout.*; +import arc.struct.*; import arc.util.*; import mindustry.annotations.Annotations.*; import mindustry.content.TechTree.*; @@ -44,6 +45,8 @@ public abstract class UnlockableContent extends MappableContent{ public TextureRegion fullIcon; /** The tech tree node for this content, if applicable. Null if not part of a tech tree. */ public @Nullable TechNode techNode; + /** Tech nodes for all trees that this content is part of. */ + public Seq techNodes = new Seq<>(); /** Unlock state. Loaded from settings. Do not modify outside of the constructor. */ protected boolean unlocked; diff --git a/core/src/mindustry/entities/EntityCollisions.java b/core/src/mindustry/entities/EntityCollisions.java index c3746c40cc..1dfc9ef86f 100644 --- a/core/src/mindustry/entities/EntityCollisions.java +++ b/core/src/mindustry/entities/EntityCollisions.java @@ -81,8 +81,8 @@ public class EntityCollisions{ if(tmp.overlaps(r1)){ Vec2 v = Geometry.overlap(r1, tmp, x); - if(x) r1.x += v.x; - if(!x) r1.y += v.y; + r1.x += v.x; + r1.y += v.y; } } } diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index cbbf2cdf4c..ed90b0a047 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -105,8 +105,9 @@ public class Mods implements Loadable{ Fi dest = modDirectory.child(finalName + ".zip"); - file.copyTo(dest); try{ + file.copyTo(dest); + var loaded = loadMod(dest, true, true); mods.add(loaded); //invalidate ordered mods cache diff --git a/gradle.properties b/gradle.properties index d0d37c4167..3b49292442 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=f0ed7ae5d4 +archash=e0e7849952