diff --git a/src/mahoji/commands/build.ts b/src/mahoji/commands/build.ts index 438ddea5ac..9224e00a0c 100644 --- a/src/mahoji/commands/build.ts +++ b/src/mahoji/commands/build.ts @@ -52,8 +52,7 @@ export const buildCommand: OSBMahojiCommand = { required: true, autocomplete: async (value: string, user: User) => { const mUser = await mUserFetch(user.id); - const hasCrystalSaw = mUser.owns('Crystal saw'); - const conLevel = mUser.skillLevel('construction') + (hasCrystalSaw ? 3 : 0); + const conLevel = mUser.skillLevel('construction'); return Constructables.filter(i => (!value ? true : i.name.toLowerCase().includes(value.toLowerCase()))) .filter(c => c.level <= conLevel) .map(i => ({ @@ -81,10 +80,8 @@ export const buildCommand: OSBMahojiCommand = { const [hasDs2Requirements, ds2Reason] = hasSkillReqs(user, ds2Requirements); if (!object) return 'Thats not a valid object to build.'; - const hasCrystalSaw = user.owns('Crystal saw'); - const conLevel = user.skillLevel('construction') + (hasCrystalSaw ? 3 : 0); - if (conLevel < object.level) { + if (user.skillLevel('construction') < object.level) { return `${user.minionName} needs ${object.level} Construction to create a ${object.name}.`; } @@ -150,17 +147,11 @@ export const buildCommand: OSBMahojiCommand = { const xpHr = `${(((object.xp * quantity) / (duration / Time.Minute)) * 60).toLocaleString()} XP/Hr`; - let str = `${user.minionName} is now constructing ${quantity}x ${ - object.name - }, it'll take around ${formatDuration(duration)} to finish. Removed ${cost} from your bank. **${xpHr}** + return `${user.minionName} is now constructing ${quantity}x ${object.name}, it'll take around ${formatDuration( + duration + )} to finish. Removed ${cost} from your bank. **${xpHr}** You paid ${gpNeeded.toLocaleString()} GP, because you used ${invsPerTrip} inventories of planks. `; - - if (hasCrystalSaw) { - str += '\nYour crystal saw is boosting your construction level by 3.'; - } - - return str; } };