From ff8091c7dab3d2a4829711ee30a2d5e5a0e40149 Mon Sep 17 00:00:00 2001 From: nwjgit Date: Sat, 9 Mar 2024 20:05:50 -0600 Subject: [PATCH] change invention materials --- src/lib/invention/MaterialBank.ts | 6 +++--- src/mahoji/commands/invention.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/invention/MaterialBank.ts b/src/lib/invention/MaterialBank.ts index 4f20335e3a..53b5091ca6 100644 --- a/src/lib/invention/MaterialBank.ts +++ b/src/lib/invention/MaterialBank.ts @@ -87,11 +87,11 @@ export class MaterialBank { return 'No materials'; } const res = []; - for (const [type, qty] of entries.sort((a, b) => b[1] - a[1])) { - res.push(`${qty.toLocaleString()}x ${toTitleCase(type)}`); + for (const [type, qty] of entries.sort((a, b) => a[0].localeCompare(b[0]))) { + res.push(`${toTitleCase(type)}: ${qty.toLocaleString()}`); } - return res.join(', '); + return `${res.join('\n')}`; } public values() { diff --git a/src/mahoji/commands/invention.ts b/src/mahoji/commands/invention.ts index 1d473e9985..1338c2e506 100644 --- a/src/mahoji/commands/invention.ts +++ b/src/mahoji/commands/invention.ts @@ -215,7 +215,7 @@ export const inventionCommand: OSBMahojiCommand = { return str; } if (options.materials) { - return `You own: ${user.materialsOwned()}`; + return { content: `You own:\n${user.materialsOwned()}`, ephemeral: true }; } if (options.group) {