Add looks_like consistency check and fix broken references#85604
Draft
dumb-kevin wants to merge 2 commits intoCleverRaven:masterfrom
Draft
Add looks_like consistency check and fix broken references#85604dumb-kevin wants to merge 2 commits intoCleverRaven:masterfrom
dumb-kevin wants to merge 2 commits intoCleverRaven:masterfrom
Conversation
Validate EOC string references, item repairs_like / source_monster / cooks_like / smoking_result / rot_spawn, summon spells with zero duration, profession CBM-without-interface, and start_location om_terrain references. Fix looks_like pointing at removed power_armor_basic / knife_butcher, and use PREFIX match for urban_library variants. Add recipe cycle test for craft/uncraft exploits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Infrastructure "Add looks_like consistency check for items"
Purpose of change
Companion to #85591. Item
looks_likefields were never validated, so typos, renames, and removals silently broke visual fallbacks.Describe the solution
Add a check in
Item_factory::check_definitions()that validateslooks_likeagainst item, furniture, terrain, and trap registries. Fix all 56 broken references across 25 JSON files.Describe alternatives you've considered
Could skip cross-type validation (furniture/terrain/trap), but those refs are intentional and valid.
Testing
./tests/cata_test '[iteminfo]'-- zeroinvalid looks_likeerrors.Additional context
Most breakage came from past renames (power_armor -> exoskeleton, chainmail -> mc/lc_chainmail, 30l_barrel -> 30gal_barrel, etc.), one trailing-space typo, and one removed item.