Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: core/src/mindustry/content/Blocks.java
This commit is contained in:
@@ -144,6 +144,14 @@ public class MinimapRenderer{
|
||||
public void update(Tile tile){
|
||||
if(world.isGenerating() || !state.isGame()) return;
|
||||
|
||||
if(tile.build != null && tile.isCenter()){
|
||||
tile.getLinkedTiles(other -> {
|
||||
if(!other.isCenter()){
|
||||
update(other);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
int color = colorFor(tile);
|
||||
pixmap.set(tile.x, pixmap.height - 1 - tile.y, color);
|
||||
|
||||
|
||||
@@ -26,6 +26,10 @@ public class MultiPacker implements Disposable{
|
||||
return null;
|
||||
}
|
||||
|
||||
public PixmapPacker getPacker(PageType type){
|
||||
return packers[type.ordinal()];
|
||||
}
|
||||
|
||||
public boolean has(String name){
|
||||
for(var page : PageType.all){
|
||||
if(packers[page.ordinal()].getRect(name) != null){
|
||||
@@ -70,8 +74,9 @@ public class MultiPacker implements Disposable{
|
||||
//main page (sprites.png) - all sprites for units, weapons, placeable blocks, effects, bullets, etc
|
||||
//environment page (sprites2.png) - all sprites for things in the environmental cache layer
|
||||
//editor page (sprites3.png) - all sprites needed for rendering in the editor, including block icons and a few minor sprites
|
||||
//zone page (sprites4.png) - zone previews
|
||||
//ui page (sprites5.png) - content icons, white icons and UI elements
|
||||
//zone page (sprites4.png) - zone preview
|
||||
//rubble page - scorch textures for unit deaths & wrecks
|
||||
//ui page (sprites5.png) - content icons, white icons, fonts and UI elements
|
||||
public enum PageType{
|
||||
main(4096),
|
||||
environment,
|
||||
|
||||
@@ -40,6 +40,7 @@ public class Trail{
|
||||
float[] items = points.items;
|
||||
int i = points.size - 3;
|
||||
float x1 = items[i], y1 = items[i + 1], w1 = items[i + 2], w = w1 * width / (points.size/3) * i/3f * 2f;
|
||||
if(w1 <= 0.001f) return;
|
||||
Draw.rect("hcircle", x1, y1, w, w, -Mathf.radDeg * lastAngle + 180f);
|
||||
Draw.reset();
|
||||
}
|
||||
@@ -56,6 +57,7 @@ public class Trail{
|
||||
float size = width / (points.size/3);
|
||||
float z1 = lastAngle;
|
||||
float z2 = -Angles.angleRad(x2, y2, lx, ly);
|
||||
if(w1 <= 0.001f || w2 <= 0.001f) continue;
|
||||
|
||||
float cx = Mathf.sin(z1) * i/3f * size * w1, cy = Mathf.cos(z1) * i/3f * size * w1,
|
||||
nx = Mathf.sin(z2) * (i/3f + 1) * size * w2, ny = Mathf.cos(z2) * (i/3f + 1) * size * w2;
|
||||
|
||||
Reference in New Issue
Block a user