From 660abe188b923f786661723eebf29e19a84855c7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 17 Jul 2020 08:46:11 -0400 Subject: [PATCH] Fixed #2237 --- core/assets-raw/sprites/units/risse-cell.png | Bin 0 -> 796 bytes core/src/mindustry/content/Blocks.java | 2 +- core/src/mindustry/content/UnitTypes.java | 2 +- core/src/mindustry/editor/MapResizeDialog.java | 2 +- core/src/mindustry/editor/WaveInfoDialog.java | 12 ++++++------ core/src/mindustry/ui/dialogs/LoadoutDialog.java | 2 +- .../world/blocks/distribution/ItemBridge.java | 4 +++- server/src/mindustry/server/ServerControl.java | 2 +- 8 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 core/assets-raw/sprites/units/risse-cell.png diff --git a/core/assets-raw/sprites/units/risse-cell.png b/core/assets-raw/sprites/units/risse-cell.png new file mode 100644 index 0000000000000000000000000000000000000000..f01db0e5b1cc7f574d87772cddd0e42a5ca1a626 GIT binary patch literal 796 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RWTQZ%U13aCb6$*;-(=u~X z85lGs)=sqbIP4&EG(Ol>cPd|)K;emixlsb5g;%sh7CNmEjVd+R`GtFyiHfFPUsLwM zgZ)QWHFs}b$G5IY;RoZRN3WK=P*VN3UUN&w#|Jy)-@mhccaPC&?-`TT*)kVOZu_V{ zN>bac^=*$*g8-YL>-;l1$$pb2eUOR&{^8?Sy*}1N4D&r~PV-z=yQeVk z-WJ|-zmFt_O$mKe{Ah)zxJuoVU5`FVKX;nUI#1H<^2*9b1{)(@BrI)?ym+N!d57|< zWx@L<6h=PXb2L&rJo5FtKdlGn?Avsvbe6J5f}r;V1t&*Q)hUU}Zma#eT1DO-xBYY2 zcfX5XYmBNvka9)rBU&(%pbH_Cib;##-dmFz<-{Y zm$~&z`Oef#ip$QPsI0JsHzsDgX)6DYJB)4fcy3OaJ!$^33Fn#Lr+@K{On4y1v1aGq zt=|fNF)UfR`U!7A0Y{IhM)lptclXZS`?q@8)%*PMu0`{g#BZL&z`z*n>EaktG3V{g z*t})~9)^S)q1(K-d>7yAQayRPci_18GhZ1YR^TKVHh-qDUPDlM4@Zhe1j$m1L-{OtX? zjY?dX8=h`0a6dTBP&w8yQD|oF+#iK9n?LO_x)$rCY8)-LZc9S=v8ISi`>$0_dGT#x zjQGCmua}-)^4+ht-}i;y!_C^ux2u^{@^_d`&z$N1l}*Q7Y9Z&^&ns^=?0#muQ|V0S zD$|7QWXsR { 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(); } diff --git a/core/src/mindustry/editor/WaveInfoDialog.java b/core/src/mindustry/editor/WaveInfoDialog.java index 77574793af..56ecfa9de3 100644 --- a/core/src/mindustry/editor/WaveInfoDialog.java +++ b/core/src/mindustry/editor/WaveInfoDialog.java @@ -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(); } diff --git a/core/src/mindustry/ui/dialogs/LoadoutDialog.java b/core/src/mindustry/ui/dialogs/LoadoutDialog.java index e367bc08da..079b5b5245 100644 --- a/core/src/mindustry/ui/dialogs/LoadoutDialog.java +++ b/core/src/mindustry/ui/dialogs/LoadoutDialog.java @@ -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; diff --git a/core/src/mindustry/world/blocks/distribution/ItemBridge.java b/core/src/mindustry/world/blocks/distribution/ItemBridge.java index add5bdd595..5fcd64c674 100644 --- a/core/src/mindustry/world/blocks/distribution/ItemBridge.java +++ b/core/src/mindustry/world/blocks/distribution/ItemBridge.java @@ -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.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.bc().link != tile.pos()); } public Tile findLink(int x, int y){ diff --git a/server/src/mindustry/server/ServerControl.java b/server/src/mindustry/server/ServerControl.java index 863e7763f8..03703921c1 100644 --- a/server/src/mindustry/server/ServerControl.java +++ b/server/src/mindustry/server/ServerControl.java @@ -477,7 +477,7 @@ public class ServerControl implements ApplicationListener{ 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]); netServer.admins.setPlayerLimit(lim); info("Player limit is now &lc@.", lim);