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

Accessory - Removes action from pointers while not in slot #1489

Merged
merged 2 commits into from
Sep 13, 2021

Conversation

10Dozen
Copy link
Contributor

@10Dozen 10Dozen commented Aug 3, 2021

When merged this pull request will:

  • fnc_switchAttachment operates only mounted items, but inventory action was available everywhere (and didn't work). Pull request changes action availabness to POINTER and OPTICS slots.

NOTE:
Currently if you place pointer with laser/flashlight MRT options (or optics) to e.g. untiform container - it will still have enabled 'Next rail item state' action in the item context menu. But when selected - item is not changed (because called function only works when item is attached to a gun).

fnc_switchAttachment operates only mounted items, but inventory action was available eveywhere
@veteran29 veteran29 self-requested a review August 3, 2021 11:47
@commy2
Copy link
Contributor

commy2 commented Aug 3, 2021

These are supposed to work on all slots, not just pointers?

@10Dozen
Copy link
Contributor Author

10Dozen commented Aug 3, 2021

These are supposed to work on all slots, not just pointers?

Doesn't make sense to me to be able to enable flashlight while LLM-01 is in the backpack.
Maybe it will be useful for ACE map flashlight system, but not sure now.

EDIT:
ACE checks for all items
https://github.com/acemod/ACE3/blob/fa6da1ae7cb09c53c5ea6383322accd3c5f90e45/addons/map/functions/fnc_getUnitFlashlights.sqf#L20
(according to https://cbateam.github.io/CBA_A3/docs/files/common/fnc_uniqueUnitItems-sqf.html other params are all True by default)

So maybe switchAttachements function need rewrite to allow switching not only attached items, but in containers too.

@commy2
Copy link
Contributor

commy2 commented Aug 3, 2021

Now it makes more sense to me, but I don't understand the need for this change. What is actually broken here?

@10Dozen
Copy link
Contributor Author

10Dozen commented Aug 3, 2021

Currently if you place pointer with laser/flashlight MRT options (or optics) to e.g. untiform container - it will still have enabled 'Next rail item state' action in the item context menu. But when selected - item is not changed (because called function only works when item is attached to a gun).

@commy2
Copy link
Contributor

commy2 commented Aug 3, 2021

I see. Yeah, then this pr makes sense to me now.

@jonpas jonpas added the Bug Fix label Sep 12, 2021
@jonpas jonpas added this to the 3.15.6 milestone Sep 12, 2021
@PabstMirror PabstMirror merged commit 4fb95ef into CBATeam:master Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants