diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index f5f87f476f..0f4e9e4e4a 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -186,7 +186,8 @@ public class Mods implements Loadable{ //TODO !!! document this on the wiki !!! //do not allow packing standard outline sprites for now, they are no longer necessary and waste space! - if(prefix && name.endsWith("-outline")) continue; + //TODO also full regions are bad: || name.endsWith("-full") + if(prefix && (name.endsWith("-outline"))) continue; //read and bleed pixmaps in parallel tasks.add(mainExecutor.submit(() -> { @@ -314,6 +315,7 @@ public class Mods implements Loadable{ //generate new icons for(Seq arr : content.getContentMap()){ arr.each(c -> { + //TODO this can be done in parallel if(c instanceof UnlockableContent u && c.minfo.mod != null){ u.load(); u.loadIcon(); diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index f75d2db98e..1f11ebb3a9 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -655,14 +655,18 @@ public class UnitType extends UnlockableContent{ } } - //currently does not create outlines for legs or base regions due to older mods having them outlined by default if(outlines){ - //outlines only created when forced at the moment - makeOutline(PageType.main, packer, region, alwaysCreateOutline, outlineColor, outlineRadius); + //note that mods with these regions already outlined will have *two* outlines made, which is... undesirable + for(var outlineTarget : new TextureRegion[]{region, jointRegion, footRegion, legBaseRegion, baseJointRegion, legRegion, treadRegion}){ + if(!outlineTarget.found()) continue; + + makeOutline(PageType.main, packer, outlineTarget, alwaysCreateOutline && region == outlineTarget, outlineColor, outlineRadius); + } for(Weapon weapon : weapons){ if(!weapon.name.isEmpty()){ + //TODO makeNew isn't really necessary here is it makeOutline(PageType.main, packer, weapon.region, true, outlineColor, outlineRadius); } } diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 4c6de9b94d..bd93efcdc2 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -451,4 +451,9 @@ public class Weapon implements Cloneable{ } } + @Override + public String toString(){ + return name == null || name.isEmpty() ? "Weapon" : "Weapon: " + name; + } + }