Skip to content

Commit

Permalink
mb for not commiting this for like 4 years :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zickles committed Jul 20, 2024
1 parent b6b2663 commit 4899069
Show file tree
Hide file tree
Showing 7 changed files with 396 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/constants/NotEnoughUpdates-REPO
Submodule NotEnoughUpdates-REPO updated 61 files
+1 −103 constants/dyes.json
+4 −1 constants/hotmlayout.json
+1 −30 constants/sacks.json
+1 −5 items/AMBER_NECKLACE.json
+1 −5 items/AMETHYST_GAUNTLET.json
+1 −4 items/ANGLER_DEEP_SEA.json
+1 −4 items/ARMADILLO_MASK.json
+1 −4 items/ARTIFACT_OF_COINS.json
+1 −5 items/AVARICIOUS_CHALICE.json
+1 −5 items/BEACH_BALL_BARN_SKIN.json
+1 −4 items/BEACH_BALL_FLUX.json
+1 −4 items/BEE_MASK.json
+1 −5 items/BLOOD_SOAKED_COINS.json
+1 −5 items/BLOOD_STAINED_COINS.json
+1 −5 items/BROWN_BANDANA.json
+1 −5 items/CARNIVAL_MASK_BAG.json
+1 −5 items/CARNIVAL_TICKET.json
+1 −4 items/CROWN_OF_AVARICE.json
+1 −5 items/DIVAN_POWDER_COATING.json
+0 −22 items/DYE_PORTAL.json
+1 −5 items/EMERALD_ARTIFACT.json
+1 −5 items/FINE_FLOUR.json
+1 −5 items/FRESHLY_MINTED_COINS.json
+1 −4 items/FROG_MASK.json
+1 −5 items/GLEAMING_CRYSTAL.json
+1 −6 items/GLOSSY_GEMSTONE.json
+1 −5 items/GLOSSY_MINERAL_BOOTS.json
+1 −5 items/GLOSSY_MINERAL_CHESTPLATE.json
+1 −5 items/GLOSSY_MINERAL_HELMET.json
+1 −5 items/GLOSSY_MINERAL_LEGGINGS.json
+1 −5 items/GLOSSY_MINERAL_TALISMAN.json
+1 −5 items/GOLDEN_BOUNTY.json
+1 −5 items/GOLDEN_FRAGMENT.json
+1 −4 items/HAMBAGGER_BACKPACK.json
+1 −5 items/JADE_BELT.json
+1 −5 items/LARGE_EVENTS_SACK.json
+1 −5 items/MITHRIL_BELT.json
+1 −5 items/MITHRIL_CLOAK.json
+1 −5 items/MITHRIL_GAUNTLET.json
+1 −5 items/MITHRIL_NECKLACE.json
+1 −4 items/PARROT_MASK.json
+1 −5 items/PARTY_GIFT.json
+1 −5 items/PEST_VEST.json
+1 −5 items/PET_SKIN_BLAZE_PLUSHIE.json
+1 −5 items/PET_SKIN_BLUE_WHALE_PLUSHIE.json
+1 −4 items/PET_SKIN_FLYING_FISH_HARLEQUIN.json
+1 −5 items/PET_SKIN_WOLF_DOGE_PLUSHIE.json
+1 −4 items/REKINDLED_EMBER_BURNING.json
+1 −4 items/RELIC_OF_COINS.json
+1 −4 items/RING_OF_COINS.json
+1 −4 items/SALMON_MASK.json
+1 −5 items/SAND_CASTLE_BARN_SKIN.json
+1 −5 items/SAPPHIRE_CLOAK.json
+1 −5 items/SCAVENGER_ARTIFACT.json
+1 −5 items/SCAVENGER_RING.json
+1 −4 items/STARLIGHT_STARKNIGHT.json
+1 −5 items/TITANIUM_BELT.json
+1 −5 items/TITANIUM_CLOAK.json
+1 −5 items/TITANIUM_GAUNTLET.json
+1 −5 items/TITANIUM_NECKLACE.json
+1 −4 items/ZOMBIE_MASK.json
40 changes: 40 additions & 0 deletions src/lib/sections/stats/Bestiary.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<script lang="ts">
import AdditionStat from "$lib/components/AdditionStat.svelte";
import Chip from "$lib/components/Chip.svelte";
import Items from "$lib/layouts/stats/Items.svelte";
import type { Stats as StatsType } from "$types/stats";
import { getContext } from "svelte";
const profile = getContext<StatsType>("profile");
const bestiary = profile.bestiary;
</script>

