From 261863ec6fd4377ddc26d1e24b7c2fe70c328015 Mon Sep 17 00:00:00 2001 From: core Date: Tue, 9 Jan 2024 10:19:09 -0500 Subject: [PATCH] ship editor work --- starkingdoms-client/src/components/ui/Checkbox.svelte | 4 ++-- starkingdoms-client/src/pages/Play.svelte | 5 ++--- starkingdoms-client/src/pages/ShipEditor.svelte | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/starkingdoms-client/src/components/ui/Checkbox.svelte b/starkingdoms-client/src/components/ui/Checkbox.svelte index d166063ac306f3f432349e8128bab0e627c22fc7..48eb485881402edae504ec2d54613d15c579e6c4 100644 --- a/starkingdoms-client/src/components/ui/Checkbox.svelte +++ b/starkingdoms-client/src/components/ui/Checkbox.svelte @@ -21,7 +21,7 @@ {id} class="svcmp-Checkbox {clazz}" {disabled} - {checked} + bind:checked on:click on:focus {style} @@ -38,7 +38,7 @@ {id} This de-sugars to id="{id}", inlining the value of the `id' variable for {id}. - class="svcmp-Checkbox {clazz}" One static class, and other classes + class="svcmp-Checkbox {clazz}" One static class, and other classes passed are added also. {disabled} {disabled} is inlined if `disabled` is true. Otherwise, it is skipped. diff --git a/starkingdoms-client/src/pages/Play.svelte b/starkingdoms-client/src/pages/Play.svelte index 073887062ab8a067793c2414a93159fc6a546cb8..bad7bd0aa1e1183e13017e6784a1cbd100de684d 100644 --- a/starkingdoms-client/src/pages/Play.svelte +++ b/starkingdoms-client/src/pages/Play.svelte @@ -18,7 +18,7 @@ let x_pos; let y_pos; - let antialiasing: Checkbox; + let antialiasing: boolean = false; let chatbox: Chatbox; @@ -127,8 +127,7 @@ diff --git a/starkingdoms-client/src/pages/ShipEditor.svelte b/starkingdoms-client/src/pages/ShipEditor.svelte index 11a10c7488fd1510ee05195339badf01f87297a3..a09601a4708156f4b67bcda20a988888e8a9bc18 100644 --- a/starkingdoms-client/src/pages/ShipEditor.svelte +++ b/starkingdoms-client/src/pages/ShipEditor.svelte @@ -302,6 +302,9 @@ // removal if (grid.get(grid_x)?.has(grid_y)) { let type = grid.get(grid_x)!.get(grid_y)!; + if (type === PartType.Hearty) { + return; + } grid.get(grid_x)?.delete(grid_y); part_counts.set(type, { used: part_counts.get(type)!.used - 1,