-
Notifications
You must be signed in to change notification settings - Fork 116
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
sys_core cleanup - document, cleanup #171
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,5 +42,3 @@ PREP(utilityFunction); | |
PREP(disableRevealAI); | ||
PREP(enableRevealAI); | ||
PREP(onRevealUnit); | ||
|
||
PREP(formatNumber); |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
/* | ||
* Author: ACRE2Team | ||
* SHORT DESCRIPTION | ||
* Babel add a new language. | ||
* | ||
* Arguments: | ||
* 0: ARGUMENT ONE <TYPE> | ||
* 1: ARGUMENT TWO <TYPE> | ||
* 0: Language key name <STRING> | ||
* 1: Language display name <STRING> | ||
* | ||
* Return Value: | ||
* RETURN VALUE <TYPE> | ||
* None | ||
* | ||
* Example: | ||
* [ARGUMENTS] call acre_COMPONENT_fnc_FUNCTIONNAME | ||
* ["en", "English"] call acre_sys_core_fnc_addLanguageType | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
params ["_languageKey", "_languageName"]; | ||
|
||
PUSH(GVAR(languages), [ARR_2(_languageKey,_languageName)]); | ||
GVAR(languages) pushBack [_languageKey, _languageName]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
/* | ||
* Author: ACRE2Team | ||
* SHORT DESCRIPTION | ||
* This function is used to make calls in acre.dll | ||
* | ||
* Arguments: | ||
* 0: ARGUMENT ONE <TYPE> | ||
* 1: ARGUMENT TWO <TYPE> | ||
* 0: Command <STRING> | ||
* 1: Parameters <ANY> | ||
* 2: Threaded call if so uses the following arguments to handle the return <BOOLEAN> (optional) | ||
* 3: Callback code <CODE> (optional) | ||
* 4: Return arguments <ANY> (optional) | ||
* | ||
* Return Value: | ||
* RETURN VALUE <TYPE> | ||
* Return from call extension <ANY> | ||
* | ||
* Example: | ||
* [ARGUMENTS] call acre_COMPONENT_fnc_FUNCTIONNAME | ||
* ["init",[]] call acre_sys_core_fnc_callExt | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
#define FORMAT_NUMBER(num) (num call FUNC(formatNumber)) | ||
|
||
params ["_command", "_params", ["_threaded", false], ["_callBack",{}], ["_callBackArgs",[]]]; | ||
|
||
private _paramsString = ""; | ||
|
@@ -29,25 +30,22 @@ if (IS_ARRAY(_params)) then { | |
if (IS_ARRAY(_element)) then { | ||
{ | ||
if (!IS_STRING(_x)) then { | ||
// Convert boolean to number. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No final point. |
||
if (IS_BOOL(_x)) then { | ||
if (_x) then { | ||
_x = 1; | ||
} else { | ||
_x = 0; | ||
}; | ||
}; | ||
// if (IS_NUMBER(_x)) then { | ||
// _x = FORMAT_NUMBER(_x); | ||
// _paramsString = _paramsString + _x + ","; | ||
// } else { | ||
_paramsString = _paramsString + (str _x) + ","; | ||
// }; | ||
_paramsString = _paramsString + (str _x) + ","; // Convert number to string | ||
} else { | ||
_paramsString = _paramsString + _x + ","; | ||
}; | ||
} forEach _element; | ||
} else { | ||
if (!IS_STRING(_element)) then { | ||
// Convert boolean to number. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No final point. |
||
if (IS_BOOL(_element)) then { | ||
if (_element) then { | ||
_element = 1; | ||
|
@@ -56,12 +54,7 @@ if (IS_ARRAY(_params)) then { | |
}; | ||
}; | ||
|
||
// if (IS_NUMBER(_element)) then { | ||
// _element = FORMAT_NUMBER(_element); | ||
// _paramsString = _paramsString + _element + ","; | ||
// } else { | ||
_paramsString = _paramsString + (str _element) + ","; | ||
// }; | ||
_paramsString = _paramsString + (str _element) + ","; // Convert number to string | ||
} else { | ||
_paramsString = _paramsString + _element + ","; | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
/* | ||
* Author: ACRE2Team | ||
* SHORT DESCRIPTION | ||
* This function is used to cycle the language that the local player is speaking. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* | ||
* Arguments: | ||
* 0: ARGUMENT ONE <TYPE> | ||
* 1: ARGUMENT TWO <TYPE> | ||
* None | ||
* | ||
* Return Value: | ||
* RETURN VALUE <TYPE> | ||
* false | ||
* | ||
* Example: | ||
* [ARGUMENTS] call acre_COMPONENT_fnc_FUNCTIONNAME | ||
* [] call acre_sys_core_fnc_cycleLanguage | ||
* | ||
* Public: No | ||
*/ | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
/* | ||
* Author: ACRE2Team | ||
* SHORT DESCRIPTION | ||
* This function exists to setup the process for sending our object and player ID to other clients to associate with our teamspeak ID. | ||
* | ||
* Arguments: | ||
* 0: ARGUMENT ONE <TYPE> | ||
* 1: ARGUMENT TWO <TYPE> | ||
* None | ||
* | ||
* Return Value: | ||
* RETURN VALUE <TYPE> | ||
* Handled <Boolean> | ||
* | ||
* Example: | ||
* [ARGUMENTS] call acre_COMPONENT_fnc_FUNCTIONNAME | ||
* [] call acre_sys_core_fnc_getClientIdLoop | ||
* | ||
* Public: No | ||
*/ | ||
|
@@ -22,5 +21,8 @@ DFUNC(getClientIdLoopFunc) = { | |
["getClientID", [_netId, (getPlayerUID player)]] call EFUNC(sys_rpc,callRemoteProcedure); | ||
}; | ||
}; | ||
ADDPFH(DFUNC(getClientIdLoopFunc), 3, []); | ||
ADDPFH(FUNC(getClientIdLoopFunc), 3, []); // Send on regular interval for JIP etc. | ||
|
||
["unit", {[] call FUNC(getClientIdLoopFunc);}] call CBA_fnc_addPlayerEventHandler; // Use EH for immediate sending on unit transfer. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No final point. |
||
|
||
true |
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.
Missing final point.