Various bugfixes

This commit is contained in:
Anuken 2018-10-10 08:39:25 -04:00
parent 54488564f3
commit 87c8293c78
5 changed files with 16 additions and 7 deletions

View File

@ -100,7 +100,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
@Override
public boolean collides(SolidTrait other){
if(isDead()) return true;
if(isDead()) return false;
if(other instanceof DamageTrait){
return other instanceof TeamTrait && state.teams.areEnemies((((TeamTrait) other).getTeam()), team);

View File

@ -127,7 +127,7 @@ public class HudFragment extends Fragment{
if(Net.hasClient()){
t.label(() -> ping.get(Net.getPing())).visible(() -> Net.client() && !gwt).colspan(2);
}
}).size(-1).visible(() -> Settings.getBool("fps")).update(t -> t.setTranslation(0, state.mode.disableWaves ? waves.getHeight() : 0)).get();
}).size(-1).visible(() -> Settings.getBool("fps")).update(t -> t.setTranslation(0, (!waves.isVisible() ? waves.getHeight() : Math.min(waves.getTranslation().y, waves.getHeight())) )).get();
//make wave box appear below rest of menu
cont.swapActor(wavetable, menu.getParent());
@ -347,7 +347,6 @@ public class HudFragment extends Fragment{
wavetable = table;
IntFormat wavef = new IntFormat("text.wave");
IntFormat waitf = new IntFormat("text.wave.waiting");
IntFormat enemyf = new IntFormat("text.wave.enemy");
IntFormat enemiesf = new IntFormat("text.wave.enemies");

View File

@ -10,6 +10,7 @@ import io.anuke.mindustry.world.meta.BlockStat;
public class PowerCrafter extends Block{
protected final int timerDump = timers++;
protected final int timerContentCheck = timers++;
/**Optional.*/
protected Item outputItem;
@ -70,8 +71,17 @@ public class PowerCrafter extends Block{
if(entity.progress >= 1f){
entity.items.remove(consumes.item(), consumes.itemAmount());
if(outputItem != null) offloadNear(tile, outputItem);
if(outputLiquid != null) handleLiquid(tile, tile, outputLiquid, outputLiquidAmount);
if(outputItem != null){
offloadNear(tile, outputItem);
useContent(tile, outputItem);
}
if(outputLiquid != null){
handleLiquid(tile, tile, outputLiquid, outputLiquidAmount);
if(tile.entity.liquids.currentAmount() > 0f && tile.entity.timer.get(timerContentCheck, 10)){
useContent(tile, outputLiquid);
}
}
entity.progress = 0f;
}

View File

@ -15,7 +15,7 @@ public class Pump extends LiquidBlock{
protected final Array<Tile> drawTiles = new Array<>();
protected final Array<Tile> updateTiles = new Array<>();
protected int timerContentCheck = timers++;
protected final int timerContentCheck = timers++;
/**Pump amount per tile this block is on.*/
protected float pumpAmount = 1f;

View File

@ -51,7 +51,7 @@ public class ServerControl extends Module{
"shufflemode", "normal",
"bans", "",
"admins", "",
"sector_x", 0,
"sector_x", 2,
"sector_y", 1,
"shuffle", true,
"crashreport", false,