mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
Fixed #3049
This commit is contained in:
parent
18e6a43a87
commit
3517da8214
BIN
core/assets/maps/mudFlats.msav
Normal file
BIN
core/assets/maps/mudFlats.msav
Normal file
Binary file not shown.
@ -16,7 +16,7 @@ public class FlyingAI extends AIController{
|
||||
moveTo(target, unit.range() * 0.8f);
|
||||
unit.lookAt(target);
|
||||
}else{
|
||||
attack(100f);
|
||||
attack(120f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user