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

Fragile and Sturdy flags cannot be inherited

Open John-Candlebury opened this issue 1 year ago • 6 comments

Summary

Bugfixes "Fragile and Sturdy flags cannot be inherited"

Purpose of change

Fixes: #75163

And overall it doesnt make sense for the base item to ever become fragile/sturdy when you attach items to it.

John-Candlebury avatar Oct 22 '24 15:10 John-Candlebury

Wouldn't it be better to instead apply something like:

"delete": { "flags": [ "FRAGILE" ] }

directly to the Aftershock item(s) ?

If there are any other items using "copy-from" that rely on copying such flags, they will break with this change.

Edit: to clarify, I'm specifically talking about FRAGILE and STURDY.

RedMisao avatar Oct 22 '24 15:10 RedMisao

I do not see why limiting the compatibility of the flags with copy-from is the way to go instead of solving the problem where it actually is a problem through the use of delete syntax.

Karol1223 avatar Oct 22 '24 15:10 Karol1223

You could potentially make it so that extending with sturdy/fragile removes the other (or some general form of that for conflicting flags) would be fine but just removing inheritance from stuff isn't cool

Procyonae avatar Oct 22 '24 16:10 Procyonae

Oh this affects only the behaviour of the "inherits_flags" pocket setting, as when you mount a NVG unit to an army helmet. "copy-from" functionality wont be affected by this.

John-Candlebury avatar Oct 22 '24 16:10 John-Candlebury

Modded the inherit line to check if a item B being a copy-from item A with FRAGILE inherited the flag, and it does. Most importantly, it is already documented to work for attachments/pockets, my bad.

RedMisao avatar Oct 22 '24 22:10 RedMisao

No worries.

John-Candlebury avatar Oct 22 '24 22:10 John-Candlebury