Fixed #396
This commit is contained in:
@@ -507,6 +507,7 @@ liquid.heatcapacity = [LIGHT_GRAY]Heat Capacity: {0}
|
|||||||
liquid.viscosity = [LIGHT_GRAY]Viscosity: {0}
|
liquid.viscosity = [LIGHT_GRAY]Viscosity: {0}
|
||||||
liquid.temperature = [LIGHT_GRAY]Temperature: {0}
|
liquid.temperature = [LIGHT_GRAY]Temperature: {0}
|
||||||
block.graphite-press.name = Graphite Press
|
block.graphite-press.name = Graphite Press
|
||||||
|
block.multi-press.name = Multi-Press
|
||||||
block.constructing = {0} [LIGHT_GRAY](Constructing)
|
block.constructing = {0} [LIGHT_GRAY](Constructing)
|
||||||
block.spawn.name = Enemy Spawn
|
block.spawn.name = Enemy Spawn
|
||||||
block.core.name = Core
|
block.core.name = Core
|
||||||
|
|||||||
@@ -458,7 +458,6 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
titaniumWallLarge = new Wall("titanium-wall-large"){{
|
titaniumWallLarge = new Wall("titanium-wall-large"){{
|
||||||
requirements(Category.defense, ItemStack.with(Items.titanium, 12 * 4));
|
requirements(Category.defense, ItemStack.with(Items.titanium, 12 * 4));
|
||||||
requirements(Category.defense, ItemStack.with(Items.titanium, 12));
|
|
||||||
health = 110 * wallHealthMultiplier * 4;
|
health = 110 * wallHealthMultiplier * 4;
|
||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
@@ -470,7 +469,6 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
thoriumWallLarge = new Wall("thorium-wall-large"){{
|
thoriumWallLarge = new Wall("thorium-wall-large"){{
|
||||||
requirements(Category.defense, ItemStack.with(Items.thorium, 12 * 4));
|
requirements(Category.defense, ItemStack.with(Items.thorium, 12 * 4));
|
||||||
requirements(Category.defense, ItemStack.with(Items.thorium, 12));
|
|
||||||
health = 200 * wallHealthMultiplier * 4;
|
health = 200 * wallHealthMultiplier * 4;
|
||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
@@ -482,7 +480,6 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
phaseWallLarge = new DeflectorWall("phase-wall-large"){{
|
phaseWallLarge = new DeflectorWall("phase-wall-large"){{
|
||||||
requirements(Category.defense, ItemStack.with(Items.phasefabric, 12 * 4));
|
requirements(Category.defense, ItemStack.with(Items.phasefabric, 12 * 4));
|
||||||
requirements(Category.defense, ItemStack.with(Items.phasefabric, 12));
|
|
||||||
health = 150 * 4 * wallHealthMultiplier;
|
health = 150 * 4 * wallHealthMultiplier;
|
||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
@@ -494,7 +491,6 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
surgeWallLarge = new SurgeWall("surge-wall-large"){{
|
surgeWallLarge = new SurgeWall("surge-wall-large"){{
|
||||||
requirements(Category.defense, ItemStack.with(Items.surgealloy, 12 * 4));
|
requirements(Category.defense, ItemStack.with(Items.surgealloy, 12 * 4));
|
||||||
requirements(Category.defense, ItemStack.with(Items.surgealloy, 12));
|
|
||||||
health = 230 * 4 * wallHealthMultiplier;
|
health = 230 * 4 * wallHealthMultiplier;
|
||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
@@ -506,7 +502,6 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
doorLarge = new Door("door-large"){{
|
doorLarge = new Door("door-large"){{
|
||||||
requirements(Category.defense, ItemStack.with(Items.titanium, 12 * 4, Items.silicon, 8 * 4));
|
requirements(Category.defense, ItemStack.with(Items.titanium, 12 * 4, Items.silicon, 8 * 4));
|
||||||
requirements(Category.defense, ItemStack.with(Items.titanium, 12, Items.silicon, 8));
|
|
||||||
openfx = Fx.dooropenlarge;
|
openfx = Fx.dooropenlarge;
|
||||||
closefx = Fx.doorcloselarge;
|
closefx = Fx.doorcloselarge;
|
||||||
health = 100 * 4 * wallHealthMultiplier;
|
health = 100 * 4 * wallHealthMultiplier;
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public class CoreBlock extends LaunchPad{
|
|||||||
//TODO play animation of some sort
|
//TODO play animation of some sort
|
||||||
Effects.effect(Fx.dooropenlarge, tile);
|
Effects.effect(Fx.dooropenlarge, tile);
|
||||||
//items sent are split evenly across every player in the game
|
//items sent are split evenly across every player in the game
|
||||||
data.addItem(item, launchChunkSize / playerGroup.size());
|
data.addItem(item, launchChunkSize / Math.max(playerGroup.size(), 1));
|
||||||
entity.items.remove(item, launchChunkSize);
|
entity.items.remove(item, launchChunkSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,31 +17,12 @@ public class ConsumePower extends Consume{
|
|||||||
/** True if the module can store power. */
|
/** True if the module can store power. */
|
||||||
public final boolean isBuffered;
|
public final boolean isBuffered;
|
||||||
|
|
||||||
protected ConsumePower(float powerPerTick, float powerCapacity, boolean isBuffered){
|
public ConsumePower(float powerPerTick, float powerCapacity, boolean isBuffered){
|
||||||
this.powerPerTick = powerPerTick;
|
this.powerPerTick = powerPerTick;
|
||||||
this.powerCapacity = powerCapacity;
|
this.powerCapacity = powerCapacity;
|
||||||
this.isBuffered = isBuffered;
|
this.isBuffered = isBuffered;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Makes the owner consume powerPerTick each tick and disables it unless minimumSatisfaction (1.0 = 100%) of that power is being supplied.
|
|
||||||
* @param powerPerTick The maximum amount of power which is required per tick for 100% efficiency.
|
|
||||||
* @param minimumSatisfaction The percentage of powerPerTick which must be available for the module to work.
|
|
||||||
*/
|
|
||||||
public static ConsumePower consumePowerDirect(float powerPerTick){
|
|
||||||
return new ConsumePower(powerPerTick, 0.0f, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a power buffer to the owner which takes ticksToFill number of ticks to be filled.
|
|
||||||
* Note that this object does not remove power from the buffer.
|
|
||||||
* @param powerCapacity The maximum capacity in power units.
|
|
||||||
* @param ticksToFill The number of ticks it shall take to fill the buffer.
|
|
||||||
*/
|
|
||||||
public static ConsumePower consumePowerBuffered(float powerCapacity, float ticksToFill){
|
|
||||||
return new ConsumePower(powerCapacity / ticksToFill, powerCapacity, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildTooltip(Table table){
|
public void buildTooltip(Table table){
|
||||||
// No tooltip for power
|
// No tooltip for power
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class Consumers{
|
|||||||
* @return the created consumer object.
|
* @return the created consumer object.
|
||||||
*/
|
*/
|
||||||
public ConsumePower power(float powerPerTick){
|
public ConsumePower power(float powerPerTick){
|
||||||
ConsumePower c = ConsumePower.consumePowerDirect(powerPerTick);
|
ConsumePower c = new ConsumePower(powerPerTick, 0.0f, false);
|
||||||
add(c);
|
add(c);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ public class Consumers{
|
|||||||
* @param ticksToFill The number of ticks it shall take to fill the buffer.
|
* @param ticksToFill The number of ticks it shall take to fill the buffer.
|
||||||
*/
|
*/
|
||||||
public ConsumePower powerBuffered(float powerCapacity, float ticksToFill){
|
public ConsumePower powerBuffered(float powerCapacity, float ticksToFill){
|
||||||
ConsumePower c = ConsumePower.consumePowerBuffered(powerCapacity, ticksToFill);
|
ConsumePower c = new ConsumePower(powerCapacity / ticksToFill, powerCapacity, true);
|
||||||
add(c);
|
add(c);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,27 +154,6 @@ task scaleSprites4x(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task processBlocks(){
|
|
||||||
def str = file("/home/anuke/Projects/Mindustry/core/src/io/anuke/mindustry/content/Blocks.java").text
|
|
||||||
def out = str
|
|
||||||
def mat = " consumes.power("
|
|
||||||
|
|
||||||
int i = 0
|
|
||||||
while(str.indexOf(mat, i) != -1){
|
|
||||||
i = str.indexOf(mat, i + 1)
|
|
||||||
if(i == -1) break
|
|
||||||
|
|
||||||
def line = str.substring(i, str.indexOf("\n", i))
|
|
||||||
def num = line.substring(line.indexOf("(") + 1, line.indexOf(")"))
|
|
||||||
float val = Float.parseFloat(num) * 10f;
|
|
||||||
boolean fmt = Math.abs((int)val - val) > 0.01f;
|
|
||||||
|
|
||||||
out = out.replace(line, (line.replace(num, (fmt ? String.format("%.2f", val) : (int)val) + "f")))
|
|
||||||
}
|
|
||||||
|
|
||||||
println(out)
|
|
||||||
}
|
|
||||||
|
|
||||||
task scaleSprites(){
|
task scaleSprites(){
|
||||||
finalizedBy 'genSprites'
|
finalizedBy 'genSprites'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user