diff --git a/src/lib/constants/NotEnoughUpdates-REPO b/src/lib/constants/NotEnoughUpdates-REPO index 9ab22630..8c016218 160000 --- a/src/lib/constants/NotEnoughUpdates-REPO +++ b/src/lib/constants/NotEnoughUpdates-REPO @@ -1 +1 @@ -Subproject commit 9ab226302fe724f91ad60eeafe915f47f5e60264 +Subproject commit 8c016218931ed66cba82ffb748b3e156636d8121 diff --git a/src/lib/constants/slayer.ts b/src/lib/constants/slayer.ts index ab8966a9..7395ae58 100644 --- a/src/lib/constants/slayer.ts +++ b/src/lib/constants/slayer.ts @@ -66,27 +66,27 @@ export const SLAYER_XP = { export const SLAYER_INFO = { zombie: { name: "Revenant Horror", - head: "/head/1fc0184473fe882d2895ce7cbc8197bd40ff70bf10d3745de97b6c2a9c5fc78f" + head: "/api/head/1fc0184473fe882d2895ce7cbc8197bd40ff70bf10d3745de97b6c2a9c5fc78f" }, spider: { name: "Tarantula Broodfather", - head: "/head/9d7e3b19ac4f3dee9c5677c135333b9d35a7f568b63d1ef4ada4b068b5a25" + head: "/api/head/9d7e3b19ac4f3dee9c5677c135333b9d35a7f568b63d1ef4ada4b068b5a25" }, wolf: { name: "Sven Packmaster", - head: "/head/f83a2aa9d3734b919ac24c9659e5e0f86ecafbf64d4788cfa433bbec189e8" + head: "/api/head/f83a2aa9d3734b919ac24c9659e5e0f86ecafbf64d4788cfa433bbec189e8" }, enderman: { name: "Voidgloom Seraph", - head: "/head/1b09a3752510e914b0bdc9096b392bb359f7a8e8a9566a02e7f66faff8d6f89e" + head: "/api/head/1b09a3752510e914b0bdc9096b392bb359f7a8e8a9566a02e7f66faff8d6f89e" }, blaze: { name: "Inferno Demonlord", - head: "/head/b20657e24b56e1b2f8fc219da1de788c0c24f36388b1a409d0cd2d8dba44aa3b" + head: "/api/head/b20657e24b56e1b2f8fc219da1de788c0c24f36388b1a409d0cd2d8dba44aa3b" }, vampire: { name: "Riftstalker Bloodfiend", - head: "/head/5aa29ea961757dc3c90bfabf302c5abe9d308fb4a7d3864e5788ad2cc9160aa2" + head: "/api/head/5aa29ea961757dc3c90bfabf302c5abe9d308fb4a7d3864e5788ad2cc9160aa2" } } as Record; diff --git a/src/lib/sections/stats/skills/farming.svelte b/src/lib/sections/stats/skills/farming.svelte index 0f16be36..f04ee617 100644 --- a/src/lib/sections/stats/skills/farming.svelte +++ b/src/lib/sections/stats/skills/farming.svelte @@ -56,10 +56,12 @@

Farming Tools

-

- Active Tool: - {highestPriorityFarmingTool.display_name} -

+ {#if highestPriorityFarmingTool} +

+ Active Tool: + {highestPriorityFarmingTool.display_name} +

+ {/if}
{#each farmingTools as tool} diff --git a/src/lib/sections/stats/skills/fishing.svelte b/src/lib/sections/stats/skills/fishing.svelte index 71a44fa1..6a41eac8 100644 --- a/src/lib/sections/stats/skills/fishing.svelte +++ b/src/lib/sections/stats/skills/fishing.svelte @@ -33,10 +33,12 @@

Fishing Rods

-

- Active Rod: - {highestPriorityFishingTool.display_name} -

+ {#if highestPriorityFishingTool} +

+ Active Rod: + {highestPriorityFishingTool.display_name} +

+ {/if}
{#each fishingTools as tool} diff --git a/src/lib/sections/stats/skills/mining.svelte b/src/lib/sections/stats/skills/mining.svelte index 50dc46e1..cbe2478d 100644 --- a/src/lib/sections/stats/skills/mining.svelte +++ b/src/lib/sections/stats/skills/mining.svelte @@ -19,10 +19,12 @@

Mining Tools

-

- Active Tool: - {highestPriorityMiningTool.display_name} -

+ {#if highestPriorityMiningTool} +

+ Active Tool: + {highestPriorityMiningTool.display_name} +

+ {/if}
{#each miningTools as tool} diff --git a/src/lib/server/lib/stats.ts b/src/lib/server/lib/stats.ts index 6e81f76a..8908528b 100644 --- a/src/lib/server/lib/stats.ts +++ b/src/lib/server/lib/stats.ts @@ -51,7 +51,7 @@ export async function getStats(profile: Profile, player: Player): Promise enchanting: stats.getEnchanting(userProfile), fishing: stats.getFishing(userProfile), slayer: stats.getSlayer(userProfile), - dungeons: stats.getDungeons(userProfile), + dungeons: stats.getDungeons(userProfile) minions: stats.getMinions(profile), bestiary: stats.getBestiary(userProfile), collections: collections, diff --git a/src/lib/stats/dungeons.ts b/src/lib/stats/dungeons.ts index 1a25f53a..d02dafd2 100644 --- a/src/lib/stats/dungeons.ts +++ b/src/lib/stats/dungeons.ts @@ -129,6 +129,10 @@ function formatCatacombsData(catacombs: Catacombs) { }); } + if (output.reduce((a, b) => a + b.stats.times_played, 0) === 0) { + return null; + } + return output; } diff --git a/src/types/processed/profile/dungeons.d.ts b/src/types/processed/profile/dungeons.d.ts index dc71ef88..02d1c832 100644 --- a/src/types/processed/profile/dungeons.d.ts +++ b/src/types/processed/profile/dungeons.d.ts @@ -18,8 +18,8 @@ export type DungeonsStats = { highestFloorBeatenMaster: number; bloodMobKills: number; }; - catacombs: CatacombsData[]; - master_catacombs: CatacombsData[]; + catacombs: CatacombsData[] | null; + master_catacombs: CatacombsData[] | null; }; export type CatacombsData = { diff --git a/src/types/processed/profile/items.d.ts b/src/types/processed/profile/items.d.ts index a7cf6f81..3d7927f1 100644 --- a/src/types/processed/profile/items.d.ts +++ b/src/types/processed/profile/items.d.ts @@ -168,15 +168,15 @@ export type Items = { highest_priority_weapon: ProcessedItem; }; farming_tools: { - highest_priority_tool: ProcessedItem; + highest_priority_tool: ProcessedItem | null; tools: ProcessedItem[]; }; mining_tools: { - highest_priority_tool: ProcessedItem; + highest_priority_tool: ProcessedItem | null; tools: ProcessedItem[]; }; fishing_tools: { - highest_priority_tool: ProcessedItem; + highest_priority_tool: ProcessedItem | null; tools: ProcessedItem[]; }; pets: ProcessedItem[];