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.
Arsenal - Show DLC Requirement Image (acemod#10506)
* arsenal dlc requirement * fix merge, add file * Update addons/common/functions/fnc_getDLC.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/common/functions/fnc_getDLC.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/common/functions/fnc_getDLC.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * sort and fix duplicate * use getAssetDLCInfo * Update addons/common/functions/fnc_getDLC.sqf * params, header * Update addons/common/functions/fnc_getDLC.sqf Co-authored-by: Dart <59131299+DartRuffian@users.noreply.github.com> * Update addons/arsenal/initSettings.inc.sqf Co-authored-by: Dart <59131299+DartRuffian@users.noreply.github.com> * Update addons/common/functions/fnc_getDLC.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/common/functions/fnc_getDLC.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: Dart <59131299+DartRuffian@users.noreply.github.com>
- Loading branch information
1 parent
2c02fad
commit c698d28
Showing
8 changed files
with
108 additions
and
6 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
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,68 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Brett Mayson | ||
* Get the DLC information of a class. | ||
* | ||
* Arguments: | ||
* 0: Classname <STRING> or Config <CONFIG> | ||
* 1: Config root, searches if unspecified or null <CONFIG> (default: configNull) | ||
* | ||
* Return Value: | ||
* DLC Info <ARRAY> | ||
* 0: DLC Classname <STRING> | ||
* 1: Steam ID <NUMBER> | ||
* | ||
* Example: | ||
* "launch_NLAW_F" call ace_common_fnc_getDLC | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params [["_class", configNull, ["", configNull]], ["_root", configNull, [configNull]]]; | ||
|
||
private _config = if (_class isEqualType configNull) then { | ||
_class | ||
} else { | ||
if !(isNull _root) then { | ||
_root >> _class | ||
} else { | ||
_class call CBA_fnc_getItemConfig | ||
}; | ||
}; | ||
if (isNull _config) exitWith { | ||
["", 0] | ||
}; | ||
|
||
if (getNumber (_config >> "ItemInfo" >> "type") == TYPE_UNIFORM) then { | ||
_config = configFile >> "CfgVehicles" >> getText (_config >> "itemInfo" >> "uniformClass") | ||
}; | ||
|
||
(getAssetDLCInfo getText (_config >> "model")) params [ | ||
"_isDLC", "", "", "", "_id" | ||
]; | ||
|
||
if (!_isDLC) exitWith { | ||
["", 0] | ||
}; | ||
|
||
private _name = switch (_id) do { | ||
case "1021790": { "Enoch" }; | ||
case "395180": { "Expansion" }; | ||
case "304380": { "Heli" }; | ||
case "601670": { "Jets" }; | ||
case "288520": { "Kart" }; | ||
case "332350": { "Mark" }; | ||
case "288520": { "Orange" }; | ||
case "744950": { "Tacops" }; | ||
case "798390": { "Tank" }; | ||
case "1042220": { "GM" }; | ||
case "1227700": { "VN" }; | ||
case "1294440": { "CSLA" }; | ||
case "1681170": { "WS" }; | ||
case "1175380": { "SPE" }; | ||
case "2647760": { "RF" }; | ||
case "2647830": { "EF" }; | ||
default { "" }; | ||
}; | ||
|
||
[_name, _id] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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