Bugfixes
This commit is contained in:
@@ -83,7 +83,7 @@ public class Puddles{
|
||||
(liquid.flammability > 0.3f && dest.temperature > 0.7f)){ //flammable liquid + hot liquid
|
||||
Fires.create(tile);
|
||||
if(Mathf.chance(0.006 * amount)){
|
||||
Call.createBullet(Bullets.fireball, Team.derelict, x, y, Mathf.random(360f), -1f, 1f, 1f);
|
||||
Bullets.fireball.createNet(Team.derelict, x, y, Mathf.random(360f), -1f, 1f, 1f);
|
||||
}
|
||||
}else if(dest.temperature > 0.7f && liquid.temperature < 0.55f){ //cold liquid poured onto hot Puddle
|
||||
if(Mathf.chance(0.5f * amount)){
|
||||
|
||||
@@ -270,7 +270,7 @@ public abstract class BulletType extends Content{
|
||||
}
|
||||
|
||||
public void createNet(Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl){
|
||||
Call.createBullet(this, team, x, y, damage, angle, velocityScl, lifetimeScl);
|
||||
Call.createBullet(this, team, x, y, angle, damage, velocityScl, lifetimeScl);
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server, unreliable = true)
|
||||
|
||||
@@ -1070,6 +1070,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canPickup(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public void removeFromProximity(){
|
||||
onProximityRemoved();
|
||||
tmpTiles.clear();
|
||||
|
||||
@@ -126,7 +126,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
if(tile != null && tile.team() == unit.team && pay.payloads().size < unit.type().payloadCapacity
|
||||
&& unit.within(tile, tilesize * tile.block.size * 1.2f)){
|
||||
//pick up block directly
|
||||
if(tile.block().buildVisibility != BuildVisibility.hidden && tile.block().size <= 2){
|
||||
if(tile.block().buildVisibility != BuildVisibility.hidden && tile.block().size <= 2 && tile.canPickup()){
|
||||
pay.pickup(tile);
|
||||
}else{ //pick up block payload
|
||||
Payload current = tile.getPayload();
|
||||
|
||||
@@ -84,7 +84,7 @@ public class Door extends Wall{
|
||||
if(type == LAccess.enabled){
|
||||
boolean shouldOpen = !Mathf.zero(p1);
|
||||
|
||||
if(open == shouldOpen || (Units.anyEntities(tile) && !shouldOpen) || !timer(timerToggle, 60f)){
|
||||
if(open == shouldOpen || (Units.anyEntities(tile) && !shouldOpen) || !origin().timer(timerToggle, 60f)){
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -92,6 +92,10 @@ public class Door extends Wall{
|
||||
}
|
||||
}
|
||||
|
||||
public DoorBuild origin(){
|
||||
return chained.isEmpty() ? this : chained.first();
|
||||
}
|
||||
|
||||
public void effect(){
|
||||
(open ? closefx : openfx).at(this);
|
||||
}
|
||||
@@ -130,7 +134,7 @@ public class Door extends Wall{
|
||||
|
||||
@Override
|
||||
public void tapped(Player player){
|
||||
if((Units.anyEntities(tile) && open) || !timer(timerToggle, 40f)){
|
||||
if((Units.anyEntities(tile) && open) || !origin().timer(timerToggle, 50f)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,12 +43,14 @@ public class LogicDisplay extends Block{
|
||||
public void draw(){
|
||||
super.draw();
|
||||
|
||||
if(buffer == null){
|
||||
buffer = new FrameBuffer(displaySize, displaySize);
|
||||
//clear the buffer - some OSs leave garbage in it
|
||||
buffer.begin(Pal.darkerMetal);
|
||||
buffer.end();
|
||||
}
|
||||
Draw.draw(Draw.z(), () -> {
|
||||
if(buffer == null){
|
||||
buffer = new FrameBuffer(displaySize, displaySize);
|
||||
//clear the buffer - some OSs leave garbage in it
|
||||
buffer.begin(Pal.darkerMetal);
|
||||
buffer.end();
|
||||
}
|
||||
});
|
||||
|
||||
if(!commands.isEmpty()){
|
||||
Draw.draw(Draw.z(), () -> {
|
||||
@@ -86,7 +88,11 @@ public class LogicDisplay extends Block{
|
||||
});
|
||||
}
|
||||
|
||||
Draw.rect(Draw.wrap(buffer.getTexture()), x, y, buffer.getWidth() * Draw.scl, -buffer.getHeight() * Draw.scl);
|
||||
Draw.draw(Draw.z(), () -> {
|
||||
if(buffer != null){
|
||||
Draw.rect(Draw.wrap(buffer.getTexture()), x, y, buffer.getWidth() * Draw.scl, -buffer.getHeight() * Draw.scl);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,5 +39,10 @@ public abstract class StorageBlock extends Block{
|
||||
linkedCore.drawSelect();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPickup(){
|
||||
return linkedCore != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user