ItemLink; correct validation to allow for None replacement item

This commit is contained in:
Fabian Dill 2022-02-13 20:19:17 +01:00 committed by GitHub
parent 779f3a8a61
commit 34b9344084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -475,7 +475,7 @@ class ItemLinks(OptionList):
if item_name not in world.item_names and item_name not in world.item_name_groups:
raise Exception(f"Item {item_name} from option {self} "
f"is not a valid item name from {world.game}")
if link["replacement_item"] not in world.item_names:
if link["replacement_item"] and link["replacement_item"] not in world.item_names:
raise Exception(f"Item {link['replacement_item']} from option {self} "
f"is not a valid item name from {world.game}")