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

Add "repairs_like" for items without a recipe #36700

Merged
merged 1 commit into from
Jan 5, 2020

Conversation

anothersimulacrum
Copy link
Member

@anothersimulacrum anothersimulacrum commented Jan 4, 2020

Summary

SUMMARY: Bugfixes "Fix items without a recipe having very high recipe difficulty"

Purpose of change

Fixes #36580

Describe the solution

Add repairs_like to itype, and modify repair_item_actor::repair_recipe_difficulty() to use the item's repairs_like if a recipe for the item is not found.
Add find_repair_difficulty(), which finds the appropriate repair difficulty for the itype_id provided, and use this to reduce code duplication in repair_item_actor::repair_recipe_difficulty().

Testing

Create a character, spawn in a scarf, sewing kit, and several rags. Attempt to reinforce the scarf, and note the difficulty.
Activate the scarf to loosen it, then attempt to reinforce it, and note that the difficulty is the same.

Additional context

I may be missing some items that could use repairs_like.

src/iuse_actor.cpp Outdated Show resolved Hide resolved
When items did not have a recipe, the difficulty for repairing them was
set to 10. For some items, such as scarves, this made repairing the
activated versions of them much more difficult than repairing the
non-activated versions. Now, they can have a 'repairs_like' specified,
and if they do not have a recipe, they will use the recipe of that item
instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"(loose) knit scarves" are MUCH more difficult to repair than "knit scarves"
3 participants