forked from acemod/ACE3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overpressure - Separate backblast and overpressure range coefficient (a…
…cemod#10070) * feat: separate overpressure and backblast configurations * documentation: remove undefined return * typo: trace macro padding * refactor: add range<number> return * refactor: reuse return values for overpressure coef * refactor: reuse return values for backblast coef * whitespace Co-authored-by: Drofseh <[email protected]> * headers Co-authored-by: Drofseh <[email protected]> Co-authored-by: johnb432 <[email protected]> * feat: change backblast limit to 0 Co-authored-by: PabstMirror <[email protected]> * remove: deleted ACE_Settings.hpp * fix: update postInit.sqf event handler to register new GVARs * fix: remove `ACE_Settings.hpp` * typo: add spacing Co-authored-by: Drofseh <[email protected]> * typo: fix spacing Co-authored-by: johnb432 <[email protected]> * feat: switch distanceCoef minimun value to 0 Co-authored-by: johnb432 <[email protected]> * typo: update the slider checks with new minimuns temporary solution until i figure out the EH Co-authored-by: johnb432 <[email protected]> * feat: new stringable elements * Update stringtable.xml * Added translations * Switched order of settings to match age of settings * setting require restart, split adding firedEH * Added notifications about mission restart --------- Co-authored-by: Grim <[email protected]> Co-authored-by: Drofseh <[email protected]> Co-authored-by: johnb432 <[email protected]> Co-authored-by: PabstMirror <[email protected]>
- Loading branch information
Showing
8 changed files
with
50 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
#include "script_component.hpp" | ||
|
||
["CBA_settingsInitialized", { | ||
TRACE_1("settingsInit eh",GVAR(distanceCoefficient)); | ||
if (GVAR(distanceCoefficient) <= 0) exitWith {}; | ||
TRACE_2("settingsInit eh",GVAR(backblastDistanceCoefficient),GVAR(overpressureDistanceCoefficient)); | ||
|
||
["ace_overpressure", LINKFUNC(overpressureDamage)] call CBA_fnc_addEventHandler; | ||
|
||
// Register fire event handler | ||
["ace_firedPlayer", LINKFUNC(firedEHBB)] call CBA_fnc_addEventHandler; | ||
["ace_firedPlayerVehicle", LINKFUNC(firedEHOP)] call CBA_fnc_addEventHandler; | ||
// Register fire event handlers | ||
if (GVAR(backblastDistanceCoefficient) > 0) then { | ||
["ace_firedPlayer", LINKFUNC(firedEHBB)] call CBA_fnc_addEventHandler; | ||
}; | ||
if (GVAR(overpressureDistanceCoefficient) > 0) then { | ||
["ace_firedPlayerVehicle", LINKFUNC(firedEHOP)] call CBA_fnc_addEventHandler; | ||
}; | ||
|
||
GVAR(cacheHash) = createHashMap; | ||
}] call CBA_fnc_addEventHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(DisplayName)]; | ||
|
||
[ | ||
QGVAR(distanceCoefficient), "SLIDER", | ||
QGVAR(overpressureDistanceCoefficient), | ||
"SLIDER", | ||
[LSTRING(distanceCoefficient_displayName), LSTRING(distanceCoefficient_toolTip)], | ||
_category, | ||
[-1, 10, 1, 1], | ||
1 | ||
[0, 10, 1, 1], | ||
1, | ||
{[QGVAR(overpressureDistanceCoefficient), _this] call EFUNC(common,cbaSettings_settingChanged)}, | ||
true // Needs mission restart | ||
] call CBA_fnc_addSetting; | ||
|
||
[ | ||
QGVAR(backblastDistanceCoefficient), | ||
"SLIDER", | ||
[LSTRING(backblastDistanceCoefficient_displayName), LSTRING(backblastDistanceCoefficient_toolTip)], | ||
_category, | ||
[0, 10, 1, 1], | ||
1, | ||
{[QGVAR(backblastDistanceCoefficient), _this] call EFUNC(common,cbaSettings_settingChanged)}, | ||
true // Needs mission restart | ||
] call CBA_fnc_addSetting; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters