-
Notifications
You must be signed in to change notification settings - Fork 148
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
Module development #342
Module development #342
Conversation
@@ -0,0 +1 @@ | |||
x\cba\addons\modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a newline at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
79dbaf7
to
1a11e8d
Compare
}; | ||
} forEach _units; | ||
if (count _localUnits == 0) exitWith {}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is select
incompatible with Linux builds? Otherwise you can use it here
_localUnits = _units select {local _x};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Select BOOL is, select CODE is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonpas I just want to make sure I am not misunderstanding this. Cuel's suggestion would NOT work on linux builds? Therefore, I should keep the code how it is.
cbbced1
to
5b1a6bf
Compare
is there any reason why you use param and not params? |
_localGroups pushBack _x; | ||
}; | ||
} forEach _groups; | ||
if (count _localGroups == 0) exitWith {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_localGroups isEqualTo []
should be faster
requiredAddons[] = {"A3_Modules_F"}; | ||
author = "$STR_CBA_Author"; | ||
authors[] = {"WiredTiger"}; | ||
authorUrl = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change authorUrl
to url = "$STR_CBA_URL";
(compare with how it's done in the other CBA addons)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm making the change now. I just took a quick look over everything else and to me it looks good, but is there anything else that needs changed to be in line with CBA standards?
name = "4"; | ||
value = 4; | ||
}; | ||
class five{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
five{
-> five {
|
||
Example: | ||
(begin example) | ||
[1, "player"] call CBA_fnc_getStringPos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1
in the example call is not an object, group, array, marker or an empty string
Function: CBA_fnc_getPosFromString | ||
|
||
Description: | ||
A function used to get the position of an item when passed as a string. Designed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate the first sentence (short one-line description) from the rest with an empty line, eg
A function used to...
Designed...
Description:
I've made three modules that basically just pass the information to the taskAttack, taskDefend, and taskPatrol functions. I haven't tested it extensively, but it worked in a dedicated environment and should work with a headless client (I have not tested it with headless, though).
How it works:
Set down the needed module, fill out the information in the module, and then sync it to group leaders plus a trigger if needed. It is that simple.
WIP:
I originally wanted it to have the ability to use scripted units, but I quickly found out that it is not the easiest to do with a module since the information can only be passed as a typename number, bool, or string. I still have not completely given up on it yet, but it is not a priority right now.
Other things still need to be done are:
I could use help with some of these things because I'm not familiar with these files and coding guidelines.
This is my first pull request ever so please excuse any rookie mistakes I've made.