mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-10 15:57:37 +07:00
Logic sprite upper limit now 64
This commit is contained in:
@ -27,7 +27,7 @@ import static mindustry.Vars.*;
|
|||||||
import static mindustry.tools.ImagePacker.*;
|
import static mindustry.tools.ImagePacker.*;
|
||||||
|
|
||||||
public class Generators{
|
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){
|
private static float fluid(boolean gas, double x, double y, float frame){
|
||||||
int keyframes = gas ? 4 : 3;
|
int keyframes = gas ? 4 : 3;
|
||||||
@ -44,9 +44,7 @@ public class Generators{
|
|||||||
}else{ //liquids
|
}else{ //liquids
|
||||||
float min = 0.84f;
|
float min = 0.84f;
|
||||||
double rx = (x + frame*32) % 32, ry = (y + frame*32) % 32;
|
double rx = (x + frame*32) % 32, ry = (y + frame*32) % 32;
|
||||||
//rx = x; ry = y;
|
float interpolated = (float)liquidFrame(rx, ry, 2);
|
||||||
//(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);
|
|
||||||
//only two colors here
|
//only two colors here
|
||||||
return min + (interpolated >= 0.3f ? 1f - min : 0f);
|
return min + (interpolated >= 0.3f ? 1f - min : 0f);
|
||||||
}
|
}
|
||||||
@ -460,7 +458,7 @@ public class Generators{
|
|||||||
base = container.outline(Pal.gray, 3);
|
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");
|
save(base, "../ui/" + item.getContentType().name() + "-" + item.name + "-ui");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -718,7 +716,7 @@ public class Generators{
|
|||||||
Pixmap fit = new Pixmap(maxd, maxd);
|
Pixmap fit = new Pixmap(maxd, maxd);
|
||||||
drawScaledFit(fit, image);
|
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");
|
save(fit, "../ui/unit-" + type.name + "-ui");
|
||||||
}catch(IllegalArgumentException e){
|
}catch(IllegalArgumentException e){
|
||||||
Log.err("WARNING: Skipping unit @: @", type.name, e.getMessage());
|
Log.err("WARNING: Skipping unit @: @", type.name, e.getMessage());
|
||||||
|
Reference in New Issue
Block a user