Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that the id in looks_like exists #37758

Closed
snipercup opened this issue Feb 6, 2020 · 2 comments
Closed

Check that the id in looks_like exists #37758

snipercup opened this issue Feb 6, 2020 · 2 comments
Labels
SDL: Tiles / Sound Tiles visual interface and sounds.

Comments

@snipercup
Copy link
Contributor

snipercup commented Feb 6, 2020

Is your feature request related to a problem? Please describe.

Looks_like can have an entry that does not exist. For example I can enter "looks_like": "undefined", and the game does not complain. Right now a couple of items have looks_like 'pouch' but 'pouch' does not exist as an id. See #37759

Describe the solution you'd like

When launching the game it should throw an error (that can be ignored) if it finds a looks_like that points to an id that does not exist.

Describe alternatives you've considered

Removing the looks_like entries that do not point to an existing item

@snipercup
Copy link
Contributor Author

Found another example where boxer_briefs was spelled as boxer-briefs. Of course while adding looks_like it should be tested properly but having the game check it for you should help. I'm finding out now becuase my cdda-content-manager only allows me to select valid ids

@mlangsdorf
Copy link
Contributor

look-ups for looks_like failing silently is the correct and desired behavior. If you want to write an out-of-game JSON reference validator, that would be appreciated, but that's a separate thing.

End users shouldn't be burdened with scary debug messages every time they encounter a spelling mistake in an optional entry in new content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDL: Tiles / Sound Tiles visual interface and sounds.
Projects
None yet
Development

No branches or pull requests

2 participants