diff --git a/public/boat.webp b/public/boat.webp new file mode 100644 index 0000000..8e7a404 Binary files /dev/null and b/public/boat.webp differ diff --git a/public/gas.webp b/public/gas.webp new file mode 100644 index 0000000..09a82fc Binary files /dev/null and b/public/gas.webp differ diff --git a/public/laura-selected.webp b/public/laura-selected.webp new file mode 100644 index 0000000..70b5f86 Binary files /dev/null and b/public/laura-selected.webp differ diff --git a/public/laura.webp b/public/laura.webp new file mode 100644 index 0000000..6f0983f Binary files /dev/null and b/public/laura.webp differ diff --git a/public/mama-selected.webp b/public/mama-selected.webp new file mode 100644 index 0000000..45a4f83 Binary files /dev/null and b/public/mama-selected.webp differ diff --git a/public/mama.webp b/public/mama.webp new file mode 100644 index 0000000..55c51bf Binary files /dev/null and b/public/mama.webp differ diff --git a/public/med.webp b/public/med.webp new file mode 100644 index 0000000..4cbcc1a Binary files /dev/null and b/public/med.webp differ diff --git a/public/nick-selected.webp b/public/nick-selected.webp new file mode 100644 index 0000000..d6e626c Binary files /dev/null and b/public/nick-selected.webp differ diff --git a/public/nick.webp b/public/nick.webp new file mode 100644 index 0000000..bf46c22 Binary files /dev/null and b/public/nick.webp differ diff --git a/public/papa-selected.webp b/public/papa-selected.webp new file mode 100644 index 0000000..cc6b221 Binary files /dev/null and b/public/papa-selected.webp differ diff --git a/public/papa.webp b/public/papa.webp new file mode 100644 index 0000000..8393524 Binary files /dev/null and b/public/papa.webp differ diff --git a/public/pepper-selected.webp b/public/pepper-selected.webp new file mode 100644 index 0000000..1cacc14 Binary files /dev/null and b/public/pepper-selected.webp differ diff --git a/public/pepper.webp b/public/pepper.webp new file mode 100644 index 0000000..fdf9fa1 Binary files /dev/null and b/public/pepper.webp differ diff --git a/public/pizza.webp b/public/pizza.webp new file mode 100644 index 0000000..d513736 Binary files /dev/null and b/public/pizza.webp differ diff --git a/public/race.webp b/public/race.webp new file mode 100644 index 0000000..997419c Binary files /dev/null and b/public/race.webp differ diff --git a/public/save.webp b/public/save.webp new file mode 100644 index 0000000..6456417 Binary files /dev/null and b/public/save.webp differ diff --git a/src/app.css b/src/app.css index ede87c5..1b14418 100644 --- a/src/app.css +++ b/src/app.css @@ -412,7 +412,8 @@ body { text-decoration: underline; } -#configure-page .page-inner-content.config-layout { +#configure-page .page-inner-content.config-layout, +#save-editor .page-inner-content.config-layout { display: flex; background-color: var(--color-bg-input); border: 1px solid #303030; @@ -1403,7 +1404,8 @@ select:focus { display: none; } - #configure-page .page-inner-content.config-layout { + #configure-page .page-inner-content.config-layout, + #save-editor .page-inner-content.config-layout { background-color: transparent; border: none; padding: 0; diff --git a/src/lib/SaveEditorPage.svelte b/src/lib/SaveEditorPage.svelte index 9d385ca..971ef60 100644 --- a/src/lib/SaveEditorPage.svelte +++ b/src/lib/SaveEditorPage.svelte @@ -1,17 +1,48 @@ -
+
-
-

Save Editor

