-
Notifications
You must be signed in to change notification settings - Fork 749
Arsenal - Native baseWeapon support for CBA items #9799
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
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9236414
Arsenal - Native baseWeapon support for CBA
LinkIsGrim 5ceb5bf
add support for preset backpacks
LinkIsGrim 80f6d92
Add replacing in verifyLoadout
LinkIsGrim 09299bf
Update addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf
LinkIsGrim 15ce06f
Update addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf
LinkIsGrim 742557d
Update addons/arsenal/functions/fnc_updateCurrentItemsList.sqf
LinkIsGrim 8393d49
update fnc_baseAttachment
LinkIsGrim 5a7ae5d
whitespace
LinkIsGrim aaafadf
Merge branch 'master' into arsenal-baseWeapon-cba-and-switchable
johnb432 c4f59d1
Fixed error with backpacks in backpacks + minor tweaks
johnb432 0f9dec4
handle equpped backpack being a preset
LinkIsGrim 863bf2f
Merge branch 'arsenal-baseWeapon-cba-and-switchable' of https://githu…
LinkIsGrim 3e1bd3b
verify base backpack availalibity
LinkIsGrim 728be9d
Update fnc_replaceUniqueItemsLoadout.sqf
johnb432 77cff6a
Check for non-preset class before unique base
johnb432 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: Jonpas, LinkIsGrim | ||
| * Returns base attachment for CBA scripted attachment | ||
| * Adapted from CBA_fnc_switchableAttachments | ||
| * | ||
| * Arguments: | ||
| * 0: Attachment <STRING> | ||
| * | ||
| * Return Value: | ||
| * Base attachment <STRING> | ||
| * | ||
| * Example: | ||
| * "ACE_acc_pointer_green_IR" call ace_arsenal_fnc_baseAttachment | ||
| * | ||
| * Public: Yes | ||
| */ | ||
|
|
||
| params [["_item", "", [""]]]; | ||
|
|
||
| TRACE_1("looking up base attachment",_item); | ||
|
|
||
| private _switchableClasses = []; | ||
|
|
||
| private _cfgWeapons = configfile >> "CfgWeapons"; | ||
| private _config = _cfgWeapons >> _item; | ||
| _item = configName _config; | ||
|
|
||
| while { | ||
| _config = _cfgWeapons >> getText (_config >> "MRT_SwitchItemNextClass"); | ||
| isClass _config && {_switchableClasses pushBackUnique configName _config != -1} | ||
| } do {}; | ||
|
|
||
| _config = _cfgWeapons >> _item; | ||
| private _backward = []; | ||
| while { | ||
| _config = _cfgWeapons >> getText (_config >> "MRT_SwitchItemPrevClass"); | ||
| isClass _config && {_backward pushBackUnique configName _config != -1} | ||
| } do {}; | ||
|
|
||
| _switchableClasses append _backward; | ||
| _switchableClasses = _switchableClasses arrayIntersect _switchableClasses; | ||
|
|
||
| { | ||
| if (getNumber (_cfgWeapons >> _x >> "scope") == 2) exitWith { | ||
| TRACE_2("found class",_item,_x); | ||
| _item = _x; | ||
| }; | ||
| } forEach _switchableClasses; | ||
|
|
||
| _item |
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,32 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: Jonpas, LinkIsGrim | ||
| * Returns base optic for CBA scripted optics (PIP and 2D) | ||
| * | ||
| * Arguments: | ||
| * 0: Optic <STRING> | ||
| * | ||
| * Return Value: | ||
| * Base optic <STRING> | ||
| * | ||
| * Example: | ||
| * "CUP_optic_Elcan_SpecterDR_black_PIP" call ace_arsenal_fnc_baseOptic | ||
| * | ||
| * Public: Yes | ||
| */ | ||
|
|
||
| params [["_optic", "", [""]]]; | ||
|
|
||
| // PIP | ||
| private _baseClasses = configProperties [configFile >> "CBA_PIPItems", "getText _x == _optic"]; | ||
|
|
||
| // Carry Handle | ||
| { | ||
| _baseClasses append (configProperties [_x, "getText _x == _optic"]); | ||
| } forEach configProperties [configFile >> "CBA_CarryHandleTypes"]; | ||
|
|
||
| if (_baseClasses isNotEqualTo []) then { | ||
| _optic = configName (_baseClasses select 0); | ||
| }; | ||
|
|
||
| _optic |
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
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
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
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.