Skip to content

IR Light - Fix bad item replacements and switching to primary weapons#10119

Merged
johnb432 merged 9 commits intomasterfrom
irlight-fixes
Aug 11, 2024
Merged

IR Light - Fix bad item replacements and switching to primary weapons#10119
johnb432 merged 9 commits intomasterfrom
irlight-fixes

Conversation

@johnb432
Copy link
Copy Markdown
Contributor

@johnb432 johnb432 commented Jul 16, 2024

When merged this pull request will:

  • Title: Implementation seemed to only account for primary weapon usage, despite the IR lights being compatible with launchers such as the MAAWS and the Titan.
  • Removes 2 unused functions.
  • Requires Common - Add ace_common_fnc_switchAttachmentMode #10135.
  • Requires Common - Improve persistent lights/lasers #10118 to restore previous laser status, as I feel like it should handle that (and not this component).
  • Added a weapon parameter to switchAttachmentMode (for last bullet point)
  • Made switchPersistentLaser take pointer switching into account (should have been added in Common - Improve persistent lights/lasers #10118, but overlooked)
  • Fixed IR light attachments being added to the wrong weapon (was previously being added to currentWeapon, when it wasn't necessarily the unit's current weapon)

Question I have:
There are now 2 unused functions. Can we remove them?

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}.

@johnb432 johnb432 added the kind/bug-fix Release Notes: **FIXED:** label Jul 16, 2024
@johnb432 johnb432 added this to the 3.18.0 milestone Jul 16, 2024
Comment thread addons/irlight/functions/fnc_initItemContextMenu.sqf Outdated
Comment thread addons/irlight/functions/fnc_initItemContextMenu.sqf Outdated
Comment thread addons/irlight/functions/fnc_initItemContextMenu.sqf
Comment thread addons/irlight/functions/fnc_initItemContextMenu.sqf Outdated
- Added a weapon parameter to `switchAttachmentMode`
- Made `switchPersistentLaser` take pointer switching into account
- Fixed IR light attachments being added to the wrong weapon
@johnb432
Copy link
Copy Markdown
Contributor Author

johnb432 commented Aug 8, 2024

  • Added a weapon parameter to switchAttachmentMode (for 3rd bullet point)
  • Made switchPersistentLaser take pointer switching into account
  • Fixed IR light attachments being added to the wrong weapon (was previously being added to currentWeapon, when it wasn't necessarily the unit's current weapon)

@johnb432 johnb432 merged commit b7f48a9 into master Aug 11, 2024
@johnb432 johnb432 deleted the irlight-fixes branch August 11, 2024 15:08
blake8090 pushed a commit to blake8090/ACE3 that referenced this pull request Aug 18, 2024
…acemod#10119)

* Fix bad item replacements and switching to primary weapons

* Update addons/irlight/functions/fnc_initItemContextMenu.sqf

* Update fnc_initItemContextMenu.sqf

* Remove unused funtions

* Various fixes/tweaks

- Added a weapon parameter to `switchAttachmentMode`
- Made `switchPersistentLaser` take pointer switching into account
- Fixed IR light attachments being added to the wrong weapon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug-fix Release Notes: **FIXED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants