Constructor
new CSGODataParser(schemaFilePath, langFilePath, itemsFilePath, logLevel, logFilePath)
Parameters:
Name | Type | Description |
---|---|---|
schemaFilePath |
String | Path to schema file. |
langFilePath |
String | Path to csgo_*lang* file. |
itemsFilePath |
String | Path to items_game file. |
logLevel |
String | Winston Log Level, if > info no timing data for generations. |
logFilePath |
String | Choosen file path to write logs. |
- Source:
- To Do:
-
- Refactoring... This file will be too long
- Generalization isDatasInitialized
- Better handle of Little Endian for vdf / Hack dependency
- Datamining File for more informations
- DEBUG - Better Handle of Knifes and Rarities (My god, need so much hack ><. Volvo... that's not really clean ^^')
- To ES6
- Optimize Performances
- defindex to int ?
Methods
getCaseKeys() → {Array.<Prefab>}
Generate Weapon/Stickers skin Case keys list.
- Source:
Returns:
List of Object. One object represent one case key
- Type
- Array.<Prefab>
getCases() → {Array.<Prefab>}
Generate Weapon/Stickers skin Case list.
- Source:
Returns:
List of Object. One object represent one case
- Type
- Array.<Prefab>
getCollections() → {Array.<Collection>}
Generate collection's data from itemsgame's data.
- Source:
Returns:
List of Collections. One object represent one Collection.
- Type
- Array.<Collection>
getExteriors() → {Array.<String>}
Generate exteriors.
- Source:
Returns:
One string represent one exterior type - I18N Name
- Type
- Array.<String>
getLangValue(keyLang) → {String}
Get the lang value from valve key i18n values.
Parameters:
Name | Type | Description |
---|---|---|
keyLang |
String | valve key i18n values (like #PaintKit_aa_fade_Tag) |
- Source:
Returns:
traduction if langfile initialized and key is present, key otherwise
- Type
- String
getLogger() → {winston.Logger}
Return the parser's logger.
- Source:
Returns:
Winston based Parser's Logger.
- Type
- winston.Logger
getMusicKits() → {Array.<MusicKit>}
Generate MusicKits list.
- Source:
Returns:
List of MusicKit. One object represent one music kit
- Type
- Array.<MusicKit>
getRaritiesIndex() → {Array.<Rarity>}
Generate Rarities index.
- Source:
Returns:
List of Rarity objects. One object represent one rarity.
- Type
- Array.<Rarity>
getStickers() → {Array.<Sticker>}
Generate Stickers list.
Note : Some unknown stickers are present in the item_game file so they have a rarity set to "default" (id 2 to 12)
- Source:
Returns:
List of Sticker. One object represent one sticker
- Type
- Array.<Sticker>
getWeapons() → {Array.<Weapon>}
Generate bases Weapons data from schema's data.
- Source:
Returns:
List of Objects. One object represent one Weapon.
- Type
- Array.<Weapon>
isDatasInitialized() → {boolean}
Check if datas files are OK.
- Source:
Returns:
True if datas initialized, false otherwise
- Type
- boolean
isLangInitialized() → {boolean}
Check if lang file is OK.
- Source:
Returns:
True if initialized, false otherwise
- Type
- boolean