Skip to content
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

General - Use subcomponent macro (CBA 3.16.0) #9375

Merged
merged 8 commits into from
Sep 12, 2023
Merged

Conversation

jonpas
Copy link
Member

@jonpas jonpas commented Sep 8, 2023

When merged this pull request will:

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

Requires CBA v3.16.0 - CBATeam/CBA_A3#1598!


Tested with:

diff --git a/addons/compat_ws/compat_ws_nouniformrestrictions/CfgVehicles.hpp b/addons/compat_ws/compat_ws_nouniformrestrictions/CfgVehicles.hpp
index 8158db66c..5a2dd3411 100644
--- a/addons/compat_ws/compat_ws_nouniformrestrictions/CfgVehicles.hpp
+++ b/addons/compat_ws/compat_ws_nouniformrestrictions/CfgVehicles.hpp
@@ -105,6 +105,7 @@ class CfgVehicles {
         modelSides[] = {6};
     };
     class I_SFIA_defector_lxWS: I_SFIA_soldier_lxWS {
+        dlc = "ace";
         modelSides[] = {6};
     };
     class O_Tura_scout_lxWS: I_SFIA_scout_lxWS {
diff --git a/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp b/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp
index 055806407..3d8658638 100644
--- a/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp
+++ b/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp
@@ -3,7 +3,7 @@
 class CfgPatches {
     class SUBADDON {
         name = COMPONENT_NAME;
-        units[] = {};
+        units[] = {"I_SFIA_defector_lxWS"};
         weapons[] = {};
         requiredVersion = REQUIRED_VERSION;
         requiredAddons[] = {

image

addons[]=
{
	"Characters_f_lxWS",
	"ace_compat_ws_nouniformrestrictions"
};
class AddonsMetaData
{
	class List
	{
		items=2;
		class Item0
		{
			className="Characters_f_lxWS";
			name="Arma 3 Western Sahara - Characters and Clothing";
			author="Rotators Collective";
			url="https://www.arma3.com";
		};
		class Item1
		{
			className="ace_compat_ws_nouniformrestrictions";
			name="ACE3 - Western Sahara Compatibility - No Uniform Restrictions";
			author="ACE-Team";
			url="https://ace3.acemod.org/";
		};
	};
};

@jonpas jonpas added the kind/enhancement Release Notes: **IMPROVED:** label Sep 8, 2023
@jonpas jonpas added this to the 3.16.0 milestone Sep 8, 2023
VERSION_CONFIG;

addonRootClass = QUOTE(COMPONENT);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this, I am not sure if we want it?

CfgPatches wiki page says:

To make configuration of meta data simpler, you can simply create a link to the root class instead of defining name, author and url again. A good practice is to have all configs withing one PBO to use the same meta data.

But some of our compats might be better off requiring a subcomponent specifically?

@jonpas jonpas changed the title Use subcomponent macro (CBA 3.16.0) General - Use subcomponent macro (CBA 3.16.0) Sep 9, 2023
@@ -12,6 +11,8 @@ class CfgPatches {
author = ECSTRING(common,ACETeam);
url = ECSTRING(main,URL);
VERSION_CONFIG;

addonRootClass = QUOTE(COMPONENT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in game it's addonRootClass = "huntir"; for all of these

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what it should be.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
addonRootClass = QUOTE(COMPONENT);
addonRootClass = QUOTE(ADDON);

Copy link
Member Author

@jonpas jonpas Sep 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Right... whoever did the compats subconfigs did that too, eg.

addonRootClass = QUOTE(COMPONENT);

Will fix in this PR. But I wonder if we even need/want this, see above comment.

@jonpas jonpas merged commit 7cbdb7f into master Sep 12, 2023
5 checks passed
@jonpas jonpas deleted the subconfig-macro branch September 12, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants