mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
DEATH AND DESTRUCTION
This commit is contained in:
parent
3babe7686b
commit
c324f2124b
135 changed files with 704 additions and 2080 deletions
|
|
@ -58,14 +58,14 @@ public class PowerTestFixture{
|
|||
protected static Battery createFakeBattery(float capacity){
|
||||
return new Battery("fakebattery" + System.nanoTime()){{
|
||||
buildType = () -> new BatteryBuild();
|
||||
consumes.powerBuffered(capacity);
|
||||
consumePowerBuffered(capacity);
|
||||
}};
|
||||
}
|
||||
|
||||
protected static Block createFakeDirectConsumer(float powerPerTick){
|
||||
return new PowerBlock("fakedirectconsumer" + System.nanoTime()){{
|
||||
buildType = Building::create;
|
||||
consumes.power(powerPerTick);
|
||||
consumePower(powerPerTick);
|
||||
}};
|
||||
}
|
||||
|
||||
|
|
@ -81,8 +81,8 @@ public class PowerTestFixture{
|
|||
Tile tile = new Tile(x, y);
|
||||
|
||||
//workaround since init() is not called for custom blocks
|
||||
if(block.consumes.all == null || block.consumes.all.length == 0){
|
||||
block.consumes.init();
|
||||
if(block.consumers.length == 0){
|
||||
block.init();
|
||||
}
|
||||
|
||||
// Using the Tile(int, int, byte, byte) constructor would require us to register any fake block or tile we create
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue