-
Notifications
You must be signed in to change notification settings - Fork 751
Fire - Add ability to customize screams when on fire #10890
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
Merged
PabstMirror
merged 13 commits into
acemod:master
from
DartRuffian:fire/customize-screams
Jan 20, 2026
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
19738f6
Add ability to customize screams when on fire
DartRuffian 83655d0
Add docs
DartRuffian 7749e83
Add check for empty class
DartRuffian 67b3567
Update headers
DartRuffian 88ddf1e
Apply suggestions from code review
DartRuffian 2823bb2
Handle extra cases
DartRuffian 86a1345
_overwrite -> _append
DartRuffian a56509e
Merge branch 'master' into pr/10890
johnb432 be2cb85
Apply suggestions from code review
johnb432 f21c63d
Merge branch 'fire/customize-screams' of https://github.com/DartRuffi…
johnb432 0095220
Apply suggestion from @PabstMirror
johnb432 f496e63
Change function and hashmap name to be more consistent
johnb432 98f4c05
Update docs/wiki/framework/fire-framework.md
PabstMirror File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -8,4 +8,6 @@ PREP_RECOMPILE_END; | |
|
|
||
| #include "initSettings.inc.sqf" | ||
|
|
||
| GVAR(screamSounds) = createHashMap; | ||
|
|
||
| ADDON = true; | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: DartRuffian | ||
| * Adds custom fire scream sounds for a unit class. | ||
| * | ||
| * Arguments: | ||
| * 0: Unit class <STRING> | ||
| * 1: Array of CfgSounds classes <ARRAY of STRINGs> | ||
| * 2: Append to existing sounds array <BOOL> (default: true) | ||
| * - true : Passed sounds will be added to unit's existing sounds | ||
| * - false: Passed sounds will replace unit's existing sounds | ||
| * | ||
| * Return Value: | ||
| * Succeeded <BOOL> | ||
| * | ||
| * Example: | ||
| * [typeOf player, ["sound1", "sound2"]] call ace_fire_fnc_addScreamSounds | ||
| * | ||
| * Public: Yes | ||
| */ | ||
|
|
||
| params [["_unitClass", "", [""]], ["_screams", [], [[]]], ["_append", true, [false]]]; | ||
| TRACE_3("fnc_addScreamSounds",_unitClass,_screams,_overwrite); | ||
|
|
||
| if (_unitClass == "" || _screams isEqualTo [] || !(_unitClass isKindOf "CAManBase")) exitWith { false }; | ||
|
|
||
| if (_append) then { | ||
| private _existingScreams = _unitClass call FUNC(getScreamSounds); | ||
| _existingScreams append _screams; | ||
| GVAR(screamSounds) set [_unitClass, _existingScreams]; | ||
| } else { | ||
| GVAR(screamSounds) set [_unitClass, _screams]; | ||
| }; | ||
|
|
||
| true // return |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: DartRuffian | ||
| * Returns a list of scream sounds that a unit will play when on fire. | ||
| * | ||
| * Arguments: | ||
| * 0: Unit <OBJECT or STRING> | ||
| * | ||
| * Return Value: | ||
| * Scream sounds <ARRAY of STRINGs> | ||
| * | ||
| * Example: | ||
| * player call ace_fire_fnc_getScreamSounds | ||
| * | ||
| * Public: Yes | ||
johnb432 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| */ | ||
|
|
||
| params [["_unitClass", objNull, [objNull, ""]]]; | ||
| TRACE_1("fnc_getScreamSounds",_unitClass); | ||
|
|
||
| if (_unitClass isEqualType objNull) then { | ||
| _unitClass = typeOf _unitClass; | ||
| }; | ||
| if (_unitClass == "" || !(_unitClass isKindOf "CAManBase")) exitWith { [] }; | ||
|
|
||
| // If unit is defined in hash, grab sounds and return | ||
| // If not, check each parent of the class until a value is defined | ||
| GVAR(screamSounds) getOrDefaultCall [toLowerANSI _unitClass, { | ||
| private _cfg = configFile >> "CfgVehicles" >> _unitClass; | ||
| private _return = getArray (_cfg >> QGVAR(screamSounds)); | ||
| while {!isNull _cfg} do { | ||
| _cfg = inheritsFrom _cfg; | ||
| if ((toLowerANSI configName _cfg) in GVAR(screamSounds)) exitWith { _return = GVAR(screamSounds) get (toLowerANSI configName _cfg) }; | ||
| }; | ||
| _return | ||
| }, true] // return | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.