Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -397,7 +397,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
public boolean isHealSuppressed(){
|
||||
return Time.time <= healSuppressionTime;
|
||||
return block.suppressable && Time.time <= healSuppressionTime;
|
||||
}
|
||||
|
||||
public void recentlyHealed(){
|
||||
|
||||
@@ -80,10 +80,7 @@ public class OverdriveProjector extends Block{
|
||||
}
|
||||
|
||||
public class OverdriveBuild extends Building implements Ranged{
|
||||
float heat;
|
||||
float charge = Mathf.random(reload);
|
||||
float phaseHeat;
|
||||
float smoothEfficiency;
|
||||
public float heat, charge = Mathf.random(reload), phaseHeat, smoothEfficiency;
|
||||
|
||||
@Override
|
||||
public float range(){
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mindustry.world.blocks.units;
|
||||
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
@@ -76,15 +77,36 @@ public class Reconstructor extends UnitBlock{
|
||||
stats.add(Stat.output, table -> {
|
||||
table.row();
|
||||
for(var upgrade : upgrades){
|
||||
float size = 8 * 3;
|
||||
if(upgrade[0].unlockedNow() && upgrade[1].unlockedNow()){
|
||||
table.image(upgrade[0].uiIcon).size(size).padRight(4).padLeft(10).scaling(Scaling.fit).right();
|
||||
table.add(upgrade[0].localizedName).left();
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
|
||||
table.add("[lightgray] -> ");
|
||||
t.image(upgrade[0].uiIcon).size(40).pad(10f).left();
|
||||
t.table(info -> {
|
||||
info.add(upgrade[0].localizedName).left();
|
||||
info.row();
|
||||
}).pad(10).left();
|
||||
}).fill().padTop(5).padBottom(5);
|
||||
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
|
||||
t.image(Icon.right).color(Pal.darkishGray).size(40).pad(10f);
|
||||
}).fill().padTop(5).padBottom(5);
|
||||
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
|
||||
t.image(upgrade[1].uiIcon).size(40).pad(10f).right();
|
||||
t.table(info -> {
|
||||
info.add(upgrade[1].localizedName).right();
|
||||
info.row();
|
||||
}).pad(10).right();
|
||||
}).fill().padTop(5).padBottom(5);
|
||||
|
||||
table.image(upgrade[1].uiIcon).size(size).padRight(4).scaling(Scaling.fit);
|
||||
table.add(upgrade[1].localizedName).left();
|
||||
table.row();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,22 +131,42 @@ public class UnitAssembler extends PayloadBlock{
|
||||
super.setStats();
|
||||
|
||||
stats.add(Stat.output, table -> {
|
||||
Seq<AssemblerUnitPlan> p = plans.select(u -> u.unit.unlockedNow());
|
||||
table.row();
|
||||
for(var plan : p){
|
||||
if(plan.unit.unlockedNow()){
|
||||
table.image(plan.unit.uiIcon).size(8 * 3).padRight(2).right();
|
||||
table.add(plan.unit.localizedName).left();
|
||||
table.add(Strings.autoFixed(plan.time / 60f, 1) + " " + Core.bundle.get("unit.seconds")).color(Color.lightGray).padLeft(12).left();
|
||||
table.row();
|
||||
table.add().right();
|
||||
table.table(t -> {
|
||||
t.left();
|
||||
for(var stack : plan.requirements){
|
||||
t.add(new ItemImage(stack)).padRight(4).padTop(4).left();
|
||||
}
|
||||
}).left().fillX().padLeft(-8 * 3f - 2).padBottom(6).row();
|
||||
}
|
||||
|
||||
for(var plan : plans){
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
|
||||
if(plan.unit.isBanned()){
|
||||
t.image(Icon.cancel).color(Pal.remove).size(40).pad(10);
|
||||
return;
|
||||
}
|
||||
|
||||
if(plan.unit.unlockedNow()){
|
||||
t.image(plan.unit.uiIcon).size(40).pad(10f).left();
|
||||
t.table(info -> {
|
||||
info.add(plan.unit.localizedName).left();
|
||||
info.row();
|
||||
info.add(Strings.autoFixed(plan.time / 60f, 1) + " " + Core.bundle.get("unit.seconds")).color(Color.lightGray);
|
||||
}).left();
|
||||
|
||||
t.table(req -> {
|
||||
req.right();
|
||||
for(int i = 0; i < plan.requirements.size; i++){
|
||||
if(i % 6 == 0){
|
||||
req.row();
|
||||
}
|
||||
|
||||
PayloadStack stack = plan.requirements.get(i);
|
||||
req.add(new ItemImage(stack)).pad(5);
|
||||
}
|
||||
}).right().grow().pad(10f);
|
||||
}else{
|
||||
t.image(Icon.lock).color(Pal.darkerGray).size(40).pad(10);
|
||||
}
|
||||
}).growX().pad(5);
|
||||
table.row();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -106,22 +106,42 @@ public class UnitFactory extends UnitBlock{
|
||||
stats.remove(Stat.itemCapacity);
|
||||
|
||||
stats.add(Stat.output, table -> {
|
||||
Seq<UnitPlan> p = plans.select(u -> u.unit.unlockedNow());
|
||||
table.row();
|
||||
for(var plan : p){
|
||||
if(plan.unit.unlockedNow()){
|
||||
table.table(c -> {
|
||||
c.left();
|
||||
c.image(plan.unit.uiIcon).size(8 * 3).padRight(2);
|
||||
c.add(plan.unit.localizedName).left();
|
||||
c.add(Strings.autoFixed(plan.time / 60f, 1) + " " + Core.bundle.get("unit.seconds")).color(Color.lightGray).padLeft(12).left();
|
||||
}).padLeft(40).left().row();
|
||||
table.table(req -> {
|
||||
req.left();
|
||||
StatValues.items(plan.requirements).display(req);
|
||||
}).padLeft(60).left().row();
|
||||
|
||||
}
|
||||
for(var plan : plans){
|
||||
table.table(t -> {
|
||||
t.setBackground(Tex.whiteui);
|
||||
t.setColor(Pal.darkestGray);
|
||||
|
||||
if(plan.unit.isBanned()){
|
||||
t.image(Icon.cancel).color(Pal.remove).size(40);
|
||||
return;
|
||||
}
|
||||
|
||||
if(plan.unit.unlockedNow()){
|
||||
t.image(plan.unit.uiIcon).size(40).pad(10f).left();
|
||||
t.table(info -> {
|
||||
info.add(plan.unit.localizedName).left();
|
||||
info.row();
|
||||
info.add(Strings.autoFixed(plan.time / 60f, 1) + " " + Core.bundle.get("unit.seconds")).color(Color.lightGray);
|
||||
}).left();
|
||||
|
||||
t.table(req -> {
|
||||
req.right();
|
||||
for(int i = 0; i < plan.requirements.length; i++){
|
||||
if(i % 6 == 0){
|
||||
req.row();
|
||||
}
|
||||
|
||||
ItemStack stack = plan.requirements[i];
|
||||
req.add(new ItemDisplay(stack.item, stack.amount, false)).pad(5);
|
||||
}
|
||||
}).right().grow().pad(10f);
|
||||
}else{
|
||||
t.image(Icon.lock).color(Pal.darkerGray).size(40);
|
||||
}
|
||||
}).growX().pad(5);
|
||||
table.row();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user