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.
+1 -1
View File
@@ -16,7 +16,7 @@ public class FlyingAI extends AIController{
moveTo(target, unit.range() * 0.8f); moveTo(target, unit.range() * 0.8f);
unit.lookAt(target); unit.lookAt(target);
}else{ }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 totalItems -> items == null ? 0 : items.total();
case totalLiquids -> liquids == null ? 0 : liquids.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 totalPower -> power == null || !block.consumes.hasPower() ? 0 : power.status * (block.consumes.getPower().buffered ? block.consumes.getPower().capacity : 1f);
case itemCapacity -> block.itemCapacity; case itemCapacity -> block.hasItems ? block.itemCapacity : 0;
case liquidCapacity -> block.liquidCapacity; case liquidCapacity -> block.hasLiquids ? block.liquidCapacity : 0;
case powerCapacity -> block.consumes.hasPower() ? block.consumes.getPower().capacity : 0f; case powerCapacity -> block.consumes.hasPower() ? block.consumes.getPower().capacity : 0f;
case powerNetIn -> power == null ? 0 : power.graph.getLastScaledPowerIn() * 60; case powerNetIn -> power == null ? 0 : power.graph.getLastScaledPowerIn() * 60;
case powerNetOut -> power == null ? 0 : power.graph.getLastScaledPowerOut() * 60; case powerNetOut -> power == null ? 0 : power.graph.getLastScaledPowerOut() * 60;
+2 -4
View File
@@ -29,7 +29,7 @@ import static mindustry.Vars.*;
public class Maps{ public class Maps{
/** List of all built-in maps. Filenames only. */ /** 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 */ /** Maps tagged as PvP */
static final String[] pvpMaps = {"veins", "glacier"}; static final String[] pvpMaps = {"veins", "glacier"};
/** All maps stored in an ordered array. */ /** All maps stored in an ordered array. */
@@ -82,9 +82,7 @@ public class Maps{
} }
public Maps(){ public Maps(){
Events.on(ClientLoadEvent.class, event -> { Events.on(ClientLoadEvent.class, event -> maps.sort());
maps.sort();
});
if(Core.assets != null){ if(Core.assets != null){
((CustomLoader)Core.assets.getLoader(ContentLoader.class)).loaded = this::createAllPreviews; ((CustomLoader)Core.assets.getLoader(ContentLoader.class)).loaded = this::createAllPreviews;
@@ -37,6 +37,10 @@ public class ItemTurret extends Turret{
stats.remove(Stat.itemCapacity); stats.remove(Stat.itemCapacity);
stats.add(Stat.ammo, new AmmoListValue<>(ammoTypes)); stats.add(Stat.ammo, new AmmoListValue<>(ammoTypes));
}
@Override
public void init(){
consumes.add(new ConsumeItemFilter(i -> ammoTypes.containsKey(i)){ consumes.add(new ConsumeItemFilter(i -> ammoTypes.containsKey(i)){
@Override @Override
public void build(Building tile, Table table){ public void build(Building tile, Table table){
@@ -58,6 +62,8 @@ public class ItemTurret extends Turret{
//don't display //don't display
} }
}); });
super.init();
} }
public class ItemTurretBuild extends TurretBuild{ public class ItemTurretBuild extends TurretBuild{