File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
.github/scripts/parsers/1_21_4 Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11import fs from "fs" ;
2- import { checkPetVariables } from "../../tests/pet_variables.test.mjs" ;
2+ import { checkPetVariables } from "../../tests/pet_variables.test.mjs" ;
33
44const RIGHT_CLICK_LORE_1 = "§7§eRight-click to add this pet to your" ;
55const RIGHT_CLICK_LORE_2 = "§7§eRight-click to add this pet to" ;
@@ -12,7 +12,7 @@ export const petIds = []
1212
1313const getPetVariables = ( pet , tier ) => {
1414 if ( ! stats [ pet ] ) return { }
15- if ( ! stats [ pet ] [ tier ] ) { }
15+ if ( ! stats [ pet ] [ tier ] ) return { }
1616
1717 const variables = { } ;
1818 const min = stats [ pet ] [ tier ] [ "1" ] ;
@@ -64,6 +64,11 @@ export const Pets = {
6464 lore : lore ,
6565 variables : getPetVariables ( item . pet . type , item . pet . tier )
6666 }
67+ const variablesOffset = stats [ petId ] ?. [ item . pet . tier ] ?. [ "stats_levelling_curve" ] ?. split ( ":" ) || [ ] ;
68+ if ( variablesOffset . length >= 2 ) {
69+ tier . variablesOffset = parseInt ( variablesOffset [ 0 ] ) - 1 ;
70+ }
71+
6772 const checks = checkPetVariables ( tier ) ;
6873
6974 if ( checks . missing . length > 0 ) {
@@ -86,4 +91,4 @@ export const Pets = {
8691
8792 return JSON . stringify ( petsFile ) ;
8893 }
89- }
94+ }
You can’t perform that action at this time.
0 commit comments