This commit is contained in:
Anuken
2020-07-17 08:46:11 -04:00
parent 208105f21d
commit 660abe188b
8 changed files with 14 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

View File

@ -1702,7 +1702,7 @@ public class Blocks implements ContentList{
navalFactory = new UnitFactory("naval-factory"){{ navalFactory = new UnitFactory("naval-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70)); requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{ 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; size = 3;
requiresWater = true; requiresWater = true;

View File

@ -672,7 +672,7 @@ public class UnitTypes implements ContentList{
speed = 1.1f; speed = 1.1f;
drag = 0.13f; drag = 0.13f;
hitsize = 9f; hitsize = 9f;
health = 200; health = 220;
immunities = ObjectSet.with(StatusEffects.wet); immunities = ObjectSet.with(StatusEffects.wet);
weapons.add(new Weapon("mount-weapon"){{ weapons.add(new Weapon("mount-weapon"){{
reload = 12f; reload = 12f;

View File

@ -27,7 +27,7 @@ public class MapResizeDialog extends BaseDialog{
table.field((w ? width : height) + "", TextFieldFilter.digitsOnly, value -> { table.field((w ? width : height) + "", TextFieldFilter.digitsOnly, value -> {
int val = Integer.parseInt(value); int val = Integer.parseInt(value);
if(w) width = val; else height = val; 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(); table.row();
} }

View File

@ -149,14 +149,14 @@ public class WaveInfoDialog extends BaseDialog{
t.row(); t.row();
t.table(spawns -> { t.table(spawns -> {
spawns.field("" + (group.begin + 1), TextFieldFilter.digitsOnly, text -> { spawns.field("" + (group.begin + 1), TextFieldFilter.digitsOnly, text -> {
if(Strings.canParsePostiveInt(text)){ if(Strings.canParsePositiveInt(text)){
group.begin = Strings.parseInt(text) - 1; group.begin = Strings.parseInt(text) - 1;
updateWaves(); updateWaves();
} }
}).width(100f); }).width(100f);
spawns.add("$waves.to").padLeft(4).padRight(4); spawns.add("$waves.to").padLeft(4).padRight(4);
spawns.field(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> { 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; group.end = Strings.parseInt(text) - 1;
updateWaves(); updateWaves();
}else if(text.isEmpty()){ }else if(text.isEmpty()){
@ -169,7 +169,7 @@ public class WaveInfoDialog extends BaseDialog{
t.table(p -> { t.table(p -> {
p.add("$waves.every").padRight(4); p.add("$waves.every").padRight(4);
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> { 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); group.spacing = Strings.parseInt(text);
updateWaves(); updateWaves();
} }
@ -180,7 +180,7 @@ public class WaveInfoDialog extends BaseDialog{
t.row(); t.row();
t.table(a -> { t.table(a -> {
a.field(group.unitAmount + "", TextFieldFilter.digitsOnly, text -> { a.field(group.unitAmount + "", TextFieldFilter.digitsOnly, text -> {
if(Strings.canParsePostiveInt(text)){ if(Strings.canParsePositiveInt(text)){
group.unitAmount = Strings.parseInt(text); group.unitAmount = Strings.parseInt(text);
updateWaves(); updateWaves();
} }
@ -198,7 +198,7 @@ public class WaveInfoDialog extends BaseDialog{
t.row(); t.row();
t.table(a -> { t.table(a -> {
a.field((int)group.shields + "", TextFieldFilter.digitsOnly, text -> { a.field((int)group.shields + "", TextFieldFilter.digitsOnly, text -> {
if(Strings.canParsePostiveInt(text)){ if(Strings.canParsePositiveInt(text)){
group.shields = Strings.parseInt(text); group.shields = Strings.parseInt(text);
updateWaves(); updateWaves();
} }
@ -206,7 +206,7 @@ public class WaveInfoDialog extends BaseDialog{
a.add(" + "); a.add(" + ");
a.field((int)group.shieldScaling + "", TextFieldFilter.digitsOnly, text -> { a.field((int)group.shieldScaling + "", TextFieldFilter.digitsOnly, text -> {
if(Strings.canParsePostiveInt(text)){ if(Strings.canParsePositiveInt(text)){
group.shieldScaling = Strings.parseInt(text); group.shieldScaling = Strings.parseInt(text);
updateWaves(); updateWaves();
} }

View File

@ -82,7 +82,7 @@ public class LoadoutDialog extends BaseDialog{
}).size(bsize); }).size(bsize);
t.button(Icon.pencil, Styles.cleari, () -> ui.showTextInput("$configure", stack.item.localizedName, 10, stack.amount + "", true, str -> { 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); int amount = Strings.parseInt(str);
if(amount >= 0 && amount <= capacity){ if(amount >= 0 && amount <= capacity){
stack.amount = amount; stack.amount = amount;

View File

@ -112,7 +112,9 @@ public class ItemBridge extends Block{
return false; 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){ public Tile findLink(int x, int y){

View File

@ -477,7 +477,7 @@ public class ServerControl implements ApplicationListener{
return; return;
} }
if(Strings.canParsePostiveInt(arg[0]) && Strings.parseInt(arg[0]) > 0){ if(Strings.canParsePositiveInt(arg[0]) && Strings.parseInt(arg[0]) > 0){
int lim = Strings.parseInt(arg[0]); int lim = Strings.parseInt(arg[0]);
netServer.admins.setPlayerLimit(lim); netServer.admins.setPlayerLimit(lim);
info("Player limit is now &lc@.", lim); info("Player limit is now &lc@.", lim);