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

Common - Improve persistent lights/lasers #10118

Merged
merged 7 commits into from
Aug 8, 2024

Conversation

johnb432
Copy link
Contributor

@johnb432 johnb432 commented Jul 16, 2024

When merged this pull request will:

  • Remove daylight restriction to allow visible lasers to be persistent.
  • Use vanilla input EH to address Add persistent laserpointer #5821 (comment).
  • Get the current laser state when the setting is turned on.
  • You can now have persistent lights/lasers on pistols/launchers when having a primary weapon (not possible with old code).

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/enhancement Release Notes: **IMPROVED:** label Jul 16, 2024
@johnb432 johnb432 added this to the 3.18.0 milestone Jul 16, 2024
@PabstMirror
Copy link
Contributor

Maybe we should reconsider the default setting for this if we are replacing the keep light on part in #10119

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
@johnb432
Copy link
Contributor Author

johnb432 commented Jul 18, 2024

Maybe we should reconsider the default setting for this if we are replacing the keep light on part in #10119

I agree, but I'm a bit hesitant about changing it, because this system is quite "imposing": if another mod uses any of the action used here, those results will be ignored. Currently there is no way of setting the laser status with persistence enabled, which I will add here, but it means 3rd parties need to use said API to get their stuff to work. I'll try to make the API persistence agnostic, so that 3rd parties can use it without having to think how to implement the API.

But even if the API were added, I'm still a bit uncertain about changing the default. IMO IR light never needed and shouldn't have had to mess around with turning attachments on.

@johnb432
Copy link
Contributor Author

johnb432 commented Aug 8, 2024

TODO in a future PR: Add support for turning in/out of vehicles.

@johnb432 johnb432 merged commit 7838dea into master Aug 8, 2024
5 checks passed
@johnb432 johnb432 deleted the common-improve-persistent-laser branch August 8, 2024 08:01
blake8090 pushed a commit to blake8090/ACE3 that referenced this pull request Aug 18, 2024
* Improve persistent lasers

* Update addons/common/functions/fnc_switchPersistentLaser.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Fix inventory changes toggling laser, removed alignment code

* Update addons/common/functions/fnc_switchPersistentLaser.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Added API for setting weapon lights/lasers

* Fix undefined variables

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants