Possible corner death fix

This commit is contained in:
Anuken
2023-08-29 17:51:45 -04:00
parent 16223af87d
commit e3b815a4c6
6 changed files with 10 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ public class MinerAI extends AIController{
if(ore != null && !unit.validMine(ore)){
ore = null;
unit.mineTile = null;
}
if(mining){

View File

@@ -127,6 +127,7 @@ public class TechTree{
});
content.techNode = this;
content.techNodes.add(this);
all.add(this);
}

View File

@@ -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<TechNode> techNodes = new Seq<>();
/** Unlock state. Loaded from settings. Do not modify outside of the constructor. */
protected boolean unlocked;

View File

@@ -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;
}
}
}

View File

@@ -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