Page MenuHomeFeedback Tracker

CfgFunctions - requiredAddons
New, NormalPublic

Description

https://community.bistudio.com/wiki/Arma_3:_Functions_Library

class CfgFunctions
{
	class TAG
	{
		class Category
		{
			class myFunction {};
		};

		class OtherCategory
		{
			file = "My\Category\Path";
			class myFunction {}; // file path will be <ROOT>\My\Category\Path\fn_myFunction.sqf";
		};

		class DataCategory
		{
			requiredAddons[] = { "A3_Data_F" }; // Optional requirements of CfgPatches classes. If some addons are missing, category functions will not be compiled.
			class myDataFunction {};
		};
	};
};

In this example, requiredAddons[] is being used as a Category attribute.

Contrary to that, the code seems to looking for a TAG attribute.

I dont know if the Documentation needs to be adjusted or the attribute doesnt work as intended.

I personally think it would be pretty cool if it would work for Categories as indicated in the biki.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Config
Additional Information

https://github.com/OverlordZorn/CVO-Auxiliary/blob/main/addons/arsenal/config.cpp#L52

[...]
		class CVO_Arsenal_GreenMag
		{
			file = "z\cvo_aux\addons\arsenal\functions";
			requiredAddons[] = { "greenmag_main" };

			class greenmag_tab { postInit = 1; };
		};

Despite being defined with the requiredAddons[] Attribute, the greenmag_tab function is being executed even if the "greenmag_main" addon is not loaded.

Event Timeline

mrzorn created this task.Aug 15 2024, 3:55 AM
mrzorn updated the task description. (Show Details)Aug 15 2024, 4:31 AM