mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-13 00:05:23 +07:00
Mod pregenerated meta option
This commit is contained in:
parent
ac93539a5c
commit
7f5095921a
@ -21,7 +21,9 @@ public class Drawf{
|
||||
|
||||
/** Bleeds a mod pixmap if linear filtering is enabled. */
|
||||
public static void checkBleed(Pixmap pixmap){
|
||||
if(Core.settings.getBool("linear", true)) Pixmaps.bleed(pixmap);
|
||||
if(Core.settings.getBool("linear", true)){
|
||||
Pixmaps.bleed(pixmap);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO offset unused
|
||||
|
@ -180,7 +180,7 @@ public class Mods implements Loadable{
|
||||
}
|
||||
|
||||
private void packSprites(Seq<Fi> sprites, LoadedMod mod, boolean prefix, Seq<Future<Runnable>> tasks){
|
||||
boolean linear = Core.settings.getBool("linear", true);
|
||||
boolean bleed = Core.settings.getBool("linear", true) && !mod.meta.pregenerated;
|
||||
|
||||
for(Fi file : sprites){
|
||||
String name = file.nameWithoutExtension();
|
||||
@ -204,7 +204,7 @@ public class Mods implements Loadable{
|
||||
try{
|
||||
Pixmap pix = new Pixmap(file.readBytes());
|
||||
//only bleeds when linear filtering is on at startup
|
||||
if(linear){
|
||||
if(bleed){
|
||||
Pixmaps.bleed(pix, 2);
|
||||
}
|
||||
//this returns a *runnable* which actually packs the resulting pixmap; this has to be done synchronously outside the method
|
||||
@ -336,7 +336,7 @@ public class Mods implements Loadable{
|
||||
if(c instanceof UnlockableContent u && c.minfo.mod != null){
|
||||
u.load();
|
||||
u.loadIcon();
|
||||
if(u.generateIcons){
|
||||
if(u.generateIcons && !c.minfo.mod.meta.pregenerated){
|
||||
u.createIcons(packer);
|
||||
}
|
||||
}
|
||||
@ -1141,6 +1141,8 @@ public class Mods implements Loadable{
|
||||
public boolean java;
|
||||
/** If true, -outline regions for units are kept when packing. Only use if you know exactly what you are doing. */
|
||||
public boolean keepOutlines;
|
||||
/** If true, bleeding is skipped and no content icons are generated. */
|
||||
public boolean pregenerated;
|
||||
|
||||
public String displayName(){
|
||||
return displayName == null ? name : displayName;
|
||||
|
@ -19,7 +19,7 @@ public class CellLiquid extends Liquid{
|
||||
public int cells = 8;
|
||||
|
||||
public @Nullable Liquid spreadTarget;
|
||||
public float maxSpread = 0.5f, spreadConversion = 1f, spreadDamage = 0.1f, removeScaling = 0.25f;
|
||||
public float maxSpread = 0.75f, spreadConversion = 1f, spreadDamage = 0.1f, removeScaling = 0.25f;
|
||||
|
||||
public CellLiquid(String name, Color color){
|
||||
super(name, color);
|
||||
|
@ -123,7 +123,7 @@ public class Planet extends UnlockableContent{
|
||||
public Seq<Planet> children = new Seq<>();
|
||||
/** Default root node shown when the tech tree is opened here. */
|
||||
public @Nullable TechNode techTree;
|
||||
/** Planets that can be launched to from this one. Made mutual in init(). */
|
||||
/** TODO remove? Planets that can be launched to from this one. Made mutual in init(). */
|
||||
public Seq<Planet> launchCandidates = new Seq<>();
|
||||
/** Items not available on this planet. */
|
||||
public Seq<Item> hiddenItems = new Seq<>();
|
||||
|
@ -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=829da164e7
|
||||
archash=1ecc58862e
|
||||
|
Loading…
Reference in New Issue
Block a user