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

Allow repairing items with forges #2188

Merged
merged 2 commits into from
Dec 17, 2022

Conversation

chaosvolt
Copy link
Member

Summary

SUMMARY: Features "Add item repair use action to charcoal forges, electric forges, and grid forge fake item."

Purpose of change

Something I'd wanted for years but only realized I could implement while working on #2187. This is basically why can forges in Cataclysm++ have a use action, because for the longest time you couldn't have forges do repair actions without it causing weird behavior with the furniture version.

Describe the solution

  1. Added repair action to electric forges. Uses fabrication skill and targets all metal materials that welders and soldering irons target, uses tool quality and charges per use just below that of welders.
  2. Added repair action to charcoal forges. Like with welders vs makeshift welders, charges consumed and time take is doubled while tool quality is halved.
  3. Added the same repair action as electric forges to grid forges.
  4. Added use_furn_fake_item examine to grid forges.

Describe alternatives you've considered

  1. Allowing brick kilns to repair clay items, if the below problem can be resolved.
  2. Adding this to the code for examining vehicle forge rigs maybe?

Testing

  1. Checked affected files for syntax and lint errors.
  2. Loaded up compiled test build.
  3. Spawned in a grid forge, confirmed it let me try to repair stuff when examined.

One problem with this however: far as I'm aware, examine_action can't currently be an array, so charcoal forge furniture can't have both use_furn_fake_item and reload_furniture, meaning only its item form can be used for repairs.

Stuff like braziers can handle undeploying from deployed_item automatically, freeing up its examine action to count as a fireplace. Maybe I could look into the code to see if there's some way to handle use_furn_fake_item stuff automatically, or would converting examine_action into an array be a more desirable fix?

Additional context

Per testing in the linked PR above, being able to activate grid forges to repair items should correctly carry over to grid forge rigs.

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Nov 13, 2022
@github-actions github-actions bot added the tests changes related to tests label Nov 13, 2022
@Coolthulhu Coolthulhu self-assigned this Nov 15, 2022
@Coolthulhu Coolthulhu merged commit bbcfbff into cataclysmbnteam:upload Dec 17, 2022
@chaosvolt chaosvolt deleted the forging-repair-action branch December 17, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. tests changes related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants