-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move garage GETDLC macro to common function (#183)
* Move garage GETDLC macro to common function * Update return value description
- Loading branch information
Showing
5 changed files
with
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: mharis001 | ||
* Returns the DLC that the given config belongs to. | ||
* | ||
* Arguments: | ||
* 0: Config <CONFIG> | ||
* | ||
* Return Value: | ||
* DLC Classname <STRING> | ||
* | ||
* Example: | ||
* [configFile >> "CfgVehicles" >> "CAManBase"] call zen_common_fnc_getDLC | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params [["_config", configNull, [configNull]]]; | ||
|
||
private _dlc = ""; | ||
private _addons = configSourceAddonList _config; | ||
|
||
if !(_addons isEqualTo []) then { | ||
private _mods = configSourceModList (configFile >> "CfgPatches" >> _addons select 0); | ||
|
||
if !(_mods isEqualTo []) then { | ||
_dlc = _mods select 0; | ||
}; | ||
}; | ||
|
||
_dlc |
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