Made it so the floorplan settings were actually being used

This commit is contained in:
ArpyAge 2022-09-06 01:28:51 +02:00
parent a5e9550ab6
commit 09b8b07d20

View File

@ -51,12 +51,12 @@ public class FloorPlanEditorSaveEvent extends MessageHandler {
errors.add("${notification.floorplan_editor.error.message.effective_height_is_0}"); errors.add("${notification.floorplan_editor.error.message.effective_height_is_0}");
} }
if (map.length() > 64 * 64) { if (map.length() > MAXIMUM_FLOORPLAN_SIZE) {
errors.add("${notification.floorplan_editor.error.message.too_large_area}"); errors.add("${notification.floorplan_editor.error.message.too_large_area}");
} }
if (mapRows.length > 64) errors.add("${notification.floorplan_editor.error.message.too_large_height}"); if (mapRows.length > MAXIMUM_FLOORPLAN_WIDTH_LENGTH) errors.add("${notification.floorplan_editor.error.message.too_large_height}");
else if (Arrays.stream(mapRows).anyMatch(l -> l.length() > 64 || l.length() == 0)) errors.add("${notification.floorplan_editor.error.message.too_large_width}"); else if (Arrays.stream(mapRows).anyMatch(l -> l.length() > MAXIMUM_FLOORPLAN_WIDTH_LENGTH || l.length() == 0)) errors.add("${notification.floorplan_editor.error.message.too_large_width}");
if (errors.length() > 0) { if (errors.length() > 0) {
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FLOORPLAN_EDITOR_ERROR.key, errors.toString())); this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FLOORPLAN_EDITOR_ERROR.key, errors.toString()));