Buffered consumers now fill instantly

This commit is contained in:
Timmeey86
2018-12-15 00:47:47 +01:00
parent 23fb15fe78
commit fed11db92e
2 changed files with 4 additions and 5 deletions

View File

@@ -59,12 +59,12 @@ public class PowerBlocks extends BlockList implements ContentList{
}};
battery = new Battery("battery"){{
consumes.powerBuffered(320f, 120f);
consumes.powerBuffered(320f, 1f);
}};
batteryLarge = new Battery("battery-large"){{
size = 3;
consumes.powerBuffered(2000f, 600f);
consumes.powerBuffered(2000f, 1f);
}};
powerNode = new PowerNode("power-node"){{

View File

@@ -58,12 +58,11 @@ public class Consumers{
/**
* Creates a consumer which stores power and uses it only in case of certain events (e.g. a turret firing).
* It will take 60 ticks (one second) to fill the buffer, given enough power supplied.
* It will take 180 ticks (three second) to fill the buffer, given enough power supplied.
* @param powerCapacity The maximum capacity in power units.
*/
public ConsumePower powerBuffered(float powerCapacity){
// TODO Balance: How long should it take to fill a buffer? The lower this value, the more power will be "stolen" from direct consumers.
return powerBuffered(powerCapacity, 60f);
return powerBuffered(powerCapacity, 1f);
}
/**