Skip to content

Commit

Permalink
Add weapon info back
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage committed Nov 4, 2023
1 parent 3031405 commit 5b06f0d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions html/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ function setItemInfo(title, description) {
}

function generateDescription(itemData) {
if (itemData.type === "weapon") {
let ammo = itemData.info.ammo ?? 0;
return `<p><strong>Serial Number: </strong><span>${itemData.info.serie}</span></p>
<p><strong>Ammunition: </strong><span>${ammo}</span></p>
<p>${itemData.description}</p>`;
}
switch (itemData.name) {
case "id_card":
return `<p><strong>CSN: </strong><span>${itemData.info.citizenid}</span></p>
Expand Down

0 comments on commit 5b06f0d

Please sign in to comment.