randovania / randomprime

Prime1 patcher for Randovania and a few other things.
MIT License
2 stars 3 forks source link

When using API which is hinting at adding room properties, have a field on whether it should throw when editing existing IDs #69

Open Miepee opened 4 months ago

Miepee commented 4 months ago

Stuff like room.distanceFog will either add distanceFog objects or edit distanceFog objects depending on if the ID already exists or not. However, from a user PoV, it is hard to know whether one accidentally used an id that already exists. Thus, some field (that doesn't break backwards compatibility with older jsons) would be nice to have added where it then fails when you're editing a property when you meant to add a new one. Suggestion would be to name it throwOnEdit.

Same goes for relays, triggers, hudMemos, etc.