Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

vehicles: added force replace button

Open sonphantrung opened this issue 2 years ago • 6 comments

Summary

Content "vehicles: added force replace button"

Purpose of change

Less keypresses for replacing battered up veh parts ;)

Describe the solution

added the force replace button:

  • In the do_repair function, when a vehicle part is broken, instead of doing the repair, the function will instead do the vehicle installation process. In this PR, I've added force_replace boolean (replace button calls do_repair( true ))

~~(I'm getting errors from my clangd LSP, plus currently unable to compile, that's why I'm setting it to WIP)~~ Not yet compiled

Describe alternatives you've considered

Not doing this and having to do 9999 more buttons to remove then install vehicle parts (NOOOOOOOO!!!)

Testing

Not yet compiled

Additional context

sonphantrung avatar Aug 19 '22 10:08 sonphantrung

How does this "force replace" button work? Does it work for every vehicle part, or only for batteries?

Night-Pryanik avatar Aug 19 '22 11:08 Night-Pryanik

Yes, theoretically, it works for every single vehicles (when a vehicle part is broken, it'll call installation requirements instead of reparation requirements)

sonphantrung avatar Aug 19 '22 12:08 sonphantrung

Fwiw this is essentially a cheat

Assume damaged frame; instead of removing all parts on a tile, replacing the frame and re-welding/installing parts back you can "replace" it and end up paying time/charges/rods/etc just for the frame installation

irwiss avatar Aug 20 '22 14:08 irwiss

If you're actively working on this PR, consider making it a draft.

Night-Pryanik avatar Aug 24 '22 11:08 Night-Pryanik

I have a question which makes me feel quite wondering: Can Installation and Removal requirements be concatenated into a variable?

sonphantrung avatar Aug 27 '22 07:08 sonphantrung

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

stale[bot] avatar Nov 02 '22 03:11 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

github-actions[bot] avatar May 07 '23 01:05 github-actions[bot]