diff --git a/public/img/homeActions/catchFish.png b/public/img/homeActions/catchFish.png new file mode 100644 index 0000000..fd8f8b0 Binary files /dev/null and b/public/img/homeActions/catchFish.png differ diff --git a/public/img/homeActions/getShark.png b/public/img/homeActions/getShark.png new file mode 100644 index 0000000..cd9068e Binary files /dev/null and b/public/img/homeActions/getShark.png differ diff --git a/src/components/Tabs/Home.svelte b/src/components/Tabs/Home.svelte index 2cafdee..c451fd0 100644 --- a/src/components/Tabs/Home.svelte +++ b/src/components/Tabs/Home.svelte @@ -1,11 +1,14 @@
- {#each Object.entries(HomeActions.getActionTable()) as [homeActionId, homeAction]} - + {#each Object.entries(homeActions) as [homeActionId, homeAction]} + {#each Array(50).fill(homeAction) as homeActionClone} + + {/each} {/each}
@@ -39,5 +53,24 @@ div { display: flex; flex-direction: row; + flex-wrap: wrap; + + > button { + display: flex; + flex-direction: column; + + align-items: center; + justify-content: center; + + font-size: 1em; + width: 8em; + + &:not(.no-icons) { + height: 6em; + } + &.no-icons { + height: calc(6em - 50px); + } + } } diff --git a/src/components/Wrapper.svelte b/src/components/Wrapper.svelte index 6df2dd4..fff5f33 100644 --- a/src/components/Wrapper.svelte +++ b/src/components/Wrapper.svelte @@ -20,8 +20,10 @@ } let logLength: number; + let showIcons: boolean; game.Settings.settings.subscribe((settings) => { logLength = settings.layout.logLength.current; + showIcons = settings.appearance.showIcons.current; }); @@ -50,12 +52,23 @@
- + {#if game.TabHandler.currentTab === game.TabHandler.AllTabs.Home} + + {:else if game.TabHandler.currentTab === game.TabHandler.AllTabs.Lab} + + {:else} + + {/if}
diff --git a/src/shark/Settings.ts b/src/shark/Settings.ts index 22f8b9d..f9be57d 100644 --- a/src/shark/Settings.ts +++ b/src/shark/Settings.ts @@ -28,7 +28,14 @@ export class Settings extends StaticClass { default: "marine" as const, name: "Currently enabled theme" as const, description: "Only applied if planet-dependent styles are enabled" as const, - options: ["abandoned", "chaotic", "frigid", "haven", "marine", "shrouded", "tempestuous", "violent"], + options: ["abandoned", "chaotic", "frigid", "haven", "marine", "shrouded", "tempestuous", "violent"] as const, + }, + showIcons: { + current: true, + default: true as const, + name: "Show icons" as const, + description: "Whether to show decorative icons in various places" as const, + options: [true, false] as const, }, }, }; diff --git a/src/shark/SharkGame.ts b/src/shark/SharkGame.ts index 3d3b49f..6a383d4 100644 --- a/src/shark/SharkGame.ts +++ b/src/shark/SharkGame.ts @@ -5,6 +5,8 @@ import { Settings } from "./Settings"; import { StaticClass } from "./StaticClass"; import { TabHandler } from "./TabHandler"; +import { HomeActions } from "./data/HomeActions"; + export class SharkGame extends StaticClass { static readonly #GAME_NAMES = [ "Five Seconds A Shark", @@ -61,6 +63,9 @@ export class SharkGame extends StaticClass { static readonly Resources = Resources; static readonly TabHandler = TabHandler; static readonly SaveHandler = SaveHandler; + static readonly Data = Object.seal({ + HomeActions, + }); static init(): void { Log.init(); diff --git a/src/shark/data/HomeActions.ts b/src/shark/data/HomeActions.ts index 3de13ba..7670b85 100644 --- a/src/shark/data/HomeActions.ts +++ b/src/shark/data/HomeActions.ts @@ -7,6 +7,7 @@ export type HomeAction = { }; outcomes: string[]; multiOutcomes?: string[]; + image?: string; }; export class HomeActions extends StaticClass { @@ -16,7 +17,8 @@ export class HomeActions extends StaticClass { static readonly actionTable = Object.seal({ catchFish: { - name: "Catch fish", + image: "catchFish.png", + name: "Steal fish", effect: { resource: { fish: 1, @@ -66,7 +68,8 @@ export class HomeActions extends StaticClass { ], }, catchShark: { - name: "Catch shark", + image: "getShark.png", + name: "Kidnap shark", effect: { resource: { shark: 1,