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

Overpressure - Add editor range attribute for vehicles #10411

Merged
merged 33 commits into from
Oct 22, 2024

Conversation

bluefieldcreator
Copy link
Contributor

@bluefieldcreator bluefieldcreator commented Oct 13, 2024

When merged this pull request will:

  • Add overpressure range setting per vehicle

Problem: if the user has the server setting set to 10 (example) and a mission maker wants to set a vehicle's value to 0, it wont work. Since we check for >= 0.1

I cant figure out a good system other than making an entire new overpressure setting called "enable overpressure" as a checkbox instead of the range slider.

There might be some use cases where a user may want to disable overpressure on some vehicles, and change the values of others, which would require both... so I might update this in the future to add such use case.

Important bits of code: cfgEden.hpp & fnc_firedEHOP.sqf

2nd ever PR i appreciate all feedback. 🥲

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

@LinkIsGrim LinkIsGrim changed the title Add overpressure slider to vehicle attributes Overpressure - Add editor range slider for vehicles Oct 13, 2024
@LinkIsGrim LinkIsGrim added this to the 3.18.2 milestone Oct 13, 2024
@LinkIsGrim LinkIsGrim added the kind/enhancement Release Notes: **IMPROVED:** label Oct 13, 2024
@bluefieldcreator
Copy link
Contributor Author

Why are all the tabs failing OH MY GOD

@bluefieldcreator
Copy link
Contributor Author

TODO:

  • FIX TEXT IN ATTRIBUTES
  • CHANGE SLIDER TO TEXT BOX
  • ADD DEFAULT -1 VALUE TO CHECK AGAINST ENABLING, DISABLING AND CUSTOM VALUES

@bluefieldcreator bluefieldcreator marked this pull request as draft October 13, 2024 15:09
@bluefieldcreator bluefieldcreator marked this pull request as ready for review October 13, 2024 15:25
@LinkIsGrim LinkIsGrim changed the title Overpressure - Add editor range slider for vehicles Overpressure - Add editor range attribute for vehicles Oct 13, 2024
@bluefieldcreator
Copy link
Contributor Author

Okay, I fixed EVERYTHING - This PR is ready for review & merge.

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
bluefieldcreator and others added 3 commits October 13, 2024 18:08
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
LinkIsGrim
LinkIsGrim previously approved these changes Oct 13, 2024
private _unitOverpressureRangeAttribute = _unit getVariable QEGVAR(overpressure,distance);

// If -1 (disabled) we return to server value, otherwise we use the given value.
_dangerZoneRange = _dangerZoneRange * [_unitOverpressureRangeAttribute, GVAR(overpressureDistanceCoefficient)] select (_unitOverpressureRangeAttribute < 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

help[L-S12]: Invalid Args - [B:*]
┌─ addons/overpressure/functions/fnc_firedEHOP.sqf:29:37

you are multiplying a number times an array

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot parentheses

@@ -22,7 +22,11 @@ TRACE_8("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_gunn
private _opValues = [_weapon, _ammo, _magazine] call FUNC(getOverPressureValues);

_opValues params ["_dangerZoneAngle", "_dangerZoneRange", "_dangerZoneDamage"];
_dangerZoneRange = _dangerZoneRange * GVAR(overpressureDistanceCoefficient);

private _unitOverpressureRangeAttribute = _unit getVariable QEGVAR(overpressure,distance);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be undefined for most cases

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the editor attribute set it to -1 because of default value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private _unitOverpressureRangeAttribute = _unit getVariable QEGVAR(overpressure,distance);
private _unitOverpressureRangeAttribute = _unit getVariable [QEGVAR(overpressure,distance), -1];

in any case

Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not working

bluefieldcreator and others added 2 commits October 14, 2024 02:03
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
@johnb432 johnb432 self-requested a review October 15, 2024 13:17
bluefieldcreator and others added 7 commits October 19, 2024 19:07
Signed-off-by: bluefield <59333909+bluefieldcreator@users.noreply.github.com>
Signed-off-by: bluefield <59333909+bluefieldcreator@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Signed-off-by: bluefield <59333909+bluefieldcreator@users.noreply.github.com>
@bluefieldcreator
Copy link
Contributor Author

I think... that's it... I hate the GH phone app, I thought it merged your changes.

My bad

Signed-off-by: bluefield <59333909+bluefieldcreator@users.noreply.github.com>
@PabstMirror PabstMirror merged commit c87e2cb into acemod:master Oct 22, 2024
3 checks passed
@bluefieldcreator
Copy link
Contributor Author

Finally... :D

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.

4 participants