Fixed #2237
This commit is contained in:
@@ -1702,7 +1702,7 @@ public class Blocks implements ContentList{
|
||||
navalFactory = new UnitFactory("naval-factory"){{
|
||||
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
|
||||
plans = new UnitPlan[]{
|
||||
new UnitPlan(UnitTypes.risse, 200f, with(Items.silicon, 10)),
|
||||
new UnitPlan(UnitTypes.risse, 200f, with(Items.silicon, 20, Items.metaglass, 25)),
|
||||
};
|
||||
size = 3;
|
||||
requiresWater = true;
|
||||
|
||||
@@ -672,7 +672,7 @@ public class UnitTypes implements ContentList{
|
||||
speed = 1.1f;
|
||||
drag = 0.13f;
|
||||
hitsize = 9f;
|
||||
health = 200;
|
||||
health = 220;
|
||||
immunities = ObjectSet.with(StatusEffects.wet);
|
||||
weapons.add(new Weapon("mount-weapon"){{
|
||||
reload = 12f;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class MapResizeDialog extends BaseDialog{
|
||||
table.field((w ? width : height) + "", TextFieldFilter.digitsOnly, value -> {
|
||||
int val = Integer.parseInt(value);
|
||||
if(w) width = val; else height = val;
|
||||
}).valid(value -> Strings.canParsePostiveInt(value) && Integer.parseInt(value) <= maxSize && Integer.parseInt(value) >= minSize).addInputDialog(3);
|
||||
}).valid(value -> Strings.canParsePositiveInt(value) && Integer.parseInt(value) <= maxSize && Integer.parseInt(value) >= minSize).addInputDialog(3);
|
||||
|
||||
table.row();
|
||||
}
|
||||
|
||||
@@ -149,14 +149,14 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
t.row();
|
||||
t.table(spawns -> {
|
||||
spawns.field("" + (group.begin + 1), TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
if(Strings.canParsePositiveInt(text)){
|
||||
group.begin = Strings.parseInt(text) - 1;
|
||||
updateWaves();
|
||||
}
|
||||
}).width(100f);
|
||||
spawns.add("$waves.to").padLeft(4).padRight(4);
|
||||
spawns.field(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
if(Strings.canParsePositiveInt(text)){
|
||||
group.end = Strings.parseInt(text) - 1;
|
||||
updateWaves();
|
||||
}else if(text.isEmpty()){
|
||||
@@ -169,7 +169,7 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
t.table(p -> {
|
||||
p.add("$waves.every").padRight(4);
|
||||
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text) && Strings.parseInt(text) > 0){
|
||||
if(Strings.canParsePositiveInt(text) && Strings.parseInt(text) > 0){
|
||||
group.spacing = Strings.parseInt(text);
|
||||
updateWaves();
|
||||
}
|
||||
@@ -180,7 +180,7 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
t.row();
|
||||
t.table(a -> {
|
||||
a.field(group.unitAmount + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
if(Strings.canParsePositiveInt(text)){
|
||||
group.unitAmount = Strings.parseInt(text);
|
||||
updateWaves();
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
t.row();
|
||||
t.table(a -> {
|
||||
a.field((int)group.shields + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
if(Strings.canParsePositiveInt(text)){
|
||||
group.shields = Strings.parseInt(text);
|
||||
updateWaves();
|
||||
}
|
||||
@@ -206,7 +206,7 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
|
||||
a.add(" + ");
|
||||
a.field((int)group.shieldScaling + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
if(Strings.canParsePositiveInt(text)){
|
||||
group.shieldScaling = Strings.parseInt(text);
|
||||
updateWaves();
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class LoadoutDialog extends BaseDialog{
|
||||
}).size(bsize);
|
||||
|
||||
t.button(Icon.pencil, Styles.cleari, () -> ui.showTextInput("$configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
|
||||
if(Strings.canParsePostiveInt(str)){
|
||||
if(Strings.canParsePositiveInt(str)){
|
||||
int amount = Strings.parseInt(str);
|
||||
if(amount >= 0 && amount <= capacity){
|
||||
stack.amount = amount;
|
||||
|
||||
@@ -112,7 +112,9 @@ public class ItemBridge extends Block{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (other.block() == tile.block() || (!(tile.block() instanceof ItemBridge) && other.block() == this)) && (other.team() == tile.team() || tile.block() != this) && (!checkDouble || other.<ItemBridgeEntity>bc().link != tile.pos());
|
||||
return ((other.block() == tile.block() && tile.block() == this) || (!(tile.block() instanceof ItemBridge) && other.block() == this))
|
||||
&& (other.team() == tile.team() || tile.block() != this)
|
||||
&& (!checkDouble || other.<ItemBridgeEntity>bc().link != tile.pos());
|
||||
}
|
||||
|
||||
public Tile findLink(int x, int y){
|
||||
|
||||
Reference in New Issue
Block a user