Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ class SkyBlockMemberMiningHotmForgeItem {
constructor(data: Record<string, any>, quickForgeTime: number = 0) {
this.type = data?.type || 'UNKNOWN';
this.id = data?.id || 'UNKNOWN';
this.name = MiningForgeItems?.[this.id].name || 'UNKNOWN';
this.name = MiningForgeItems?.[this.id]?.name || 'UNKNOWN';
this.startTime = data?.startTime || 0;
this.startTimeAt = new Date(this.startTime);
this.endTime =
this.startTime + MiningForgeItems?.[this.id].duration * (MiningForgeQuickForgeMultiplier[quickForgeTime] || 1);
this.startTime +
(MiningForgeItems?.[this.id]?.duration ?? 0) * (MiningForgeQuickForgeMultiplier[quickForgeTime] ?? 1);
this.endTimeAt = new Date(this.endTime);
this.slot = data?.slot || 0;
this.notified = data?.notified || false;
this.oldItem = data?.oldItem || null;
this.slot = data?.slot ?? 0;
this.notified = data?.notified ?? false;
this.oldItem = data?.oldItem ?? null;
}

toString(): MiningForgeItemName | 'UNKNOWN' {
Expand Down
10 changes: 5 additions & 5 deletions src/Types/SkyBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export type MiningForgeItemId =
| 'GEMSTONE_DRILL_2'
| 'GEMSTONE_DRILL_3'
| 'GEMSTONE_DRILL_4'
| 'POLISHED_TOPAZ_ROD'
| 'TOPAZ_ROD'
| 'TITANIUM_DRILL_1'
| 'TITANIUM_DRILL_2'
| 'TITANIUM_DRILL_3'
Expand Down Expand Up @@ -432,7 +432,7 @@ export type MiningForgeItemName =
| 'Gemstone Drill LT-522'
| 'Topaz Drill KGR-12'
| 'Jasper Drill X'
| 'Polished Topaz Rod'
| 'Topaz Rod'
| 'Titanium Drill DR-X355'
| 'Titanium Drill DR-X455'
| 'Titanium Drill DR-X555'
Expand All @@ -451,9 +451,9 @@ export type MiningForgeItemName =
| 'Tungsten Regulator'
| 'Mithril-Plated Drill Engine'
| 'Titanium-Plated Drill Engine'
| 'Ruby-polished Drill Engine'
| 'Sapphire-polished Drill Engine'
| 'Amber-polished Drill Engine'
| 'Ruby-Polished Drill Engine'
| 'Sapphire-Polished Drill Engine'
| 'Amber-Polished Drill Engine'
| 'Mithril-Infused Fuel Tank'
| 'Titanium-Infused Fuel Tank'
| 'Gemstone Fuel Tank'
Expand Down
8 changes: 4 additions & 4 deletions src/Utils/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export const MiningForgeItems: MiningForgeItemsData = {
GEMSTONE_DRILL_2: { name: 'Gemstone Drill LT-522', duration: 30000 },
GEMSTONE_DRILL_3: { name: 'Topaz Drill KGR-12', duration: 30000 },
GEMSTONE_DRILL_4: { name: 'Jasper Drill X', duration: 30000 },
POLISHED_TOPAZ_ROD: { name: 'Polished Topaz Rod', duration: 43200000 },
TOPAZ_ROD: { name: 'Topaz Rod', duration: 43200000 },
TITANIUM_DRILL_1: { name: 'Titanium Drill DR-X355', duration: 14400000 },
TITANIUM_DRILL_2: { name: 'Titanium Drill DR-X455', duration: 30000 },
TITANIUM_DRILL_3: { name: 'Titanium Drill DR-X555', duration: 30000 },
Expand All @@ -276,9 +276,9 @@ export const MiningForgeItems: MiningForgeItemsData = {
TUNGSTEN_KEYCHAIN: { name: 'Tungsten Regulator', duration: 64800000 },
MITHRIL_DRILL_ENGINE: { name: 'Mithril-Plated Drill Engine', duration: 86400000 },
TITANIUM_DRILL_ENGINE: { name: 'Titanium-Plated Drill Engine', duration: 30000 },
RUBY_POLISHED_DRILL_ENGINE: { name: 'Ruby-polished Drill Engine', duration: 30000 },
SAPPHIRE_POLISHED_DRILL_ENGINE: { name: 'Sapphire-polished Drill Engine', duration: 30000 },
AMBER_POLISHED_DRILL_ENGINE: { name: 'Amber-polished Drill Engine', duration: 30000 },
RUBY_POLISHED_DRILL_ENGINE: { name: 'Ruby-Polished Drill Engine', duration: 30000 },
SAPPHIRE_POLISHED_DRILL_ENGINE: { name: 'Sapphire-Polished Drill Engine', duration: 30000 },
AMBER_POLISHED_DRILL_ENGINE: { name: 'Amber-Polished Drill Engine', duration: 30000 },
MITHRIL_FUEL_TANK: { name: 'Mithril-Infused Fuel Tank', duration: 86400000 },
TITANIUM_FUEL_TANK: { name: 'Titanium-Infused Fuel Tank', duration: 30000 },
GEMSTONE_FUEL_TANK: { name: 'Gemstone Fuel Tank', duration: 30000 },
Expand Down
Loading