<Items title="Bestiary">
<div slot="text">
<AdditionStat text="Bestiary Level" data={`${bestiary.milestone / 10} / ${bestiary.maxMilestone / 10}`} />
<AdditionStat text="Families Unlocked" data={`${bestiary.familiesUnlocked} / ${bestiary.totalFamilies}`} />
<AdditionStat text="Families Completed" data={`${bestiary.familiesMaxed} / ${bestiary.totalFamilies}`} />
</div>

{#each Object.entries(bestiary.categories) as [_, category]}
{@const max = category.mobsMaxed === category.mobs.length ? "MAX!" : `(${category.mobsMaxed} / ${category.mobs.length} MAX)`}
<Items subtitle={category.name + " " + max}>
{#each category.mobs as mob}
<Chip name={mob.name} tier={mob.tier ?? 0} texture={mob.texture} extra={[["Kills", mob.kills]]}>
{#if mob.kills >= mob.maxKills}
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
<p>Progress: max!</p>
</div>
{:else}
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
<p>Progress to Tier {mob.tier}: {mob.kills} / {mob.nextTierKills}</p>
<p />
<p>Overall Progress: {mob.kills} / {mob.maxKills}</p>
</div>
{/if}
</Chip>
{/each}
</Items>
{/each}
</Items>
36 changes: 36 additions & 0 deletions src/lib/sections/stats/Collections.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<script lang="ts">
import AdditionStat from "$lib/components/AdditionStat.svelte";
import Chip from "$lib/components/Chip.svelte";
import Items from "$lib/layouts/stats/Items.svelte";
import { formatNumber } from "$lib/tools";
import type { Stats as StatsType } from "$types/stats";
import { format } from "numerable";
import { getContext } from "svelte";
const profile = getContext<StatsType>("profile");
const collections = profile.collections;
</script>

<Items title="Collections">
<div slot="text">
<AdditionStat text="Maxed Collections" data={`${collections.maxedCollections} / ${collections.totalCollections}`} />
</div>

{#each Object.entries(collections.categories) as [_, category]}
{@const max = category.maxTiers === category.totalTiers ? "MAX!" : `(${category.totalTiers} / ${category.maxTiers} MAX)`}
<Items subtitle={category.name + " " + max}>
{#each category.items as collection}
<Chip name={collection.name} tier={collection.tier ?? 0} texture={collection.texture} extra={[["Amount", formatNumber(collection.amount)]]}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
{#each collection.amounts as amount}
<p>{amount.username}: {format(amount.amount)}</p>
{/each}
<p />
<p>Total Amount: {format(collection.totalAmount)}</p>
</div>
</Chip>
{/each}
</Items>
{/each}
</Items>
44 changes: 44 additions & 0 deletions src/lib/sections/stats/CrimsonIsle.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<script lang="ts">
import AdditionStat from "$lib/components/AdditionStat.svelte";
import Chip from "$lib/components/Chip.svelte";
import Items from "$lib/layouts/stats/Items.svelte";
import type { Stats as StatsType } from "$types/stats";
import { getContext } from "svelte";
const profile = getContext<StatsType>("profile");
const isle = profile.crimson_isle;
</script>

<Items title="Crimson Isle">
<div slot="text">
<AdditionStat text="Selected Faction" data={`${isle.factions.selectedFaction}`} />
<AdditionStat text="Mage Reputation" data={`${isle.factions.magesReputation}`} />
<AdditionStat text="Barbarian Reputation" data={`${isle.factions.barbariansReputation}`} />
</div>

<Items subtitle="Kuudra Completions">
<div slot="text">
<AdditionStat text="Total Completions" data={`${isle.kuudra.totalKills}`} />
</div>
{#each isle.kuudra.tiers as type}
<Chip name={type.name} texture={type.head} extra={[["Kills", type.kills]]} noHover={true} />
{/each}
</Items>
<Items subtitle="Dojo Completions">
<div slot="text">
<AdditionStat text="Total Points" data={`${isle.dojo.totalPoints}`} />
</div>
{#each isle.dojo.challenges as challenge}
<Chip
name={challenge.name}
texture={challenge.texture}
extra={[
["Points", challenge.points],
["Rank", challenge.rank],
["Time", challenge.time / 1000 + " Seconds"]
]}
noHover={true} />
{/each}
</Items>
</Items>
40 changes: 40 additions & 0 deletions src/lib/sections/stats/Minions.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<script lang="ts">
import AdditionStat from "$lib/components/AdditionStat.svelte";
import Chip from "$lib/components/Chip.svelte";
import Items from "$lib/layouts/stats/Items.svelte";
import type { Stats as StatsType } from "$types/stats";
import { getContext } from "svelte";
//import {romanize } from "$lib/helper";
const profile = getContext<StatsType>("profile");
const minions = profile.minions;
</script>

<Items title="Minions">
<div slot="text">
<AdditionStat text="Unique Minions" data={`${minions.maxedTiers} / ${minions.totalTiers} (${Math.round((minions.maxedTiers / minions.totalTiers) * 100)}%)`} />
<AdditionStat text="Minion Slots" data={`${minions.minionsSlots.current} (${minions.minionsSlots.next} to next slot)`} />
<AdditionStat text="Bonus Minion Slots" data={`${minions.minionsSlots.bonusSlots} / 5`} />
<AdditionStat text="Maxed Minions" data={`${minions.maxedMinions} / ${minions.totalMinions}`} />
</div>

{#each Object.entries(minions.minions) as [name, category]}
{@const max = category.maxedMinions === category.totalMinions ? "MAX!" : `(${category.maxedMinions} / ${category.totalMinions} MAX)`}
<Items subtitle={name + " " + max}>
{#each category.minions as minion}
<Chip name={minion.name} tier={minion.tiers.at(-1) ?? 0} texture={minion.texture}>
<div class="flex items-center gap-2 text-lg font-bold text-text/60">
{#each Array.from({ length: minion.maxTier }, (_, index) => index + 1) as tier}
{#if minion.tiers.at(tier - 1) !== undefined}
<p class="text-icon/90">{tier}</p>
{:else}
<p>{tier}</p>
{/if}
{/each}
</div>
</Chip>
{/each}
</Items>
{/each}
</Items>
178 changes: 178 additions & 0 deletions src/lib/sections/stats/Miscellaneous.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<script lang="ts">
import AdditionStat from "$lib/components/AdditionStat.svelte";
import Chip from "$lib/components/Chip.svelte";
import Items from "$lib/layouts/stats/Items.svelte";
import { formatNumber } from "$lib/tools";
import type { Stats as StatsType } from "$types/stats";
import { Collapsible } from "bits-ui";

Check failure on line 7 in src/lib/sections/stats/Miscellaneous.svelte

View workflow job for this annotation

GitHub Actions / Check linting (es-lint)

'Collapsible' is defined but never used. Allowed unused vars must match /^_/u

Check failure on line 7 in src/lib/sections/stats/Miscellaneous.svelte

View workflow job for this annotation

GitHub Actions / Check linting (es-lint)

'Collapsible' is defined but never used. Allowed unused vars must match /^_/u
import { format } from "numerable";
import { getContext } from "svelte";
const profile = getContext<StatsType>("profile");
const misc = profile.misc;
</script>

<Items title="Miscellaneous">
<Items subtitle="Essence">
{#each misc.essence as essence}
<Chip name={essence.name} texture={essence.texture} extra={[["Amount", format(essence.amount)]]} noHover={true} />
{/each}
<!-- TODO essence shop -->
<!-- <Collapsible.Root>
<Collapsible.Trigger><p>Essence Shop</p></Collapsible.Trigger>
<Collapsible.Content>
TODO Essence Shop is not in api yet i dont think.
</Collapsible.Content>
</Collapsible.Root> -->
</Items>
<div>
<!-- TODO kills can't be done till my next pr where i make the component for it -->
<!-- TODO races same reason as above ^ -->
<Items subtitle="Gifts">
<div slot="text">
<AdditionStat text="Gifts Given" data={`${format(misc.gifts.given)}`} />
<AdditionStat text="Gifts Received" data={`${format(misc.gifts.received)}`} />
</div>
</Items>
<Items subtitle="Season of Jerry">
<div slot="text">
<AdditionStat text="Most Winter Snowballs Hit" data={`${misc.season_of_jerry.most_snowballs_hit}`} />
<AdditionStat text="Most Winter Damage Dealt" data={`${misc.season_of_jerry.most_damage_dealt}`} />
<AdditionStat text="Most Winter Magma Damage Dealt" data={`${misc.season_of_jerry.most_magma_damage_dealt}`} />
<AdditionStat text="Most Winter Cannonballs Hit" data={`${misc.season_of_jerry.most_cannonballs_hit}`} />
</div>
</Items>
<Items subtitle="Dragons">
<div slot="text">
<AdditionStat text="Most Damage" data={`${format(misc.dragons.most_damage.best.toFixed(2))}`} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
{#each Object.entries(misc.dragons.most_damage) as [dragon, dmg]}
{#if dragon !== "best"}
<p class="capitalize">{dragon}: {format(dmg.toFixed(2))}</p>
{/if}
{/each}
</div>
</AdditionStat>
<!-- TODO format time -->
<AdditionStat text="Fastest Kill" data={`${misc.dragons.fastest_kill.best}`} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
{#each Object.entries(misc.dragons.fastest_kill) as [dragon, time]}
{#if dragon !== "best"}
<p class="capitalize">{dragon}: {time}</p>
{/if}
{/each}
</div>
</AdditionStat>
<AdditionStat text="Last Hits" data={``} />
<AdditionStat text="Deaths" data={`${misc.dragons.deaths.total}`} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
{#each Object.entries(misc.dragons.fastest_kill) as [dragon, death]}
{#if dragon !== "total"}
<p class="capitalize">{dragon}: {format(death)}</p>
{/if}
{/each}
</div>
</AdditionStat>
</div>
</Items>
<Items subtitle="Endstone Protector">
<div slot="text">
<AdditionStat text="Kills" data={format(misc.endstone_protector.kills)} />
<AdditionStat text="Deaths" data={format(misc.endstone_protector.deaths)} />
</div>
</Items>
<Items subtitle="Damage">
<div slot="text">
<AdditionStat text="Highest Critical Damage" data={format(misc.damage.highest_critical_damage.toFixed(2))} />
</div>
</Items>
<Items subtitle="Pet Milestones">
<!-- TODO add color -->
<div slot="text">
<AdditionStat text="Sea Creatures Killed" data={format(misc.pet_milestones.sea_creatures_killed.amount)} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
<p class="capitalize">Pet: {misc.pet_milestones.sea_creatures_killed.rarity}</p>
<p class="capitalize">Progress: {misc.pet_milestones.sea_creatures_killed.progress === "100.00" ? "maxed!" : misc.pet_milestones.sea_creatures_killed.progress}</p>
</div>
</AdditionStat>
<AdditionStat text="Ores Mined" data={format(misc.pet_milestones.ores_mined.amount)} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
<p class="capitalize">Pet: {misc.pet_milestones.ores_mined.rarity}</p>
<p class="capitalize">Progress: {misc.pet_milestones.ores_mined.progress === "100.00" ? "maxed!" : misc.pet_milestones.ores_mined.progress}</p>
</div>
</AdditionStat>
</div>
</Items>
<!-- TODO Mythological Event -->
<Items subtitle="Potions">
<div slot="text">
{#if misc.effects.active.length > 0}
<!-- TODO fix this shit -->
<AdditionStat text="Active Potion Effects" data={`${misc.effects.active.length}`} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
<p>Active Potion Effects:</p>
{#each misc.effects.active as effect}
<p class="capitalize">{effect.effect}</p>
{/each}
</div>
</AdditionStat>
{/if}
{#if misc.effects.disabled.length > 0}
<AdditionStat text="Disabled Potion Effects" data={`${misc.effects.disabled.length}`} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
<p>Disabled Potion Effects:</p>
{#each misc.effects.disabled as effect}
<p class="capitalize">{effect}</p>
{/each}
</div>
</AdditionStat>
{/if}
{#if misc.effects.paused.length > 0}
<AdditionStat text="Disabled Potion Effects" data={`${misc.effects.paused.length}`} asterisk={true}>
<div class="flex flex-col gap-2 text-lg font-bold text-text/60">
<p>Paused Potion Effects:</p>
{#each misc.effects.paused as effect}
<p class="capitalize">{effect}</p>
{/each}
</div>
</AdditionStat>
{/if}
</div>
</Items>
<Items subtitle="Profile Upgrades">
<div slot="text">
<AdditionStat text="Island Size" data={`${misc.profile_upgrades.island_size}`} />
<AdditionStat text="Minion Slots" data={`${misc.profile_upgrades.minion_slots}`} />
<AdditionStat text="Guests Count" data={`${misc.profile_upgrades.guests_count}`} />
<AdditionStat text="Coop Slot" data={`${misc.profile_upgrades.coop_slots}`} />
<AdditionStat text="Coins Allowance" data={`${misc.profile_upgrades.coins_allowance}`} />
</div>
</Items>
<Items subtitle="Auctions Sold">
<div slot="text">
<AdditionStat text="Fees" data={format(misc.auctions.fees)} />
<AdditionStat text="Coins Earned" data={format(misc.auctions.gold_earned)} />
<AdditionStat text="Items Sold" data={format(misc.auctions.total_sold.total)} />
</div>
</Items>
<Items subtitle="Auctions Bought">
<div slot="text">
<AdditionStat text="Bids" data={format(misc.auctions.bids)} />
<AdditionStat text="Highest Bid" data={format(misc.auctions.highest_bid)} />
<AdditionStat text="Won" data={format(misc.auctions.won)} />
<AdditionStat text="Coins Spent" data={format(misc.auctions.gold_spent)} />
<AdditionStat text="Items Bought" data={format(misc.auctions.total_bought.total)} />
</div>
</Items>
<Items subtitle="Uncategorized">
<div slot="text">
<AdditionStat text="Soulflow" data={formatNumber(misc.uncategorized.soulflow.toString())} />
<AdditionStat text="Teleporter Pill Consumed" data={misc.uncategorized.teleporter_pill_consumed === true ? "Yes" : "No"} />
<AdditionStat text="Reaper Peppers Eaten" data={`${misc.uncategorized.reaper_peppers_eaten}`} />
<AdditionStat text="Bank Cooldown" data={`${misc.uncategorized.personal_bank}`} />
</div>
</Items>
</div>
<!-- TODO claimed items -->
</Items>
Loading

0 comments on commit 4899069

Please sign in to comment.