1- import * as fs from ' node:fs' ;
2- import * as path from ' node:path' ;
1+ import * as fs from " node:fs" ;
2+ import * as path from " node:path" ;
33
44interface ArmourTypeRow {
5- BaseItemTypesKey : number ;
6- Armour : number ;
7- Evasion : number ;
8- EnergyShield : number ;
5+ BaseItemTypesKey : number ;
6+ Armour : number ;
7+ Evasion : number ;
8+ EnergyShield : number ;
99}
1010
1111export function ArmourTypes ( ) : ArmourTypeRow [ ] {
12- const data = fs . readFileSync ( path . join ( __dirname , 'ArmourTypes.json' ) , { encoding : 'utf-8' } ) ;
13- return JSON . parse ( data ) as ArmourTypeRow [ ] ;
12+ const data = fs . readFileSync ( path . join ( __dirname , "ArmourTypes.json" ) , {
13+ encoding : "utf-8" ,
14+ } ) ;
15+ return JSON . parse ( data ) as ArmourTypeRow [ ] ;
1416}
1517
16-
1718interface BaseItemTypeRow {
18- _index : number ;
19- Id : string ;
20- Width : number ;
21- Height : number ;
22- Name : string ;
23- DropLevel : number ;
24- Implicit_ModsKeys : string [ ] ;
25- ItemVisualIdentity : number ;
26- IsCorrupted : boolean ;
27- ItemClassesKey : string ;
28- SiteVisibility : number ;
29- TagsKeys : string [ ] ;
19+ _index : number ;
20+ Id : string ;
21+ Width : number ;
22+ Height : number ;
23+ Name : string ;
24+ DropLevel : number ;
25+ Implicit_ModsKeys : string [ ] ;
26+ ItemVisualIdentity : number ;
27+ IsCorrupted : boolean ;
28+ ItemClassesKey : string ;
29+ SiteVisibility : number ;
30+ TagsKeys : string [ ] ;
3031}
3132
32- export function BaseItemTypes ( lang : string = 'en' ) : BaseItemTypeRow [ ] {
33- const data = fs . readFileSync ( path . join ( __dirname , 'BaseItemTypes.json' ) , { encoding : 'utf-8' } ) ;
34- return JSON . parse ( data ) as BaseItemTypeRow [ ] ;
33+ export function BaseItemTypes ( lang : string = "en" ) : BaseItemTypeRow [ ] {
34+ const data = fs . readFileSync ( path . join ( __dirname , "BaseItemTypes.json" ) , {
35+ encoding : "utf-8" ,
36+ } ) ;
37+ return JSON . parse ( data ) as BaseItemTypeRow [ ] ;
3538}
3639
3740interface ItemClassRow {
38- Id : string ;
41+ Id : string ;
3942}
4043
4144export function ItemClasses ( ) : ItemClassRow [ ] {
42- const data = fs . readFileSync ( path . join ( __dirname , 'ItemClasses.json' ) , { encoding : 'utf-8' } ) ;
43- return JSON . parse ( data ) as ItemClassRow [ ] ;
45+ const data = fs . readFileSync ( path . join ( __dirname , "ItemClasses.json" ) , {
46+ encoding : "utf-8" ,
47+ } ) ;
48+ return JSON . parse ( data ) as ItemClassRow [ ] ;
4449}
4550
4651interface ItemVisualIdentityRow {
47- _index : number ;
48- Id : string ;
49- DDSFile : string ;
50- AOFile : string ;
52+ _index : number ;
53+ Id : string ;
54+ DDSFile : string ;
55+ AOFile : string ;
5156}
5257
5358export function ItemVisualIdentity ( ) : ItemVisualIdentityRow [ ] {
54- const data = fs . readFileSync ( path . join ( __dirname , 'ItemVisualIdentity.json' ) , { encoding : 'utf-8' } ) ;
55- return JSON . parse ( data ) as ItemVisualIdentityRow [ ] ;
59+ const data = fs . readFileSync (
60+ path . join ( __dirname , "ItemVisualIdentity.json" ) ,
61+ { encoding : "utf-8" }
62+ ) ;
63+ return JSON . parse ( data ) as ItemVisualIdentityRow [ ] ;
5664}
5765
5866interface TagRow {
59- Id : string ;
60- DisplayString : string ;
67+ Id : string ;
68+ DisplayString : string ;
6169}
6270
6371export function Tags ( ) : TagRow [ ] {
64- const data = fs . readFileSync ( path . join ( __dirname , 'Tags.json' ) , { encoding : 'utf-8' } ) ;
65- return JSON . parse ( data ) as TagRow [ ] ;
72+ const data = fs . readFileSync ( path . join ( __dirname , "Tags.json" ) , {
73+ encoding : "utf-8" ,
74+ } ) ;
75+ return JSON . parse ( data ) as TagRow [ ] ;
6676}
6777
6878interface UniqueStashLayoutRow {
69- WordsKey : number ;
70- ShowIfEmptyChallengeLeague : boolean ;
71- RenamedVersion : number ;
72- UniqueStashTypesKey : number ;
73- ItemVisualIdentityKey : number ;
74- ShowIfEmptyStandard : boolean ;
75- IsAlternateArt : boolean ;
79+ WordsKey : number ;
80+ ShowIfEmptyChallengeLeague : boolean ;
81+ RenamedVersion : number ;
82+ UniqueStashTypesKey : number ;
83+ ItemVisualIdentityKey : number ;
84+ ShowIfEmptyStandard : boolean ;
85+ IsAlternateArt : boolean ;
7686}
7787
7888export function UniquesStashLayout ( ) : UniqueStashLayoutRow [ ] {
79- const data = fs . readFileSync ( path . join ( __dirname , 'UniquesStashLayout.json' ) , { encoding : 'utf-8' } ) ;
80- return JSON . parse ( data ) as UniqueStashLayoutRow [ ] ;
89+ const data = fs . readFileSync (
90+ path . join ( __dirname , "UniquesStashLayout.json" ) ,
91+ { encoding : "utf-8" }
92+ ) ;
93+ return JSON . parse ( data ) as UniqueStashLayoutRow [ ] ;
8194}
8295
8396interface WordRow {
84- _index : number ;
85- Wordlist : number ;
86- Text : string ;
87- SpawnWeight_Tags : number [ ] ;
88- SpawnWeight_Values : number [ ] ;
89- Text2 : string ;
97+ _index : number ;
98+ Wordlist : number ;
99+ Text : string ;
100+ SpawnWeight_Tags : number [ ] ;
101+ SpawnWeight_Values : number [ ] ;
102+ Text2 : string ;
90103}
91104
92- export function Words ( lang : string = 'en' ) : WordRow [ ] {
93- const data = fs . readFileSync ( path . join ( __dirname , 'Words.json' ) , { encoding : 'utf-8' } ) ;
94- return JSON . parse ( data ) as WordRow [ ] ;
105+ export function Words ( lang : string = "en" ) : WordRow [ ] {
106+ const data = fs . readFileSync ( path . join ( __dirname , "Words.json" ) , {
107+ encoding : "utf-8" ,
108+ } ) ;
109+ return JSON . parse ( data ) as WordRow [ ] ;
95110}
96111
97112interface StatsRow {
98- Id : string ;
99- IsLocal : boolean ;
100- IsWeaponLocal : boolean ;
101- Semantics : number ;
102- Text : string ;
103- IsVirtual : boolean ;
104- HASH32 : number ;
105- BelongsActiveSkillsKey : string [ ] ;
106- IsScalable : boolean ;
113+ Id : string ;
114+ IsLocal : boolean ;
115+ IsWeaponLocal : boolean ;
116+ Semantics : number ;
117+ Text : string ;
118+ IsVirtual : boolean ;
119+ HASH32 : number ;
120+ BelongsActiveSkillsKey : string [ ] ;
121+ IsScalable : boolean ;
107122}
108123
109124export function Stats ( ) : StatsRow [ ] {
110- const data = fs . readFileSync ( path . join ( __dirname , 'Stats.json' ) , { encoding : 'utf-8' } ) ;
111- return JSON . parse ( data ) as StatsRow [ ] ;
112- }
125+ const data = fs . readFileSync ( path . join ( __dirname , "Stats.json" ) , {
126+ encoding : "utf-8" ,
127+ } ) ;
128+ return JSON . parse ( data ) as StatsRow [ ] ;
129+ }
0 commit comments