mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-24 13:39:03 +07:00
Logic sprite upper limit now 64
This commit is contained in:
parent
4d200276d2
commit
7ab9c6fd9c
@ -27,7 +27,7 @@ import static mindustry.Vars.*;
|
||||
import static mindustry.tools.ImagePacker.*;
|
||||
|
||||
public class Generators{
|
||||
static final int logicIconSize = (int)iconMed, maxUiIcon = 128;
|
||||
static final int logicIconSize = 64, maxUiIcon = 128;
|
||||
|
||||
private static float fluid(boolean gas, double x, double y, float frame){
|
||||
int keyframes = gas ? 4 : 3;
|
||||
@ -44,9 +44,7 @@ public class Generators{
|
||||
}else{ //liquids
|
||||
float min = 0.84f;
|
||||
double rx = (x + frame*32) % 32, ry = (y + frame*32) % 32;
|
||||
//rx = x; ry = y;
|
||||
//(float)liquidFrame(rx, ry, 0)
|
||||
float interpolated = (float)liquidFrame(rx, ry, 2);//Mathf.lerp((float)liquidFrame(rx, ry, curFrame), (float)liquidFrame(rx, ry, nextFrame), progress);
|
||||
float interpolated = (float)liquidFrame(rx, ry, 2);
|
||||
//only two colors here
|
||||
return min + (interpolated >= 0.3f ? 1f - min : 0f);
|
||||
}
|
||||
@ -460,7 +458,7 @@ public class Generators{
|
||||
base = container.outline(Pal.gray, 3);
|
||||
}
|
||||
|
||||
saveScaled(base, item.name + "-icon-logic", logicIconSize);
|
||||
saveScaled(base, item.name + "-icon-logic", Math.min(logicIconSize, Math.min(base.width, base.height)));
|
||||
save(base, "../ui/" + item.getContentType().name() + "-" + item.name + "-ui");
|
||||
}
|
||||
});
|
||||
@ -718,7 +716,7 @@ public class Generators{
|
||||
Pixmap fit = new Pixmap(maxd, maxd);
|
||||
drawScaledFit(fit, image);
|
||||
|
||||
saveScaled(fit, type.name + "-icon-logic", logicIconSize);
|
||||
saveScaled(fit, type.name + "-icon-logic", Math.min(logicIconSize, Math.min(fit.width, fit.height)));
|
||||
save(fit, "../ui/unit-" + type.name + "-ui");
|
||||
}catch(IllegalArgumentException e){
|
||||
Log.err("WARNING: Skipping unit @: @", type.name, e.getMessage());
|
||||
|
Loading…
Reference in New Issue
Block a user