+
+
+ LEGO Island Save Editor +
+
+
+ {#if loading} + Loading save files... + {:else if error} + {error} + {:else if existingSlots.length === 0} + No save files found + {:else} + {#each existingSlots as slot} + + {/each} + {/if} +
- {#if loading} -
-

Loading save files...

-
- {:else if error} -
-

Error: {error}

-
- {:else if existingSlots.length === 0} -
-

No save files found. Start a new game to create a save file.

-
- {:else} -
- + {#if currentSlot && currentSlot.exists} +
+
+ {#each saveTabs as tab} + + {/each} +
- {#if currentSlot && currentSlot.exists} -
- + +
+
+ +
+
+
+ {#each nameSlots as char, i} + handleSlotBeforeInput(i, e)} + onkeydown={(e) => handleSlotKeydown(i, e)} + onfocus={handleSlotFocus} + bind:this={slotRefs[i]} + /> + {/each} +
+
+
+
+ +
+ +
+
+
+
+ +
+ {#each actorOptions as actor} + + {/each} +
+
+
+ +
+ +
+
+
+
+
+
+
+ + +
- {/if} -
- {/if} +
+ {/if} +
diff --git a/src/lib/save-editor/MissionScoresEditor.svelte b/src/lib/save-editor/MissionScoresEditor.svelte index 6486747..681a73b 100644 --- a/src/lib/save-editor/MissionScoresEditor.svelte +++ b/src/lib/save-editor/MissionScoresEditor.svelte @@ -6,11 +6,11 @@ export let onUpdate = () => {}; const missions = [ - { key: 'pizza', name: MissionNames.pizza }, - { key: 'carRace', name: MissionNames.carRace }, - { key: 'jetskiRace', name: MissionNames.jetskiRace }, - { key: 'towTrack', name: MissionNames.towTrack }, - { key: 'ambulance', name: MissionNames.ambulance } + { key: 'pizza', name: MissionNames.pizza, icon: 'pizza.webp' }, + { key: 'carRace', name: MissionNames.carRace, icon: 'race.webp' }, + { key: 'jetskiRace', name: MissionNames.jetskiRace, icon: 'boat.webp' }, + { key: 'towTrack', name: MissionNames.towTrack, icon: 'gas.webp' }, + { key: 'ambulance', name: MissionNames.ambulance, icon: 'med.webp' } ]; const actors = [ @@ -45,75 +45,60 @@ } -
-

Mission Scores

- -
- {#key missionData} -
-
-
- {#each actors as actor} -
{actor.name}
- {/each} -
- - {#each missions as mission} -
-
{mission.name}
- {#each actors as actor} -
- handleScoreChange(mission.key, actor.id, 'score', c)} - title="Score" - /> - handleScoreChange(mission.key, actor.id, 'highScore', c)} - title="High Score" - isHighScore={true} - /> -
- {/each} -
+
+ {#key missionData} +
+
+
+ {#each actors as actor} +
{actor.name}
{/each}
- {/key} -
-
- - Grey - - - Yellow - - - Blue - - - Red - - | - H = High Score + {#each missions as mission} +
+
+ {mission.name} +
+ {#each actors as actor} +
+ handleScoreChange(mission.key, actor.id, 'score', c)} + title="Score" + /> + handleScoreChange(mission.key, actor.id, 'highScore', c)} + title="High Score" + isHighScore={true} + /> +
+ {/each} +
+ {/each}
+ {/key} +
+ +
+ + Grey + + + Yellow + + + Blue + + + Red + + | + H = High Score
diff --git a/src/lib/save-editor/PlayerInfoEditor.svelte b/src/lib/save-editor/PlayerInfoEditor.svelte deleted file mode 100644 index 5acd1f5..0000000 --- a/src/lib/save-editor/PlayerInfoEditor.svelte +++ /dev/null @@ -1,298 +0,0 @@ - - -
-

Player Info

- -
- Name -
- {#each nameSlots as char, i} - handleSlotBeforeInput(i, e)} - onkeydown={(e) => handleSlotKeydown(i, e)} - onfocus={handleSlotFocus} - bind:this={slotRefs[i]} - /> - {/each} -
-
- -
- -
- -
-
- -
- -
- -
-
-
- - diff --git a/src/lib/save-editor/SaveSlotCard.svelte b/src/lib/save-editor/SaveSlotCard.svelte deleted file mode 100644 index 2d9f1dd..0000000 --- a/src/lib/save-editor/SaveSlotCard.svelte +++ /dev/null @@ -1,77 +0,0 @@ - - - - - diff --git a/src/lib/save-editor/SaveSlotList.svelte b/src/lib/save-editor/SaveSlotList.svelte deleted file mode 100644 index 8f75398..0000000 --- a/src/lib/save-editor/SaveSlotList.svelte +++ /dev/null @@ -1,54 +0,0 @@ - - -
-

Save Slots

- {#if existingSlots.length === 0} -

No save files found

- {:else} -
- {#each existingSlots as slot} - onSelect(slot.slotNumber)} - /> - {/each} -
- {/if} -
- -