Repair - Improve location of repair interaction points
When merged this pull request will:
- Fix #9558
- Add names of hitpoints with
dependsparameter to the name of the hitpoint they depend on - Expand ignored hipoint list to include armor parts, sideskirts and missing slats
IMPORTANT
- If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
- Development Guidelines are read, understood and applied.
- Title of this PR uses our standard template
Component - Add|Fix|Improve|Change|Make|Remove {changes}.
The only helicopter I'm still having issues with is the RHS AH-1Z, the hull and tail hitpoints are missing. Those hitpoints have empty selection strings, but mi-8 config is also missisng them and the hitpoints do show up, so I'm currently out of ideas.
The only helicopter I'm still having issues with is the RHS AH-1Z, the hull and tail hitpoints are missing. Those hitpoints have empty selection strings, but mi-8 config is also missisng them and the hitpoints do show up, so I'm currently out of ideas.
IIRC they use armorComponent
The only helicopter I'm still having issues with is the RHS AH-1Z, the hull and tail hitpoints are missing. Those hitpoints have empty selection strings, but mi-8 config is also missisng them and the hitpoints do show up, so I'm currently out of ideas.
IIRC they use armorComponent
Yup, exactly, that's why it's so weird that Mi-8 works. My best guess is that there's something weird in the config that causes it to skip over the check in fnc_getSelectionsToIgnore.sqf at line 100, but I just can't figure out what.
Added hull and engine to hitpoints using AveragePoint - I feel that those seem to work better in most cases. This can't really be used for all hitpoints, since it causes way more overlapping interaction points than the old method.
Fixed an error related to full repair of vehicles that return an empty getAllHitPointsDamage array - there are a few (less than 10 I think) vehicles like that in CUP. Should we handle them in some way to allow full repair?
Also finally figured out what was the issue with AH-1Z - there are some hitpoints which have depends specified, but the specified hitpoint is ignored (no selection or armorComponent), causing the hitpoint with depends to be unrepairable. In this case it's the tail rotor which can be damaged, but it depends on tail, which is ignored.
empty
getAllHitPointsDamagearray - there are a few (less than 10 I think) vehicles like that in CUP. Should we handle them in some way to allow full repair?
Another item to the TODO list to fix in CUP, which they must do.
The latest commits should solve the problems from the 2 reviews above. Since now depends are properly handled, they don't have to be always added to ignored hitpoints, which also means there's no need to make those multi-hitpoint names.
I noticed some RHS tanks have smokelauncher hitpoints - should they be left repairable?
I noticed some RHS tanks have smokelauncher hitpoints - should they be left repairable?
Why not ? TBF I could see rearming doing it simultaneously and it really being useful while rearming (depending on whether rearming is only possible with a rearm vehicle), but it shouldn't hurt having the option regardless. At least it gives modders another way to expand, if anything.
Why not ?
I noticed some of them had complex depends, so I wanted to make sure if it was worth digging into it.
And now that I look closer, not only do most of them have multiple parents but they also have depends in a chain, e.g.
smoketube_1_hitpoint depends = "era_22_hitpoint + smoketube_2_hitpoint";
smoketube_2_hitpoint depends = "era_22_hitpoint + smoketube_3_hitpoint";
Not sure how to handle that to be honest.
Why not ?
I noticed some of them had complex
depends, so I wanted to make sure if it was worth digging into it. And now that I look closer, not only do most of them have multiple parents but they also havedependsin a chain, e.g. smoketube_1_hitpointdepends = "era_22_hitpoint + smoketube_2_hitpoint";smoketube_2_hitpointdepends = "era_22_hitpoint + smoketube_3_hitpoint";Not sure how to handle that to be honest.
Ahhh, fair enough, no wonder, then.
Added handling of depends with complex parents (e.g. HitEngine depends = 0.5 * (HitEngine1 + HitEngine2)).
Also did some cleanup (mostly changing hitpoint to hitPoint for consistency), I hope it's not too out of scope for this pull request.
I tested RHS, CUP and vanilla, but I don't have any of the CDLCs so those still need checking. Here's a script for saving unique depends - parent pairs, so finding any weird ones should be quick. https://pastebin.com/Q6yMz7Cv
I hope it's not too out of scope for this pull request.
It really is, too many files were changed for what was actually changed, can't properly see what you've actually modified. I'm going to revert a number of variable name changes, as they make the PR harder to review.
Understood, will clean it up and hopefully have it ready for review over the next week or two (IRL issues finally cleared up).