FIx inconsistencies in the diff
This commit is contained in:
@@ -24,14 +24,16 @@ abstract public class BaseConveyor extends Block implements Autotiler{
|
|||||||
|
|
||||||
rotate = true;
|
rotate = true;
|
||||||
update = true;
|
update = true;
|
||||||
|
layer = Layer.overlay;
|
||||||
|
group = BlockGroup.transportation;
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
itemCapacity = 4;
|
itemCapacity = 4;
|
||||||
unloadable = false;
|
|
||||||
layer = Layer.overlay;
|
|
||||||
idleSoundVolume = 0.004f;
|
|
||||||
conveyorPlacement = true;
|
conveyorPlacement = true;
|
||||||
|
entityType = BaseConveyorEntity::new;
|
||||||
|
|
||||||
idleSound = Sounds.conveyor;
|
idleSound = Sounds.conveyor;
|
||||||
group = BlockGroup.transportation;
|
idleSoundVolume = 0.004f;
|
||||||
|
unloadable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -86,7 +88,7 @@ abstract public class BaseConveyor extends Block implements Autotiler{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static abstract class BaseConveyorEntity extends TileEntity{
|
static class BaseConveyorEntity extends TileEntity{
|
||||||
int blendbits;
|
int blendbits;
|
||||||
int blendsclx, blendscly;
|
int blendsclx, blendscly;
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public class CraterConveyor extends BaseConveyor{
|
|||||||
|
|
||||||
public CraterConveyor(String name){
|
public CraterConveyor(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|
||||||
entityType = CraterConveyorEntity::new;
|
entityType = CraterConveyorEntity::new;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,8 +44,8 @@ public class CraterConveyor extends BaseConveyor{
|
|||||||
public void setStats(){
|
public void setStats(){
|
||||||
super.setStats();
|
super.setStats();
|
||||||
|
|
||||||
stats.add(BlockStat.boostEffect, "$blocks.itemcapacity");
|
|
||||||
stats.add(BlockStat.itemsMoved, speed * 60, StatUnit.perSecond);
|
stats.add(BlockStat.itemsMoved, speed * 60, StatUnit.perSecond);
|
||||||
|
stats.add(BlockStat.boostEffect, "$blocks.itemcapacity");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -32,12 +32,14 @@ public class ItemConveyor extends BaseConveyor implements Autotiler{
|
|||||||
|
|
||||||
protected ItemConveyor(String name){
|
protected ItemConveyor(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|
||||||
entityType = ItemConveyorEntity::new;
|
entityType = ItemConveyorEntity::new;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setStats(){
|
public void setStats(){
|
||||||
super.setStats();
|
super.setStats();
|
||||||
|
|
||||||
//have to add a custom calculated speed, since the actual movement speed is apparently not linear
|
//have to add a custom calculated speed, since the actual movement speed is apparently not linear
|
||||||
stats.add(BlockStat.itemsMoved, displayedSpeed, StatUnit.itemsSecond);
|
stats.add(BlockStat.itemsMoved, displayedSpeed, StatUnit.itemsSecond);
|
||||||
stats.add(BlockStat.boostEffect, "$blocks.itemsmoved");
|
stats.add(BlockStat.boostEffect, "$blocks.itemsmoved");
|
||||||
@@ -164,10 +166,10 @@ public class ItemConveyor extends BaseConveyor implements Autotiler{
|
|||||||
public Block getReplacement(BuildRequest req, Array<BuildRequest> requests){
|
public Block getReplacement(BuildRequest req, Array<BuildRequest> requests){
|
||||||
Boolf<Point2> cont = p -> requests.contains(o -> o.x == req.x + p.x && o.y == req.y + p.y && o.rotation == req.rotation && (req.block instanceof ItemConveyor || req.block instanceof Junction));
|
Boolf<Point2> cont = p -> requests.contains(o -> o.x == req.x + p.x && o.y == req.y + p.y && o.rotation == req.rotation && (req.block instanceof ItemConveyor || req.block instanceof Junction));
|
||||||
return cont.get(Geometry.d4(req.rotation)) &&
|
return cont.get(Geometry.d4(req.rotation)) &&
|
||||||
cont.get(Geometry.d4(req.rotation - 2)) &&
|
cont.get(Geometry.d4(req.rotation - 2)) &&
|
||||||
req.tile() != null &&
|
req.tile() != null &&
|
||||||
req.tile().block() instanceof ItemConveyor &&
|
req.tile().block() instanceof ItemConveyor &&
|
||||||
Mathf.mod(req.tile().rotation() - req.rotation, 2) == 1 ? Blocks.junction : this;
|
Mathf.mod(req.tile().rotation() - req.rotation, 2) == 1 ? Blocks.junction : this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -266,11 +268,6 @@ public class ItemConveyor extends BaseConveyor implements Autotiler{
|
|||||||
int lastInserted, mid;
|
int lastInserted, mid;
|
||||||
float minitem = 1;
|
float minitem = 1;
|
||||||
|
|
||||||
int blendbits;
|
|
||||||
int blendsclx, blendscly;
|
|
||||||
|
|
||||||
float clogHeat = 0f;
|
|
||||||
|
|
||||||
final void add(int o){
|
final void add(int o){
|
||||||
for(int i = Math.max(o + 1, len); i > o; i--){
|
for(int i = Math.max(o + 1, len); i > o; i--){
|
||||||
ids[i] = ids[i - 1];
|
ids[i] = ids[i - 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user