@@ -52,11 +52,11 @@ def main(db, json_path):
5252 "dgmtypeeffects" : eos .gamedata .Effect ,
5353 "dgmunits" : eos .gamedata .Unit ,
5454 "icons" : eos .gamedata .Icon ,
55- "invcategories " : eos .gamedata .Category ,
56- "invgroups " : eos .gamedata .Group ,
55+ "evecategories " : eos .gamedata .Category ,
56+ "evegroups " : eos .gamedata .Group ,
5757 "invmetagroups" : eos .gamedata .MetaGroup ,
5858 "invmetatypes" : eos .gamedata .MetaType ,
59- "invtypes " : eos .gamedata .Item ,
59+ "evetypes " : eos .gamedata .Item ,
6060 "phbtraits" : eos .gamedata .Traits ,
6161 "phbmetadata" : eos .gamedata .MetaData ,
6262 "mapbulk_marketGroups" : eos .gamedata .MarketGroup
@@ -74,16 +74,16 @@ def main(db, json_path):
7474 "displayName_en-us" : "displayName"
7575 },
7676 #icons???
77- "invcategories " : {
77+ "evecategories " : {
7878 "categoryName_en-us" : "categoryName"
7979 },
80- "invgroups " : {
80+ "evegroups " : {
8181 "groupName_en-us" : "groupName"
8282 },
8383 "invmetagroups" : {
8484 "metaGroupName_en-us" : "metaGroupName"
8585 },
86- "invtypes " : {
86+ "evetypes " : {
8787 "typeName_en-us" : "typeName" ,
8888 "description_en-us" : "description"
8989 },
@@ -95,6 +95,12 @@ def main(db, json_path):
9595
9696 }
9797
98+ rowsInValues = (
99+ "evetypes" ,
100+ "evegroups" ,
101+ "evecategories"
102+ )
103+
98104 def convertIcons (data ):
99105 new = []
100106 for k , v in data .items ():
@@ -133,7 +139,7 @@ def convertSection(sectionData):
133139
134140 def convertTypes (typesData ):
135141 """
136- Add factionID column to invtypes table.
142+ Add factionID column to evetypes table.
137143 """
138144 factionMap = {}
139145 with open (os .path .join (jsonPath , "fsdTypeOverrides.json" )) as f :
@@ -152,30 +158,32 @@ def convertTypes(typesData):
152158 for jsonName , cls in tables .iteritems ():
153159 with open (os .path .join (jsonPath , "{}.json" .format (jsonName ))) as f :
154160 tableData = json .load (f )
161+ if jsonName in rowsInValues :
162+ tableData = list (tableData .values ())
155163 if jsonName == "icons" :
156164 tableData = convertIcons (tableData )
157165 if jsonName == "phbtraits" :
158166 tableData = convertTraits (tableData )
159- if jsonName == "invtypes " :
167+ if jsonName == "evetypes " :
160168 tableData = convertTypes (tableData )
161169 data [jsonName ] = tableData
162170
163171 # Set with typeIDs which we will have in our database
164- invTypes = {
172+ eveTypes = {
165173 # Sometimes CCP unpublishes some items we want to have published, we
166174 # can do it here
167175 31906 , # Federation Navy 200mm Steel Plates
168176 31904 , # Imperial Navy 200mm Steel Plates
169177 28782 , # Syndicate 200mm Steel Plates
170178 }
171- for row in data ["invtypes " ]:
179+ for row in data ["evetypes " ]:
172180 # 1306 - group Ship Modifiers, for items like tactical t3 ship modes
173181 if (row ["published" ] or row ['groupID' ] == 1306 ):
174- invTypes .add (row ["typeID" ])
182+ eveTypes .add (row ["typeID" ])
175183
176184 # ignore checker
177185 def isIgnored (file , row ):
178- if file in ("invtypes " , "dgmtypeeffects" , "dgmtypeattribs" , "invmetatypes" ) and row ['typeID' ] not in invTypes :
186+ if file in ("evetypes " , "dgmtypeeffects" , "dgmtypeattribs" , "invmetatypes" ) and row ['typeID' ] not in eveTypes :
179187 return True
180188 return False
181189
0 commit comments