From 7e770bd6c1428bc678c21b945b0c5f848077e23d Mon Sep 17 00:00:00 2001 From: Keres <88959451+DaughtersOfNyx@users.noreply.github.com> Date: Wed, 21 Aug 2024 03:45:57 +1000 Subject: [PATCH 1/3] Add a command to check Mahogany Homes Points (#5997) --- src/mahoji/commands/minigames.ts | 17 +++++++++++++++-- .../abstracted_commands/mahoganyHomesCommand.ts | 5 +++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/mahoji/commands/minigames.ts b/src/mahoji/commands/minigames.ts index 316279fe20..06ac5de406 100644 --- a/src/mahoji/commands/minigames.ts +++ b/src/mahoji/commands/minigames.ts @@ -42,7 +42,8 @@ import { contractTiers, mahoganyHomesBuildCommand, mahoganyHomesBuyCommand, - mahoganyHomesBuyables + mahoganyHomesBuyables, + mahoganyHomesPointsCommand } from '../lib/abstracted_commands/mahoganyHomesCommand'; import { nightmareZoneShopCommand, @@ -612,6 +613,11 @@ export const minigamesCommand: OSBMahojiCommand = { max_value: 1000 } ] + }, + { + name: 'points', + type: ApplicationCommandOptionType.Subcommand, + description: 'Mahogany Homes point balance.' } ] }, @@ -1073,7 +1079,11 @@ export const minigamesCommand: OSBMahojiCommand = { buy?: { name: string }; points?: {}; }; - mahogany_homes?: { start?: { tier?: number }; buy?: { name: string; quantity?: number } }; + mahogany_homes?: { + start?: { tier?: number }; + buy?: { name: string; quantity?: number }; + points?: {}; + }; tears_of_guthix?: { start?: {} }; pyramid_plunder?: { start?: {} }; rogues_den?: { start?: {} }; @@ -1279,6 +1289,9 @@ export const minigamesCommand: OSBMahojiCommand = { if (options.mahogany_homes.start) { return mahoganyHomesBuildCommand(user, channelID, options.mahogany_homes.start.tier); } + if (options.mahogany_homes.points) { + return mahoganyHomesPointsCommand(user); + } } /** diff --git a/src/mahoji/lib/abstracted_commands/mahoganyHomesCommand.ts b/src/mahoji/lib/abstracted_commands/mahoganyHomesCommand.ts index 678772b0cf..fdb6d03b66 100644 --- a/src/mahoji/lib/abstracted_commands/mahoganyHomesCommand.ts +++ b/src/mahoji/lib/abstracted_commands/mahoganyHomesCommand.ts @@ -139,6 +139,11 @@ export async function mahoganyHomesBuyCommand(user: MUser, input = '', quantity? return `Successfully purchased ${loot} for ${cost * quantity} Carpenter Points.`; } +export async function mahoganyHomesPointsCommand(user: MUser) { + const balance = user.user.carpenter_points; + return `You have **${balance.toLocaleString()}** Mahogany Homes points.`; +} + export async function mahoganyHomesBuildCommand(user: MUser, channelID: string, tier?: number): CommandResponse { if (user.minionIsBusy) return `${user.minionName} is currently busy.`; From e59dfb7f274ad6ece03fb7b0888104be7ef2ac18 Mon Sep 17 00:00:00 2001 From: TastyPumPum <79149170+TastyPumPum@users.noreply.github.com> Date: Wed, 21 Aug 2024 04:13:03 +0100 Subject: [PATCH 2/3] Fix Farmer role (#6008) --- src/lib/constants.ts | 7 +++++-- src/lib/rolesTask.ts | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/constants.ts b/src/lib/constants.ts index cb7b989f77..2f499c9f40 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -66,6 +66,7 @@ export const Roles = { TopMinigamer: DISCORD_SETTINGS.Roles?.TopMinigamer ?? '832798997033779220', TopClueHunter: DISCORD_SETTINGS.Roles?.TopClueHunter ?? '839135887467610123', TopSlayer: DISCORD_SETTINGS.Roles?.TopSlayer ?? '856080958247010324', + TopFarmer: DISCORD_SETTINGS.Roles?.TopFarmer ?? '894194027363205150', TopGlobalCL: '1072426869028294747' }; @@ -346,7 +347,8 @@ export const BadgesEnum = { TopMinigame: 11, SotWTrophy: 12, Slayer: 13, - TopGiveawayer: 14 + TopGiveawayer: 14, + Farmer: 15 } as const; export const badges: { [key: number]: string } = { @@ -364,7 +366,8 @@ export const badges: { [key: number]: string } = { [BadgesEnum.TopMinigame]: Emoji.MinigameIcon, [BadgesEnum.SotWTrophy]: Emoji.SOTWTrophy, [BadgesEnum.Slayer]: Emoji.Slayer, - [BadgesEnum.TopGiveawayer]: Emoji.SantaHat + [BadgesEnum.TopGiveawayer]: Emoji.SantaHat, + [BadgesEnum.Farmer]: Emoji.Farming }; export const MAX_XP = 200_000_000; diff --git a/src/lib/rolesTask.ts b/src/lib/rolesTask.ts index eb76b1d692..3d959412fc 100644 --- a/src/lib/rolesTask.ts +++ b/src/lib/rolesTask.ts @@ -241,9 +241,9 @@ LIMIT 2;` for (const { id, desc } of res.flat()) { results.push({ userID: id, - roleID: '894194027363205150', + roleID: Roles.TopFarmer, reason: desc, - badge: BadgesEnum.Slayer + badge: BadgesEnum.Farmer }); } return results; From 10ed978b31824566ee628bff7ccc37a36b1713e7 Mon Sep 17 00:00:00 2001 From: nwjgit <69014816+nwjgit@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:16:12 -0500 Subject: [PATCH 3/3] Fix coffin creatables (#5991) --- src/lib/data/creatables/shadesOfMorton.ts | 8 ++++---- tests/unit/snapshots/banksnapshots.test.ts.snap | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/data/creatables/shadesOfMorton.ts b/src/lib/data/creatables/shadesOfMorton.ts index 0b8a0d9c32..fb1dad8761 100644 --- a/src/lib/data/creatables/shadesOfMorton.ts +++ b/src/lib/data/creatables/shadesOfMorton.ts @@ -15,7 +15,7 @@ export const shadesOfMortonCreatables: Createable[] = [ name: 'Steel coffin', inputItems: new Bank({ 'Steel locks': 1, - 'Bronze coffin': 1 + 'Broken coffin': 1 }), outputItems: new Bank({ 'Steel coffin': 1 }) }, @@ -23,7 +23,7 @@ export const shadesOfMortonCreatables: Createable[] = [ name: 'Black coffin', inputItems: new Bank({ 'Black locks': 1, - 'Steel coffin': 1 + 'Broken coffin': 1 }), outputItems: new Bank({ 'Black coffin': 1 }) }, @@ -31,7 +31,7 @@ export const shadesOfMortonCreatables: Createable[] = [ name: 'Silver coffin', inputItems: new Bank({ 'Silver locks': 1, - 'Black coffin': 1 + 'Broken coffin': 1 }), outputItems: new Bank({ 'Silver coffin': 1 }) }, @@ -39,7 +39,7 @@ export const shadesOfMortonCreatables: Createable[] = [ name: 'Gold coffin', inputItems: new Bank({ 'Gold locks': 1, - 'Silver coffin': 1 + 'Broken coffin': 1 }), outputItems: new Bank({ 'Gold coffin': 1 }) } diff --git a/tests/unit/snapshots/banksnapshots.test.ts.snap b/tests/unit/snapshots/banksnapshots.test.ts.snap index eea6e871b5..d1f8eb59a4 100644 --- a/tests/unit/snapshots/banksnapshots.test.ts.snap +++ b/tests/unit/snapshots/banksnapshots.test.ts.snap @@ -22917,7 +22917,7 @@ exports[`OSB Creatables 1`] = ` "inputItems": Bank { "bank": { "25445": 1, - "25459": 1, + "25457": 1, }, "frozen": false, }, @@ -22934,7 +22934,7 @@ exports[`OSB Creatables 1`] = ` "inputItems": Bank { "bank": { "25448": 1, - "25461": 1, + "25457": 1, }, "frozen": false, }, @@ -22951,7 +22951,7 @@ exports[`OSB Creatables 1`] = ` "inputItems": Bank { "bank": { "25451": 1, - "25463": 1, + "25457": 1, }, "frozen": false, }, @@ -22968,7 +22968,7 @@ exports[`OSB Creatables 1`] = ` "inputItems": Bank { "bank": { "25454": 1, - "25465": 1, + "25457": 1, }, "frozen": false, },