ArchipelagoMW / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
521 stars 678 forks source link

Core: adds a custom KeyError for invalid item names #4223

Open qwint opened 4 days ago

qwint commented 4 days ago

What is this fixing or adding?

adds a custom KeyError for raising on world.create_item() if the passed in name is invalid

Note: I will restate here as well I'm on the camp of core should be validating item names in plando blocks (like other item names from user input), but if the want to make plando or similar generic is enough that core cannot do that due diligence and we want a way to signal up from create_item that the inputs are invalid, it should be explicit, hence the need for an explicit exception

How was this tested?

added heavy handed error checking to musedash then plando'd thingy_mc_bobber saw worlds.AutoWorld.InvalidItemError: 'Invalid item thingy_mc_bobber' in the generate log

If this makes graphical changes, please attach screenshots.