mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
FloorPlanValidation is now like Habbo. Doesn't allow different lengths from line 1.
This commit is contained in:
parent
4d026f97e7
commit
bb8cb00a65
@ -50,6 +50,21 @@ public class FloorPlanEditorSaveEvent extends MessageHandler {
|
||||
errors.add("${notification.floorplan_editor.error.title}");
|
||||
}
|
||||
|
||||
boolean rowCountCorrect = true;
|
||||
int rowCount = 0;
|
||||
String[] splitMap = map.split(((char) 13) + "");
|
||||
for (String s : splitMap) {
|
||||
if(rowCount > 0 && rowCount != s.length()) {
|
||||
rowCountCorrect = false;
|
||||
}
|
||||
rowCount = s.length();
|
||||
}
|
||||
|
||||
if (!rowCountCorrect && Emulator.getConfig().getBoolean("hotel.room.floorplan.check.enabled"))
|
||||
{
|
||||
errors.add("${notification.floorplan_editor.error.title}");
|
||||
}
|
||||
|
||||
|
||||
if (map.isEmpty() || map.replace("x", "").replace(((char) 13) + "", "").length() == 0) {
|
||||
errors.add("${notification.floorplan_editor.error.message.effective_height_is_0}");
|
||||
|
Loading…
Reference in New Issue
Block a user