Skip to content

Commit a84604c

Browse files
committed
Formatting/cleanup
1 parent a424fb4 commit a84604c

File tree

20 files changed

+33
-31
lines changed

20 files changed

+33
-31
lines changed

src/lib/diaries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { DiaryTier, DiaryTierName } from './minions/types';
77
import { DiaryID } from './minions/types';
88
import { Minigames } from './settings/minigames';
99
import Skillcapes from './skilling/skillcapes';
10-
import { courses } from './skilling/skills/agility';
10+
import Agility from './skilling/skills/agility';
1111
import { MUserStats } from './structures/MUserStats';
1212
import type { Skills } from './types';
1313
import getOSItem from './util/getOSItem';
@@ -87,7 +87,7 @@ export function userhasDiaryTierSync(
8787
if (tier.lapsReqs) {
8888
const entries = Object.entries(tier.lapsReqs);
8989
for (const [name, score] of entries) {
90-
const course = courses.find(c => c.name === name)!;
90+
const course = Agility.Courses.find(c => c.name === name)!;
9191

9292
if (!lapScores[course.id] || lapScores[course.id] < score) {
9393
canDo = false;

src/lib/util/calcConBonusXP.ts renamed to src/lib/skilling/skills/construction/calcConBonusXP.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { round } from 'e';
22
import { itemID } from 'oldschooljs';
33

4-
import type { GearSetup } from '../gear/types';
4+
import type { GearSetup } from '../../../gear/types';
55

66
export function calcConBonusXP(setup: GearSetup): number {
77
let bonusMultiplier = 0;

src/lib/skilling/skills/construction/constructables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { itemID } from 'oldschooljs';
2-
interface Constructable {
2+
export interface Constructable {
33
id: number;
44
name: string;
55
input: [number, number];

src/lib/skilling/skills/construction/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import { Emoji } from '@oldschoolgg/toolkit/constants';
22

33
import { SkillsEnum } from '../../types';
4+
import { calcConBonusXP } from './calcConBonusXP';
5+
import Constructables from './constructables';
46

5-
const Construction = {
7+
export const Construction = {
68
aliases: ['con', 'construction'],
79
id: SkillsEnum.Construction,
810
emoji: Emoji.Construction,
9-
name: 'Construction'
11+
name: 'Construction',
12+
constructables: Constructables,
13+
util: {
14+
calcConBonusXP
15+
}
1016
};
11-
12-
export default Construction;

src/lib/skilling/skills/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Emoji } from '@oldschoolgg/toolkit/constants';
33
import type { Skill } from '../types';
44
import { SkillsEnum } from '../types';
55
import Agility from './agility';
6-
import Construction from './construction';
6+
import { Construction } from './construction';
77
import Cooking from './cooking/cooking';
88
import Crafting from './crafting';
99
import Farming from './farming';

src/lib/skilling/skills/mining.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { Emoji } from '@oldschoolgg/toolkit/constants';
12
import { LootTable, itemID } from 'oldschooljs';
23

3-
import { Emoji } from '@oldschoolgg/toolkit/constants';
44
import type { Ore } from '../types';
55
import { SkillsEnum } from '../types';
66

src/lib/skilling/skills/thieving/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Emoji } from '@oldschoolgg/toolkit/constants';
2+
23
import { SkillsEnum } from '../../types';
34

45
const Thieving = {

src/lib/util.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ export function isModOrAdmin(user: MUser) {
142142
return globalConfig.adminUserIDs.includes(user.id) || user.bitfield.includes(BitField.isModerator);
143143
}
144144

145-
export * from './util/smallUtils';
146-
147145
export type JsonKeys<T> = {
148146
[K in keyof T]: T[K] extends Prisma.JsonValue ? K : never;
149147
}[keyof T];

src/mahoji/commands/loot.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ApplicationCommandOptionType } from 'discord.js';
33

44
import { PerkTier } from '../../lib/constants';
55
import { getAllTrackedLootForUser, getDetailsOfSingleTrackedLoot } from '../../lib/lootTrack';
6-
76
import { handleMahojiConfirmation } from '../../lib/util/handleMahojiConfirmation';
87
import type { OSBMahojiCommand } from '../lib/util';
98

src/mahoji/commands/mine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ export const mineCommand: OSBMahojiCommand = {
200200
if (motherlodeMine) {
201201
return motherlodeMineCommand({ user, channelID, quantity });
202202
}
203-
204203
const ore = Mining.Ores.find(
205204
ore =>
206205
stringMatches(ore.id, options.name) ||
207206
stringMatches(ore.name, options.name) ||
208207
ore.aliases?.some(a => stringMatches(a, options.name))
209208
);
209+
210210
if (!ore) {
211211
return `Thats not a valid ore to mine. Valid ores are ${Mining.Ores.map(ore => ore.name).join(', ')}, or ${
212212
Mining.MotherlodeMine.name

0 commit comments

Comments
 (0)