Skip to content

Commit

Permalink
All but Helm refactored. Minor logic updates. (#31)
Browse files Browse the repository at this point in the history
There's still more to do, but we're getting there.
  • Loading branch information
wolfman2000 authored Apr 14, 2024
1 parent b9ba7f1 commit c1de102
Show file tree
Hide file tree
Showing 33 changed files with 512 additions and 558 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "lanky-tracker",
"version": "3.3.1",
"version": "3.3.2",
"description": "An DK 64 Rando Tracker Electron application with React and TypeScript",
"main": "./out/main/index.js",
"author": "wolfman2000",
"homepage": "https://electron-vite.org",
"homepage": "https://wolfman2000.github.io/",
"scripts": {
"format": "prettier --write .",
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
Expand Down
13 changes: 3 additions & 10 deletions src/renderer/src/components/levels/3-factory/Arenas.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import ArenaPool from '@renderer/components/pools/Arenas'
import { useFactoryTesting, usePlayFactory } from '@renderer/hooks/factory'
import { useAnyKong, useGrab } from '@renderer/hooks/kongs'
import { useArena, useGeneralThing } from '@renderer/hooks/factory'
import { useShuffledArenas } from '@renderer/hooks/settings'
import FactoryCheck from './FactoryCheck'

const Vanilla: React.FC = () => {
const inStage = useFactoryTesting()
const grab = useGrab()
return (
<FactoryCheck id={3090} name="Factory Arena" region="R&D Area" canGetLogic={inStage && grab} />
)
return <FactoryCheck id={3090} name="Factory Arena" region="R&D Area" canGetLogic={useArena()} />
}

const Shuffled: React.FC = () => {
const inStage = usePlayFactory()
const anyKong = useAnyKong()
return (
<>
<FactoryCheck id={3190} name="Factory Arena" canGetLogic={inStage && anyKong} />
<FactoryCheck id={3190} name="Factory Arena" canGetLogic={useGeneralThing()} />
</>
)
}
Expand Down
26 changes: 6 additions & 20 deletions src/renderer/src/components/levels/3-factory/Crates.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,33 @@
import CratePool from '@renderer/components/pools/Crates'
import { useFactoryTesting, usePlayFactory } from '@renderer/hooks/factory'
import { useAnyKong } from '@renderer/hooks/kongs'
import { useGeneralTest, useGeneralThing } from '@renderer/hooks/factory'
import { useShuffleCrates } from '@renderer/hooks/settings'
import FactoryCheck from './FactoryCheck'

const Vanilla: React.FC = () => {
const inStage = usePlayFactory()
const anyKong = useAnyKong()
const testing = useFactoryTesting()
return (
<>
<FactoryCheck
id={3060}
name="Factory Crate Candy"
region="Storage And Arcade"
canGetLogic={inStage && anyKong}
canGetLogic={useGeneralThing()}
/>
<FactoryCheck
id={3061}
name="Factory Crate Funky"
region="Testing Area"
canGetLogic={testing && anyKong}
canGetLogic={useGeneralTest()}
/>
</>
)
}

const Shuffled: React.FC = () => {
const anyKong = useAnyKong()
const inStage = usePlayFactory()

const thing = useGeneralThing()
return (
<>
<FactoryCheck
id={1260}
name="Factory Crate Location #1 (maybe)"
canGetLogic={inStage && anyKong}
/>
<FactoryCheck
id={1261}
name="Factory Crate Location #2 (maybe)"
canGetLogic={inStage && anyKong}
/>
<FactoryCheck id={1260} name="Factory Crate Location #1 (maybe)" canGetLogic={thing} />
<FactoryCheck id={1261} name="Factory Crate Location #2 (maybe)" canGetLogic={thing} />
</>
)
}
Expand Down
24 changes: 5 additions & 19 deletions src/renderer/src/components/levels/3-factory/Dirt.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,25 @@
import RainbowCoinPool from '@renderer/components/pools/RainbowCoins'
import { usePlayFactory } from '@renderer/hooks/factory'
import { useAnyKong, usePunch, useShockwave } from '@renderer/hooks/kongs'
import { useFactoryDirt, useGeneralDirt } from '@renderer/hooks/factory'
import { useShuffleDirt } from '@renderer/hooks/settings'
import FactoryCheck from './FactoryCheck'

const VanillaDirtLocations: React.FC = () => {
const inStage = usePlayFactory()
const shockwave = useShockwave()
const punch = usePunch()
return (
<FactoryCheck
id={3070}
name="Factory Dirt Dark Room"
region="Storage And Arcade"
canGetLogic={inStage && punch && shockwave}
canGetLogic={useFactoryDirt()}
/>
)
}

const ShuffledDirtLocations: React.FC = () => {
const anyKong = useAnyKong()
const shockwave = useShockwave()
const inStage = usePlayFactory()
const dirt = useGeneralDirt()
return (
<>
<FactoryCheck
id={3270}
name="Factory Dirt Location #1"
canGetLogic={inStage && anyKong && shockwave}
/>
<FactoryCheck
id={3271}
name="Factory Dirt Location #2"
canGetLogic={inStage && anyKong && shockwave}
/>
<FactoryCheck id={3270} name="Factory Dirt Location #1" canGetLogic={dirt} />
<FactoryCheck id={3271} name="Factory Dirt Location #2" canGetLogic={dirt} />
</>
)
}
Expand Down
30 changes: 6 additions & 24 deletions src/renderer/src/components/levels/3-factory/Fairies.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,33 @@
import FairyPool from '@renderer/components/pools/Fairies'
import { useFactoryTesting, usePlayFactory, useSlamFactory } from '@renderer/hooks/factory'
import { useAnyKong, useCamera, useFeather, useMini } from '@renderer/hooks/kongs'
import { useDartFairy, useGeneralFairy, useNumberFairy } from '@renderer/hooks/factory'
import { useShuffleFairies } from '@renderer/hooks/settings'
import FactoryCheck from './FactoryCheck'

const Vanilla: React.FC = () => {
const testing = useFactoryTesting()
const camera = useCamera()
const anyKong = useAnyKong()
const mini = useMini()
const feather = useFeather()
const canSlam = useSlamFactory()
return (
<>
<FactoryCheck
id={3080}
name="Factory Fairy Counting"
region="Testing Area"
canGetLogic={testing && camera && anyKong}
canGetLogic={useNumberFairy()}
/>
<FactoryCheck
id={3081}
name="Factory Fairy Dartboard"
region="Testing Area"
canGetLogic={testing && camera && mini && canSlam && feather}
canGetLogic={useDartFairy()}
/>
</>
)
}

const Shuffled: React.FC = () => {
const anyKong = useAnyKong()
const inStage = usePlayFactory()
const camera = useCamera()

const thing = useGeneralFairy()
return (
<>
<FactoryCheck
id={3280}
name="Factory Fairy Location #1"
canGetLogic={inStage && anyKong && camera}
/>
<FactoryCheck
id={3281}
name="Factory Fairy Location #2"
canGetLogic={inStage && anyKong && camera}
/>
<FactoryCheck id={3280} name="Factory Fairy Location #1" canGetLogic={thing} />
<FactoryCheck id={3281} name="Factory Fairy Location #2" canGetLogic={thing} />
</>
)
}
Expand Down
34 changes: 13 additions & 21 deletions src/renderer/src/components/levels/3-factory/Kasplats.tsx
Original file line number Diff line number Diff line change
@@ -1,62 +1,54 @@
import KasplatPool from '@renderer/components/pools/Kasplats'
import { useFactoryProductionTop, useFactoryTesting, usePlayFactory } from '@renderer/hooks/factory'
import { useAnyKong } from '@renderer/hooks/kongs'
import { useGeneralTest, useGeneralThing, useProductionKasplat } from '@renderer/hooks/factory'
import { useShuffleKasplats } from '@renderer/hooks/settings'
import FactoryCheck from './FactoryCheck'

const Vanilla: React.FC = () => {
const inStage = usePlayFactory()
const production = useFactoryProductionTop()
const testing = useFactoryTesting()
const anyKong = useAnyKong()

return (
<>
<FactoryCheck
id={3050}
name="Factory Kasplat Upper Production Pipe"
region="Production Room"
canGetLogic={production && anyKong}
canGetLogic={useProductionKasplat()}
/>
<FactoryCheck
id={3051}
name="Factory Kasplat Production Floor"
region="Production Room"
canGetLogic={inStage && anyKong}
canGetLogic={useGeneralThing()}
/>
<FactoryCheck
id={3052}
name="Factory Kasplat R&D"
region="Testing Area"
canGetLogic={testing && anyKong}
region="R&D Area"
canGetLogic={useGeneralTest()}
/>
<FactoryCheck
id={3053}
name="Factory Kasplat Pole to Arcade"
region="Storage And Arcade"
canGetLogic={inStage && anyKong}
canGetLogic={useGeneralThing()}
/>
<FactoryCheck
id={3054}
name="Factory Kasplat Block Tower"
region="Testing Area"
canGetLogic={testing && anyKong}
canGetLogic={useGeneralTest()}
/>
</>
)
}

const Shuffled: React.FC = () => {
const anyKong = useAnyKong()
const inStage = usePlayFactory()

const kasplat = useGeneralThing()
return (
<>
<FactoryCheck id={3250} name="Factory Kasplat Location #1" canGetLogic={inStage && anyKong} />
<FactoryCheck id={3251} name="Factory Kasplat Location #2" canGetLogic={inStage && anyKong} />
<FactoryCheck id={3252} name="Factory Kasplat Location #3" canGetLogic={inStage && anyKong} />
<FactoryCheck id={3253} name="Factory Kasplat Location #4" canGetLogic={inStage && anyKong} />
<FactoryCheck id={3254} name="Factory Kasplat Location #5" canGetLogic={inStage && anyKong} />
<FactoryCheck id={3250} name="Factory Kasplat Location #1" canGetLogic={kasplat} />
<FactoryCheck id={3251} name="Factory Kasplat Location #2" canGetLogic={kasplat} />
<FactoryCheck id={3252} name="Factory Kasplat Location #3" canGetLogic={kasplat} />
<FactoryCheck id={3253} name="Factory Kasplat Location #4" canGetLogic={kasplat} />
<FactoryCheck id={3254} name="Factory Kasplat Location #5" canGetLogic={kasplat} />
</>
)
}
Expand Down
11 changes: 3 additions & 8 deletions src/renderer/src/components/levels/4-galleon/Arenas.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
import ArenaPool from '@renderer/components/pools/Arenas'
import { usePlayGalleon } from '@renderer/hooks/galleon'
import { useAnyKong, usePunch } from '@renderer/hooks/kongs'
import { useArena, useGeneralThing } from '@renderer/hooks/galleon'
import { useShuffledArenas } from '@renderer/hooks/settings'
import GalleonCheck from './GalleonCheck'

const Vanilla: React.FC = () => {
const inStage = usePlayGalleon()
const punch = usePunch()
return (
<GalleonCheck
id={4090}
name="Galleon Arena"
region="Galleon Caverns"
canGetLogic={inStage && punch}
canGetLogic={useArena()}
/>
)
}

const Shuffled: React.FC = () => {
const inStage = usePlayGalleon()
const anyKong = useAnyKong()
return (
<>
<GalleonCheck id={4190} name="Galleon Arena" canGetLogic={inStage && anyKong} />
<GalleonCheck id={4190} name="Galleon Arena" canGetLogic={useGeneralThing()} />
</>
)
}
Expand Down
23 changes: 5 additions & 18 deletions src/renderer/src/components/levels/4-galleon/Crates.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
import CratePool from '@renderer/components/pools/Crates'
import { useGalleonOutskirts, usePlayGalleon } from '@renderer/hooks/galleon'
import { useAnyKong } from '@renderer/hooks/kongs'
import { useGeneralOutskirts, useGeneralThing } from '@renderer/hooks/galleon'
import { useShuffleCrates } from '@renderer/hooks/settings'
import GalleonCheck from './GalleonCheck'

const Vanilla: React.FC = () => {
const outskirts = useGalleonOutskirts()
const anyKong = useAnyKong()
return (
<>
<GalleonCheck
id={4060}
name="Galleon Crate Cactus"
region="Shipyard Outskirts"
canGetLogic={outskirts && anyKong}
canGetLogic={useGeneralOutskirts()}
/>
</>
)
}

const Shuffled: React.FC = () => {
const anyKong = useAnyKong()
const inStage = usePlayGalleon()

const thing = useGeneralThing()
return (
<>
<GalleonCheck
id={4260}
name="Galleon Crate Location #1 (maybe)"
canGetLogic={inStage && anyKong}
/>
<GalleonCheck
id={4261}
name="Galleon Crate Location #2 (maybe)"
canGetLogic={inStage && anyKong}
/>
<GalleonCheck id={4260} name="Galleon Crate Location #1 (maybe)" canGetLogic={thing} />
<GalleonCheck id={4261} name="Galleon Crate Location #2 (maybe)" canGetLogic={thing} />
</>
)
}
Expand Down
Loading

0 comments on commit c1de102

Please sign in to comment.