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

Allow military NVGs to be attached to exoskeleton head armor

Open Regilith opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe.

Military night vision goggles were recently made to only be usable when attached to military helmets with the proper mounts. Considering exoskeletons were developed by the military and made to be modular, it seems like an oversight that the suits would not be able to use this technology.

It makes sense to have an option for soldiers to see in the dark while in an exoskeleton, without relying on CBMs, either with a custom/proprietary solution, having it be built-in to the exoskeleton, or by using the preexisting NVGs.

Solution you would like.

Add a HELMET_FRONT_ATTACHMENT pocket to the exoskeleton head armors.

Describe alternatives you have considered.

Suffer in the dark days.

Additional context

I will tinker with an implementation unless there's pushback to the idea.

Regilith avatar Aug 26 '24 16:08 Regilith

Added the pocket to head armor to test it out, inserted goggles do not apply the enchantment to the player. I suspect that relic_data is not being inherited due to the goggles being in a pocket-within-a-pocket.

Applying the pocket to the exoskeleton itself works as expected.

Regilith avatar Aug 26 '24 17:08 Regilith

I suspect that relic_data is not being inherited due to the goggles being in a pocket-within-a-pocket.

Is this true even when both of the pockets have inherit_flags set to true?

Hyperseeker avatar Aug 28 '24 08:08 Hyperseeker

Setting inherit_flags to true on the exoskeleton pocket and head armor pocket does not work. I don't believe the relic_data is a flag, it just applies the NVG enchantment.

Regilith avatar Aug 28 '24 16:08 Regilith

I figured it out, I needed to add MODULE_HOLDER to the exoskeleton's flags. Drafting a PR now.

Regilith avatar Aug 28 '24 17:08 Regilith

I have implemented this feature, closing issue

Regilith avatar Aug 30 '24 03:08 Regilith