mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 23:38:10 +07:00
In-game block team display / Editor bugfix
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 83 B After Width: | Height: | Size: 149 B |
@ -8577,7 +8577,7 @@ bar-top
|
|||||||
rotate: false
|
rotate: false
|
||||||
xy: 915, 683
|
xy: 915, 683
|
||||||
size: 27, 36
|
size: 27, 36
|
||||||
split: 9, 9, 9, 9
|
split: 9, 10, 9, 10
|
||||||
orig: 27, 36
|
orig: 27, 36
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 989 KiB After Width: | Height: | Size: 989 KiB |
@ -10,7 +10,7 @@ import io.anuke.mindustry.type.Zone;
|
|||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
|
|
||||||
public class Zones implements ContentList{
|
public class Zones implements ContentList{
|
||||||
public Zone groundZero, craters, frozenForest, ruinousShores, crags, stainedMountains,
|
public static Zone groundZero, craters, frozenForest, ruinousShores, crags, stainedMountains,
|
||||||
impact, desolateRift, arcticDesert, dryWastes, nuclearComplex, moltenFault;
|
impact, desolateRift, arcticDesert, dryWastes, nuclearComplex, moltenFault;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -24,7 +24,7 @@ public class Zones implements ContentList{
|
|||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
waves = true;
|
waves = true;
|
||||||
waveTimer = true;
|
waveTimer = true;
|
||||||
waveSpacing = 60 * 60;
|
waveSpacing = 60 * 60 * 2; //2 mins
|
||||||
spawns = Array.with(
|
spawns = Array.with(
|
||||||
new SpawnGroup(UnitTypes.dagger){{
|
new SpawnGroup(UnitTypes.dagger){{
|
||||||
unitScaling = 2;
|
unitScaling = 2;
|
||||||
|
@ -112,7 +112,7 @@ public class MapRenderer implements Disposable{
|
|||||||
TextureRegion region;
|
TextureRegion region;
|
||||||
|
|
||||||
if(bw != 0){
|
if(bw != 0){
|
||||||
region = wall.icon(Icon.full);
|
region = wall.icon(Icon.full) == Core.atlas.find("____") ? Core.atlas.find("clear") : wall.icon(Icon.full);
|
||||||
|
|
||||||
if(wall.rotate){
|
if(wall.rotate){
|
||||||
mesh.draw((wx % chunksize) + (wy % chunksize) * chunksize, region,
|
mesh.draw((wx % chunksize) + (wy % chunksize) * chunksize, region,
|
||||||
|
@ -47,7 +47,7 @@ public class SpawnGroup{
|
|||||||
}
|
}
|
||||||
float scaling = this.unitScaling;
|
float scaling = this.unitScaling;
|
||||||
|
|
||||||
return Math.min(unitAmount - 1 + Math.max((int) ((wave / spacing) / scaling), 1), max);
|
return Math.min(unitAmount - 1 + Math.max((int) (((wave - begin) / spacing) / scaling), 1), max);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,7 +170,7 @@ public class Waves{
|
|||||||
return spawns;
|
return spawns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void testWaves(int from, int to){
|
public static void testWaves(Array<SpawnGroup> spawns, int from, int to){
|
||||||
for(int i = from; i <= to; i++){
|
for(int i = from; i <= to; i++){
|
||||||
System.out.print(i + ": ");
|
System.out.print(i + ": ");
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
@ -163,8 +163,13 @@ public class BlockRenderer{
|
|||||||
|
|
||||||
if(req.layer == Layer.shadow){
|
if(req.layer == Layer.shadow){
|
||||||
block.drawShadow(req.tile);
|
block.drawShadow(req.tile);
|
||||||
}else if(req.layer == Layer.block){
|
}else if(req.layer == Layer.block){
|
||||||
block.draw(req.tile);
|
block.draw(req.tile);
|
||||||
|
if(block.synthetic() && req.tile.getTeam() != players[0].getTeam()){
|
||||||
|
Draw.color(req.tile.getTeam().color);
|
||||||
|
Draw.rect("block-border", req.tile.drawx() - block.size * tilesize/2f + 4, req.tile.drawy() - block.size * tilesize/2f + 4);
|
||||||
|
Draw.color();
|
||||||
|
}
|
||||||
}else if(req.layer == block.layer){
|
}else if(req.layer == block.layer){
|
||||||
block.drawLayer(req.tile);
|
block.drawLayer(req.tile);
|
||||||
}else if(req.layer == block.layer2){
|
}else if(req.layer == block.layer2){
|
||||||
|
@ -220,11 +220,13 @@ public class PlacementFragment extends Fragment{
|
|||||||
t.add(new Image(lastDisplay.getDisplayIcon(hoverTile))).size(8 * 4);
|
t.add(new Image(lastDisplay.getDisplayIcon(hoverTile))).size(8 * 4);
|
||||||
t.labelWrap(lastDisplay.getDisplayName(hoverTile)).left().width(190f).padLeft(5);
|
t.labelWrap(lastDisplay.getDisplayName(hoverTile)).left().width(190f).padLeft(5);
|
||||||
}).growX().left();
|
}).growX().left();
|
||||||
topTable.row();
|
if(hoverTile.getTeam() == players[0].getTeam()){
|
||||||
topTable.table(t -> {
|
topTable.row();
|
||||||
t.left().defaults().left();
|
topTable.table(t -> {
|
||||||
lastDisplay.display(hoverTile, t);
|
t.left().defaults().left();
|
||||||
}).left().growX();
|
lastDisplay.display(hoverTile, t);
|
||||||
|
}).left().growX();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).colspan(3).fillX().visible(() -> getSelected() != null || tileDisplayBlock() != null).touchable(Touchable.enabled);
|
}).colspan(3).fillX().visible(() -> getSelected() != null || tileDisplayBlock() != null).touchable(Touchable.enabled);
|
||||||
|
Reference in New Issue
Block a user