Merge branches 'master' and 'mod-spritepack-refactor' of https://github.com/Anuken/Mindustry

This commit is contained in:
Anuken
2019-11-25 23:55:18 -05:00
15 changed files with 1641 additions and 1529 deletions

View File

@@ -15,6 +15,7 @@ import io.anuke.mindustry.game.*;
import io.anuke.mindustry.game.EventType.BlockDestroyEvent;
import io.anuke.mindustry.gen.*;
import io.anuke.mindustry.world.*;
import io.anuke.mindustry.world.consumers.*;
import io.anuke.mindustry.world.modules.*;
import java.io.*;
@@ -89,7 +90,7 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
/** Base efficiency. If this entity has non-buffered power, returns the power %, otherwise returns 1. */
public float efficiency(){
return power != null && !block.consumes.getPower().buffered ? power.status : 1f;
return power != null && (block.consumes.has(ConsumeType.power) && !block.consumes.getPower().buffered) ? power.status : 1f;
}
/** Call when nothing is happening to the entity. This increments the internal sleep timer. */