Minor bugfixes & compatibility fixes
This commit is contained in:
@@ -845,7 +845,8 @@ public class Block extends UnlockableContent{
|
||||
}
|
||||
|
||||
if(!outputsPower && consumes.hasPower() && consumes.getPower().buffered){
|
||||
throw new IllegalArgumentException("Consumer using buffered power: " + name);
|
||||
Log.warn("Consumer using buffered power: @. Disabling buffered power.", name);
|
||||
consumes.getPower().buffered = false;
|
||||
}
|
||||
|
||||
if(buildVisibility == BuildVisibility.sandboxOnly){
|
||||
|
||||
@@ -8,11 +8,11 @@ import mindustry.world.meta.*;
|
||||
/** Consumer class for blocks which consume power while being connected to a power graph. */
|
||||
public class ConsumePower extends Consume{
|
||||
/** The maximum amount of power which can be processed per tick. This might influence efficiency or load a buffer. */
|
||||
public final float usage;
|
||||
public float usage;
|
||||
/** The maximum power capacity in power units. */
|
||||
public final float capacity;
|
||||
public float capacity;
|
||||
/** True if the module can store power. */
|
||||
public final boolean buffered;
|
||||
public boolean buffered;
|
||||
|
||||
public ConsumePower(float usage, float capacity, boolean buffered){
|
||||
this.usage = usage;
|
||||
|
||||
Reference in New Issue
Block a user