-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Racks - Add Use to Intercom-Radios and Increase access on MRAPs (#1271)
Co-authored-by: jonpas <[email protected]>
- Loading branch information
Showing
6 changed files
with
65 additions
and
16 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: ACRE2Team, mrschick | ||
* Returns the rack letter if a radio is currently mounted. | ||
* | ||
* Arguments: | ||
* 0: Radio ID <STRING> | ||
* | ||
* Return Value: | ||
* Letter on Work knob corresponding to the rack, or "" if radio is not in a rack <STRING> | ||
* | ||
* Example: | ||
* ["ACRE_PRC152_ID_1"] call acre_sys_rack_fnc_getRackLetterFromRadio | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_radioId"]; | ||
|
||
private _return = ""; | ||
|
||
private _wiredRacks = [vehicle acre_player, acre_player, EGVAR(sys_intercom,activeIntercom), "wiredRacks"] call EFUNC(sys_intercom,getStationConfiguration); | ||
{ | ||
private _rackId = _x select 0; | ||
if (([_rackId] call FUNC(getMountedRadio)) == _radioId) exitWith { | ||
_return = [RACK_LETTERS] select _forEachIndex; | ||
}; | ||
} forEach _wiredRacks; | ||
|
||
_return |
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