Skip to content

Commit

Permalink
Merge pull request #2232 from DuckySoLucky/fixDoogensOrSmthIdk
Browse files Browse the repository at this point in the history
fix: dungeons error
  • Loading branch information
metalcupcake5 authored Apr 18, 2024
2 parents 008aa1f + 0544a20 commit ec959b6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 4 additions & 0 deletions src/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,10 @@ export function generateGemLore(type, tier, rarity) {
const lore = [];
const stats = [];

if (!GEMSTONES[type.toUpperCase()]) {
return "§c§oMISSING GEMSTONE DATA§r";
}

// Gem color
const color = ${GEMSTONES[type.toUpperCase()].color}`;

Expand Down
24 changes: 11 additions & 13 deletions views/sections/stats/dungeons.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,20 @@ function formatDungeonStat(stat, type) {
<a class="stat-anchor" id="Dungeons"></a>
<h2 class="stat-header">Dungeons</h2>
<div class="stat-content">
<% if (calculated.dungeons.catacombs.visited === false) { %>
<% if (!calculated.dungeons.catacombs?.visited) { %>
<p class="stat-raw-values">
<%= calculated.display_name %> hasn't entered a dungeon yet.
</p>
<% } else { %>
<% if (calculated.dungeons.catacombs.visited) { %>
<div class="skill-bars">
<skill-component skill="catacombs" type="dungeon" icon="<%= skillItems.catacombs %>"></skill-component>
<skill-component skill="healer" type="dungeon_class" icon="<%= skillItems.healer %>"></skill-component>
<skill-component skill="mage" type="dungeon_class" icon="<%= skillItems.mage %>"></skill-component>
<skill-component skill="berserk" type="dungeon_class" icon="<%= skillItems.berserk %>"></skill-component>
<skill-component skill="archer" type="dungeon_class" icon="<%= skillItems.archer %>"></skill-component>
<skill-component skill="tank" type="dungeon_class" icon="<%= skillItems.tank %>"></skill-component>
</div>
<% } %>
<div class="skill-bars">
<skill-component skill="catacombs" type="dungeon" icon="<%= skillItems.catacombs %>"></skill-component>
<skill-component skill="healer" type="dungeon_class" icon="<%= skillItems.healer %>"></skill-component>
<skill-component skill="mage" type="dungeon_class" icon="<%= skillItems.mage %>"></skill-component>
<skill-component skill="berserk" type="dungeon_class" icon="<%= skillItems.berserk %>"></skill-component>
<skill-component skill="archer" type="dungeon_class" icon="<%= skillItems.archer %>"></skill-component>
<skill-component skill="tank" type="dungeon_class" icon="<%= skillItems.tank %>"></skill-component>
</div>
<p class="stat-raw-values" style="margin: 20px 0;">
<!-- Selected Class-->
Expand Down Expand Up @@ -156,7 +154,7 @@ function formatDungeonStat(stat, type) {
<% if (calculated.dungeons.master_catacombs !== undefined) { %>
<p class="stat-sub-header">Master Catacombs</p>
<% if (calculated.dungeons.master_catacombs.visited === false) { %>
<% if (!calculated.dungeons.master_catacombs?.visited) { %>
<p class="stat-raw-values"><%= calculated.display_name %> hasn't completed any Master Catacombs floor yet.</p>
<% } else { %>
<div class="floor-containers narrow-info-container-wrapper">
Expand Down

0 comments on commit ec959b6

Please sign in to comment.