Przeglądaj źródła

filter out faction items

raylu 13 lat temu
rodzic
commit
281b71a523
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      manufacturing.py

+ 7 - 0
manufacturing.py

@@ -26,9 +26,16 @@ def get_systemid(name):
 def iter_blueprints():
 	curs = conn.cursor()
 	try:
+		# metaGroupID's:
+		#   NULL or 1: Tech I
+		#   2: Tech II
+		#   14: Tech III
+		# filtering for these excludes storyline (3), faction (4), officer (5), and deadspace (6)
 		curs.execute('''
 			SELECT b.productTypeID, t.typeName FROM invBlueprintTypes as b
 			INNER JOIN invTypes AS t ON b.productTypeID = t.typeID
+			LEFT JOIN invMetaTypes AS m ON m.typeID = b.productTypeID
+			WHERE m.metaGroupID IS NULL or m.metaGroupID in (1,2,14)
 		''')
 		while True:
 			r = curs.fetchone()