This commit is contained in:
Anuken 2020-10-21 10:37:03 -04:00
parent 18e6a43a87
commit 3517da8214
5 changed files with 12 additions and 8 deletions

Binary file not shown.

View File

@ -16,7 +16,7 @@ public class FlyingAI extends AIController{
moveTo(target, unit.range() * 0.8f);
unit.lookAt(target);
}else{
attack(100f);
attack(120f);
}
}

View File

@ -1277,8 +1277,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
case totalItems -> items == null ? 0 : items.total();
case totalLiquids -> liquids == null ? 0 : liquids.total();
case totalPower -> power == null || !block.consumes.hasPower() ? 0 : power.status * (block.consumes.getPower().buffered ? block.consumes.getPower().capacity : 1f);
case itemCapacity -> block.itemCapacity;
case liquidCapacity -> block.liquidCapacity;
case itemCapacity -> block.hasItems ? block.itemCapacity : 0;
case liquidCapacity -> block.hasLiquids ? block.liquidCapacity : 0;
case powerCapacity -> block.consumes.hasPower() ? block.consumes.getPower().capacity : 0f;
case powerNetIn -> power == null ? 0 : power.graph.getLastScaledPowerIn() * 60;
case powerNetOut -> power == null ? 0 : power.graph.getLastScaledPowerOut() * 60;

View File

@ -29,7 +29,7 @@ import static mindustry.Vars.*;
public class Maps{
/** List of all built-in maps. Filenames only. */
private static String[] defaultMapNames = {"maze", "fortress", "labyrinth", "islands", "tendrils", "caldera", "wasteland", "shattered", "fork", "triad", "veins", "glacier"};
private static String[] defaultMapNames = {"maze", "fortress", "labyrinth", "islands", "tendrils", "caldera", "wasteland", "shattered", "fork", "triad", "mudFlats", "veins", "glacier"};
/** Maps tagged as PvP */
static final String[] pvpMaps = {"veins", "glacier"};
/** All maps stored in an ordered array. */
@ -82,9 +82,7 @@ public class Maps{
}
public Maps(){
Events.on(ClientLoadEvent.class, event -> {
maps.sort();
});
Events.on(ClientLoadEvent.class, event -> maps.sort());
if(Core.assets != null){
((CustomLoader)Core.assets.getLoader(ContentLoader.class)).loaded = this::createAllPreviews;

View File

@ -37,12 +37,16 @@ public class ItemTurret extends Turret{
stats.remove(Stat.itemCapacity);
stats.add(Stat.ammo, new AmmoListValue<>(ammoTypes));
}
@Override
public void init(){
consumes.add(new ConsumeItemFilter(i -> ammoTypes.containsKey(i)){
@Override
public void build(Building tile, Table table){
MultiReqImage image = new MultiReqImage();
content.items().each(i -> filter.get(i) && i.unlockedNow(), item -> image.add(new ReqImage(new ItemImage(item.icon(Cicon.medium)),
() -> tile != null && !((ItemTurretBuild)tile).ammo.isEmpty() && ((ItemEntry)((ItemTurretBuild)tile).ammo.peek()).item == item)));
() -> tile != null && !((ItemTurretBuild)tile).ammo.isEmpty() && ((ItemEntry)((ItemTurretBuild)tile).ammo.peek()).item == item)));
table.add(image).size(8 * 4);
}
@ -58,6 +62,8 @@ public class ItemTurret extends Turret{
//don't display
}
});
super.init();
}
public class ItemTurretBuild extends TurretBuild{