Skip to content

Commit 139132c

Browse files
authored
chore: update SkyBlockMemberMiningHotmForgeItem to be safe & update Forge Item List (#675)
1 parent cc745d0 commit 139132c

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

src/Structures/SkyBlock/Member/Mining/SkyBlockMemberMiningHotmForgeItem.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ class SkyBlockMemberMiningHotmForgeItem {
1515
constructor(data: Record<string, any>, quickForgeTime: number = 0) {
1616
this.type = data?.type || 'UNKNOWN';
1717
this.id = data?.id || 'UNKNOWN';
18-
this.name = MiningForgeItems?.[this.id].name || 'UNKNOWN';
18+
this.name = MiningForgeItems?.[this.id]?.name || 'UNKNOWN';
1919
this.startTime = data?.startTime || 0;
2020
this.startTimeAt = new Date(this.startTime);
2121
this.endTime =
22-
this.startTime + MiningForgeItems?.[this.id].duration * (MiningForgeQuickForgeMultiplier[quickForgeTime] || 1);
22+
this.startTime +
23+
(MiningForgeItems?.[this.id]?.duration ?? 0) * (MiningForgeQuickForgeMultiplier[quickForgeTime] ?? 1);
2324
this.endTimeAt = new Date(this.endTime);
24-
this.slot = data?.slot || 0;
25-
this.notified = data?.notified || false;
26-
this.oldItem = data?.oldItem || null;
25+
this.slot = data?.slot ?? 0;
26+
this.notified = data?.notified ?? false;
27+
this.oldItem = data?.oldItem ?? null;
2728
}
2829

2930
toString(): MiningForgeItemName | 'UNKNOWN' {

src/Types/SkyBlock.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export type MiningForgeItemId =
313313
| 'GEMSTONE_DRILL_2'
314314
| 'GEMSTONE_DRILL_3'
315315
| 'GEMSTONE_DRILL_4'
316-
| 'POLISHED_TOPAZ_ROD'
316+
| 'TOPAZ_ROD'
317317
| 'TITANIUM_DRILL_1'
318318
| 'TITANIUM_DRILL_2'
319319
| 'TITANIUM_DRILL_3'
@@ -432,7 +432,7 @@ export type MiningForgeItemName =
432432
| 'Gemstone Drill LT-522'
433433
| 'Topaz Drill KGR-12'
434434
| 'Jasper Drill X'
435-
| 'Polished Topaz Rod'
435+
| 'Topaz Rod'
436436
| 'Titanium Drill DR-X355'
437437
| 'Titanium Drill DR-X455'
438438
| 'Titanium Drill DR-X555'
@@ -451,9 +451,9 @@ export type MiningForgeItemName =
451451
| 'Tungsten Regulator'
452452
| 'Mithril-Plated Drill Engine'
453453
| 'Titanium-Plated Drill Engine'
454-
| 'Ruby-polished Drill Engine'
455-
| 'Sapphire-polished Drill Engine'
456-
| 'Amber-polished Drill Engine'
454+
| 'Ruby-Polished Drill Engine'
455+
| 'Sapphire-Polished Drill Engine'
456+
| 'Amber-Polished Drill Engine'
457457
| 'Mithril-Infused Fuel Tank'
458458
| 'Titanium-Infused Fuel Tank'
459459
| 'Gemstone Fuel Tank'

src/Utils/Constants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export const MiningForgeItems: MiningForgeItemsData = {
257257
GEMSTONE_DRILL_2: { name: 'Gemstone Drill LT-522', duration: 30000 },
258258
GEMSTONE_DRILL_3: { name: 'Topaz Drill KGR-12', duration: 30000 },
259259
GEMSTONE_DRILL_4: { name: 'Jasper Drill X', duration: 30000 },
260-
POLISHED_TOPAZ_ROD: { name: 'Polished Topaz Rod', duration: 43200000 },
260+
TOPAZ_ROD: { name: 'Topaz Rod', duration: 43200000 },
261261
TITANIUM_DRILL_1: { name: 'Titanium Drill DR-X355', duration: 14400000 },
262262
TITANIUM_DRILL_2: { name: 'Titanium Drill DR-X455', duration: 30000 },
263263
TITANIUM_DRILL_3: { name: 'Titanium Drill DR-X555', duration: 30000 },
@@ -276,9 +276,9 @@ export const MiningForgeItems: MiningForgeItemsData = {
276276
TUNGSTEN_KEYCHAIN: { name: 'Tungsten Regulator', duration: 64800000 },
277277
MITHRIL_DRILL_ENGINE: { name: 'Mithril-Plated Drill Engine', duration: 86400000 },
278278
TITANIUM_DRILL_ENGINE: { name: 'Titanium-Plated Drill Engine', duration: 30000 },
279-
RUBY_POLISHED_DRILL_ENGINE: { name: 'Ruby-polished Drill Engine', duration: 30000 },
280-
SAPPHIRE_POLISHED_DRILL_ENGINE: { name: 'Sapphire-polished Drill Engine', duration: 30000 },
281-
AMBER_POLISHED_DRILL_ENGINE: { name: 'Amber-polished Drill Engine', duration: 30000 },
279+
RUBY_POLISHED_DRILL_ENGINE: { name: 'Ruby-Polished Drill Engine', duration: 30000 },
280+
SAPPHIRE_POLISHED_DRILL_ENGINE: { name: 'Sapphire-Polished Drill Engine', duration: 30000 },
281+
AMBER_POLISHED_DRILL_ENGINE: { name: 'Amber-Polished Drill Engine', duration: 30000 },
282282
MITHRIL_FUEL_TANK: { name: 'Mithril-Infused Fuel Tank', duration: 86400000 },
283283
TITANIUM_FUEL_TANK: { name: 'Titanium-Infused Fuel Tank', duration: 30000 },
284284
GEMSTONE_FUEL_TANK: { name: 'Gemstone Fuel Tank', duration: 30000 },

0 commit comments

Comments
 (0)