Fixed lookup table generator script
This commit is contained in:
1 parent
258232a52a
commit
2d71f862da
1 file changed
+8
-1
@@ -10,7 +10,6 @@ filePath = "D:\\Programme\\Steam\\steamapps\\common\\The Binding of Isaac Rebirt
|
|||||||
def sortByID(elem):
|
def sortByID(elem):
|
||||||
return elem["id"]
|
return elem["id"]
|
||||||
recipes = []
|
recipes = []
|
||||||
itemQuality = []
|
|
||||||
itempools = {}
|
itempools = {}
|
||||||
itemIDToPool = {}
|
itemIDToPool = {}
|
||||||
maxItemID = 0
|
maxItemID = 0
|
||||||
@@ -57,6 +56,14 @@ for recipe in recipesXML.findall('recipe'):
|
|||||||
convertedInput = str(convertedInput).replace(" ","").replace("[","").replace("]","")
|
convertedInput = str(convertedInput).replace(" ","").replace("[","").replace("]","")
|
||||||
recipes.append({"input": convertedInput, "output": recipe.get('output')})
|
recipes.append({"input": convertedInput, "output": recipe.get('output')})
|
||||||
|
|
||||||
|
# Read items_metadata.xml
|
||||||
|
items_metadataXML = ET.parse(filePath+'items_metadata.xml').getroot()
|
||||||
|
for item in items_metadataXML.findall('item'):
|
||||||
|
id = int(item.get('id'))
|
||||||
|
if maxItemID < id:
|
||||||
|
maxItemID = id
|
||||||
|
itemIDToPool[id] = []
|
||||||
|
|
||||||
# Read itempools.xml
|
# Read itempools.xml
|
||||||
itempoolsXML = ET.parse(filePath+'itempools.xml').getroot()
|
itempoolsXML = ET.parse(filePath+'itempools.xml').getroot()
|
||||||
currentpool = 0
|
currentpool = 0
|
||||||
|
|||||||
Reference in new issue
Block a user