Bugfixes
This commit is contained in:
@@ -44,6 +44,11 @@ public class LaserTurret extends PowerTurret{
|
||||
Bulletc bullet;
|
||||
float bulletLife;
|
||||
|
||||
@Override
|
||||
protected void updateCooling(){
|
||||
//do nothing, cooling is irrelevant here
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTile(){
|
||||
super.updateTile();
|
||||
|
||||
@@ -174,7 +174,7 @@ public class PayloadConveyor extends Block{
|
||||
@Override
|
||||
public boolean acceptPayload(Tilec source, Payload payload){
|
||||
//accepting payloads from units isn't supported
|
||||
return this.item == null && progress <= 5f && source != this;
|
||||
return this.item == null && progress <= 5f && source != this && payload.fits();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,6 +33,11 @@ public class BlockPayload implements Payload{
|
||||
tile.setBlock(entity.block(), entity.team(), rotation, () -> entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean fits(){
|
||||
return entity.block().size < 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
write.b(payloadBlock);
|
||||
|
||||
@@ -22,6 +22,11 @@ public interface Payload{
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @return whether this payload fits on a standard 3x3 conveyor. */
|
||||
default boolean fits(){
|
||||
return true;
|
||||
}
|
||||
|
||||
/** writes the payload for saving. */
|
||||
void write(Writes write);
|
||||
|
||||
|
||||
@@ -15,6 +15,11 @@ public class UnitPayload implements Payload{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean fits(){
|
||||
return unit.hitSize() <= 16f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
write.b(payloadUnit);
|
||||
|
||||
Reference in New Issue
Block a user