how did this compile
This commit is contained in:
@@ -981,7 +981,7 @@ public class Blocks implements ContentList{
|
|||||||
consumes.power(1.75f);
|
consumes.power(1.75f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
massConveyor = new MassConveyor("mass-conveyor"){{
|
massConveyor = new PayloadConveyor("mass-conveyor"){{
|
||||||
requirements(Category.distribution, ItemStack.with(Items.copper, 1));
|
requirements(Category.distribution, ItemStack.with(Items.copper, 1));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import arc.graphics.Texture.*;
|
|||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.graphics.gl.*;
|
import arc.graphics.gl.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.gen.*;
|
|
||||||
|
|
||||||
import static arc.Core.*;
|
import static arc.Core.*;
|
||||||
import static mindustry.Vars.renderer;
|
import static mindustry.Vars.renderer;
|
||||||
@@ -44,7 +43,8 @@ public class Pixelator implements Disposable{
|
|||||||
Draw.rect(buffer);
|
Draw.rect(buffer);
|
||||||
Draw.blend();
|
Draw.blend();
|
||||||
|
|
||||||
Groups.drawNames();
|
//TODO set all of this up
|
||||||
|
//Groups.drawNames();
|
||||||
|
|
||||||
Core.camera.position.set(px, py);
|
Core.camera.position.set(px, py);
|
||||||
renderer.setScale(pre);
|
renderer.setScale(pre);
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public class BuildBlock extends Block{
|
|||||||
this.size = size;
|
this.size = size;
|
||||||
update = true;
|
update = true;
|
||||||
health = 20;
|
health = 20;
|
||||||
layer = Layer.placement;
|
|
||||||
consumesTap = true;
|
consumesTap = true;
|
||||||
solidifes = true;
|
solidifes = true;
|
||||||
buildBlocks[size - 1] = this;
|
buildBlocks[size - 1] = this;
|
||||||
@@ -180,10 +179,9 @@ public class BuildBlock extends Block{
|
|||||||
if(Core.atlas.isFound(previous.icon(Cicon.full))){
|
if(Core.atlas.isFound(previous.icon(Cicon.full))){
|
||||||
Draw.rect(previous.icon(Cicon.full), x, y, previous.rotate ? tile.rotation() * 90 : 0);
|
Draw.rect(previous.icon(Cicon.full), x, y, previous.rotate ? tile.rotation() * 90 : 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
Draw.draw(Layer.blockBuilding, () -> {
|
||||||
public void drawLayer(){
|
Draw.shader(Shaders.blockbuild);
|
||||||
Shaders.blockbuild.color = Pal.accent;
|
Shaders.blockbuild.color = Pal.accent;
|
||||||
|
|
||||||
Block target = cblock == null ? previous : cblock;
|
Block target = cblock == null ? previous : cblock;
|
||||||
@@ -197,6 +195,7 @@ public class BuildBlock extends Block{
|
|||||||
Draw.rect(region, x, y, target.rotate ? tile.rotation() * 90 : 0);
|
Draw.rect(region, x, y, target.rotate ? tile.rotation() * 90 : 0);
|
||||||
Draw.flush();
|
Draw.flush();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean construct(Unitc builder, @Nullable Tilec core, float amount, boolean configured){
|
public boolean construct(Unitc builder, @Nullable Tilec core, float amount, boolean configured){
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ public class LiquidTurret extends Turret{
|
|||||||
public class LiquidTurretEntity extends TurretEntity{
|
public class LiquidTurretEntity extends TurretEntity{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawLayer(){
|
public void draw(){
|
||||||
super.drawLayer();
|
super.draw();
|
||||||
|
|
||||||
if(Core.atlas.isFound(reg(liquidRegion))){
|
if(Core.atlas.isFound(reg(liquidRegion))){
|
||||||
Draw.color(liquids.current().color);
|
Draw.color(liquids.current().color);
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ public abstract class Turret extends Block{
|
|||||||
priority = TargetPriority.turret;
|
priority = TargetPriority.turret;
|
||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
layer = Layer.turret;
|
|
||||||
group = BlockGroup.turrets;
|
group = BlockGroup.turrets;
|
||||||
flags = EnumSet.of(BlockFlag.turret);
|
flags = EnumSet.of(BlockFlag.turret);
|
||||||
outlineIcon = true;
|
outlineIcon = true;
|
||||||
@@ -127,10 +126,9 @@ public abstract class Turret extends Block{
|
|||||||
public void draw(){
|
public void draw(){
|
||||||
Draw.rect(baseRegion, x, y);
|
Draw.rect(baseRegion, x, y);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
Draw.z(Layer.turret);
|
||||||
public void drawLayer(){
|
|
||||||
tr2.trns(rotation, -recoil);
|
tr2.trns(rotation, -recoil);
|
||||||
|
|
||||||
drawer.get(this);
|
drawer.get(this);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import arc.*;
|
|||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
|
import mindustry.graphics.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
@@ -17,7 +18,11 @@ public class ExtendingItemBridge extends ItemBridge{
|
|||||||
|
|
||||||
public class ExtendingItemBridgeEntity extends ItemBridgeEntity{
|
public class ExtendingItemBridgeEntity extends ItemBridgeEntity{
|
||||||
@Override
|
@Override
|
||||||
public void drawLayer(){
|
public void draw(){
|
||||||
|
super.draw();
|
||||||
|
|
||||||
|
Draw.z(Layer.power);
|
||||||
|
|
||||||
Tile other = world.tile(link);
|
Tile other = world.tile(link);
|
||||||
if(!linkValid(tile, other)) return;
|
if(!linkValid(tile, other)) return;
|
||||||
|
|
||||||
|
|||||||
@@ -229,7 +229,11 @@ public class ItemBridge extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawLayer(){
|
public void draw(){
|
||||||
|
super.draw();
|
||||||
|
|
||||||
|
Draw.z(Layer.power);
|
||||||
|
|
||||||
Tile other = world.tile(link);
|
Tile other = world.tile(link);
|
||||||
if(!linkValid(tile, other)) return;
|
if(!linkValid(tile, other)) return;
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ public class MassDriver extends Block{
|
|||||||
solid = true;
|
solid = true;
|
||||||
configurable = true;
|
configurable = true;
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
layer = Layer.turret;
|
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
outlineIcon = true;
|
outlineIcon = true;
|
||||||
//point2 is relative
|
//point2 is relative
|
||||||
@@ -187,10 +186,9 @@ public class MassDriver extends Block{
|
|||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
Draw.rect(baseRegion, x, y);
|
Draw.rect(baseRegion, x, y);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
Draw.z(Layer.turret);
|
||||||
public void drawLayer(){
|
|
||||||
Draw.rect(region,
|
Draw.rect(region,
|
||||||
x + Angles.trnsx(rotation + 180f, reload * knockback),
|
x + Angles.trnsx(rotation + 180f, reload * knockback),
|
||||||
y + Angles.trnsy(rotation + 180f, reload * knockback), rotation - 90);
|
y + Angles.trnsy(rotation + 180f, reload * knockback), rotation - 90);
|
||||||
|
|||||||
@@ -17,15 +17,14 @@ import mindustry.world.blocks.payloads.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
//TODO rename
|
//TODO rename
|
||||||
public class MassConveyor extends Block{
|
public class PayloadConveyor extends Block{
|
||||||
public float moveTime = 70f;
|
public float moveTime = 70f;
|
||||||
public TextureRegion topRegion, edgeRegion;
|
public TextureRegion topRegion, edgeRegion;
|
||||||
public Interpolation interp = Interpolation.pow5;
|
public Interpolation interp = Interpolation.pow5;
|
||||||
|
|
||||||
public MassConveyor(String name){
|
public PayloadConveyor(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|
||||||
layer = Layer.overlay;
|
|
||||||
size = 3;
|
size = 3;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
update = true;
|
update = true;
|
||||||
@@ -161,14 +160,8 @@ public class MassConveyor extends Block{
|
|||||||
Draw.rect(edgeRegion, x, y, i * 90);
|
Draw.rect(edgeRegion, x, y, i * 90);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
Draw.z(Layer.blockOver);
|
||||||
public void drawLayer(){
|
|
||||||
//fract:
|
|
||||||
//0: arriving
|
|
||||||
//0.5: middle
|
|
||||||
//1: leaving
|
|
||||||
|
|
||||||
if(animation > fract()){
|
if(animation > fract()){
|
||||||
animation = Mathf.lerp(animation, 0.8f, 0.15f);
|
animation = Mathf.lerp(animation, 0.8f, 0.15f);
|
||||||
@@ -177,7 +170,7 @@ public class MassConveyor extends Block{
|
|||||||
animation = Math.max(animation, fract());
|
animation = Math.max(animation, fract());
|
||||||
|
|
||||||
float fract = animation;
|
float fract = animation;
|
||||||
float rot = Mathf.slerp(itemRotation, rotation() * 90, fract);
|
rot = Mathf.slerp(itemRotation, rotation() * 90, fract);
|
||||||
|
|
||||||
if(fract < 0.5f){
|
if(fract < 0.5f){
|
||||||
Tmp.v1.trns(itemRotation + 180, (0.5f - fract) * tilesize * size);
|
Tmp.v1.trns(itemRotation + 180, (0.5f - fract) * tilesize * size);
|
||||||
@@ -11,15 +11,12 @@ public class TreeBlock extends Block{
|
|||||||
public TreeBlock(String name){
|
public TreeBlock(String name){
|
||||||
super(name);
|
super(name);
|
||||||
solid = true;
|
solid = true;
|
||||||
layer = Layer.power;
|
|
||||||
expanded = true;
|
expanded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawBase(Tile tile){}
|
public void drawBase(Tile tile){
|
||||||
|
Draw.z(Layer.power + 1);
|
||||||
@Override
|
|
||||||
public void drawLayer(Tile tile){
|
|
||||||
Draw.rect(region, tile.worldx(), tile.worldy(), Mathf.randomSeed(tile.pos(), 0, 4) * 90);
|
Draw.rect(region, tile.worldx(), tile.worldy(), Mathf.randomSeed(tile.pos(), 0, 4) * 90);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ public class PowerNode extends PowerBlock{
|
|||||||
public PowerNode(String name){
|
public PowerNode(String name){
|
||||||
super(name);
|
super(name);
|
||||||
expanded = true;
|
expanded = true;
|
||||||
layer = Layer.power;
|
|
||||||
configurable = true;
|
configurable = true;
|
||||||
consumesPower = false;
|
consumesPower = false;
|
||||||
outputsPower = false;
|
outputsPower = false;
|
||||||
@@ -372,9 +371,13 @@ public class PowerNode extends PowerBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawLayer(){
|
public void draw(){
|
||||||
|
super.draw();
|
||||||
|
|
||||||
if(Core.settings.getInt("lasersopacity") == 0) return;
|
if(Core.settings.getInt("lasersopacity") == 0) return;
|
||||||
|
|
||||||
|
Draw.z(Layer.power);
|
||||||
|
|
||||||
for(int i = 0; i < power.links.size; i++){
|
for(int i = 0; i < power.links.size; i++){
|
||||||
Tilec link = world.ent(power.links.get(i));
|
Tilec link = world.ent(power.links.get(i));
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ public class Drill extends Block{
|
|||||||
super(name);
|
super(name);
|
||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
layer = Layer.overlay;
|
|
||||||
group = BlockGroup.drills;
|
group = BlockGroup.drills;
|
||||||
hasLiquids = true;
|
hasLiquids = true;
|
||||||
liquidCapacity = 5f;
|
liquidCapacity = 5f;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package mindustry.world.blocks.production;
|
|||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import mindustry.graphics.*;
|
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
@@ -20,7 +19,6 @@ public class Pump extends LiquidBlock{
|
|||||||
|
|
||||||
public Pump(String name){
|
public Pump(String name){
|
||||||
super(name);
|
super(name);
|
||||||
layer = Layer.overlay;
|
|
||||||
group = BlockGroup.liquids;
|
group = BlockGroup.liquids;
|
||||||
floating = true;
|
floating = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,8 +193,11 @@ public class CoreBlock extends StorageBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawLayer(){
|
public void draw(){
|
||||||
|
super.draw();
|
||||||
|
|
||||||
if(heat > 0.001f){
|
if(heat > 0.001f){
|
||||||
|
Draw.z(Layer.blockOver);
|
||||||
Drawf.drawRespawn(this, heat, progress, time, unitType, lastRequested);
|
Drawf.drawRespawn(this, heat, progress, time, unitType, lastRequested);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ public class RepairPoint extends Block{
|
|||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
flags = EnumSet.of(BlockFlag.repair);
|
flags = EnumSet.of(BlockFlag.repair);
|
||||||
layer = Layer.turret;
|
|
||||||
layer2 = Layer.power;
|
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
outlineIcon = true;
|
outlineIcon = true;
|
||||||
}
|
}
|
||||||
@@ -75,17 +73,12 @@ public class RepairPoint extends Block{
|
|||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
Draw.rect(baseRegion, x, y);
|
Draw.rect(baseRegion, x, y);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
Draw.z(Layer.turret);
|
||||||
public void drawLayer(){
|
|
||||||
Draw.rect(region, x, y, rotation - 90);
|
Draw.rect(region, x, y, rotation - 90);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
if(target != null && Angles.angleDist(angleTo(target), rotation) < 30f){
|
||||||
public void drawLayer2(){
|
Draw.z(Layer.power);
|
||||||
if(target != null &&
|
|
||||||
Angles.angleDist(angleTo(target), rotation) < 30f){
|
|
||||||
float ang = angleTo(target);
|
float ang = angleTo(target);
|
||||||
float len = 5f;
|
float len = 5f;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=7c888f92ae770e9dc3b07439c32f64cc67c2a6a6
|
archash=ea82048b8e19cab088c1adff13e631599469ad12
|
||||||
|
|||||||
Reference in New Issue
Block a user