Power productivity & Drone pad standby (#998)

* Introduce power productivity

Allows power consumers to scale down their intake.

* Make drone pads only use power when constructing

* Implement requested changes

* Begone
This commit is contained in:
Patrick 'Quezler' Mounier
2019-11-05 23:31:32 +01:00
committed by Anuken
parent e4697bae27
commit 49d12f36b9

View File

@@ -1,5 +1,6 @@
package io.anuke.mindustry.world.consumers;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.mindustry.entities.type.TileEntity;
import io.anuke.mindustry.world.Tile;
@@ -72,7 +73,7 @@ public class ConsumePower extends Consume{
if(buffered){
return (1f-entity.power.satisfaction)*capacity;
}else{
return usage;
return usage * Mathf.num(entity.block.shouldConsume(entity.tile));
}
}