Skip to content

Commit c696898

Browse files
committed
Added error message when trying to use tool with unsupported mods.
1 parent 29fe416 commit c696898

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

BlockDefinitionExtractor/BlockDefinitionExtractor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,13 @@ def examinePackage(m):
298298

299299
def assembleBlockDefinitionData():
300300
global bpnames, subTypes, blockDefinitions
301-
subTypes = list(map(lambda x: bpnames[x], subTypes))
301+
try:
302+
subTypes = list(map(lambda x: bpnames[x], subTypes))
303+
except KeyError:
304+
w = Tk()
305+
w.withdraw()
306+
messagebox.showerror("Error", "Mods that add new building components are currently not supported! Sorry for the inconvenience.")
307+
sys.exit()
302308
ret = '*'.join(subTypes)
303309

304310
for key, value in blockDefinitions.items():

0 commit comments

Comments
 (0)