Add dogtags $, Improve function headers

This commit is contained in:
jonpas 2016-08-09 01:15:59 +02:00
parent 37330a35b7
commit 51450b86fb
18 changed files with 64 additions and 20 deletions

View File

@ -0,0 +1 @@
z\ace\addons\dogtags

View File

@ -4,8 +4,8 @@ class RscStructuredText;
class RscTitles {
class GVAR(singleTag) {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),nil)]);
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),nil)]);
movingEnable = false;
duration = 5;
fadeIn = 0.2;
@ -49,8 +49,8 @@ class RscTitles {
};
class GVAR(doubleTag): GVAR(singleTag) {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),nil)]);
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),nil)]);
class controls: controls {
class background: background {

View File

@ -9,3 +9,4 @@ Adds options to check and take dog tag from dead or unconscious units
The people responsible for merging changes to this component or answering potential questions.
- [SzwedzikPL](https://github.com/SzwedzikPL)
- [esteldunedain](https://github.com/esteldunedain)

View File

@ -2,12 +2,14 @@
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"SzwedzikPL"};
authorUrl = "https://github.com/SzwedzikPL/";
author = ECSTRING(common,ACETeam);
authors[] = {"SzwedzikPL"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -9,6 +9,9 @@
* Return Value:
* Children actions <ARRAY>
*
* Example:
* _childrenActions = [unit, player] call ace_dogtags_fnc_addDogtagActions
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,6 +1,6 @@
/*
* Author: SzwedzikPL
* Adds dogtag item to unit (triggered by server)
* Adds dogtag item to unit (triggered by server).
*
* Arguments:
* 0: Item class <STRING>
@ -9,6 +9,9 @@
* Return Value:
* None
*
* Example:
* ["itemClass", ["name", "610-27-5955", "A POS"]] call ace_dogtags_fnc_addDogtagItem
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -8,6 +8,9 @@
* Return Value:
* A random blood type <STRING>
*
* Example:
* _bloodType = ["name"] call ace_dogtags_fnc_bloodType
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -9,6 +9,9 @@
* Return Value:
* True if dogtag can be checked <BOOL>
*
* Example:
* _canCheck = [player, unit] call ace_dogtags_fnc_canCheckDogtag
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -9,6 +9,9 @@
* Return Value:
* True if dogtag can be taken <BOOL>
*
* Example:
* _canTake = [player, unit] call ace_dogtags_fnc_canTakeDogtag
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,6 +1,6 @@
/*
* Author: SzwedzikPL
* Checks unit dogtag
* Checks unit dogtag.
*
* Arguments:
* 0: Player <OBJECT>
@ -9,6 +9,9 @@
* Return Value:
* None
*
* Example:
* [player, unit] call ace_dogtags_fnc_checkDogtag
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,6 +1,6 @@
/*
* Author: SzwedzikPL
* Check dogtag self menu action
* Check dogtag self menu action.
*
* Arguments:
* 0: Player <OBJECT>
@ -8,7 +8,10 @@
* 2: Item class <STRING>
*
* Return Value:
* Mone
* None
*
* Example:
* [player, unit, "itemClass"] call ace_dogtags_fnc_checkDogtagItem
*
* Public: No
*/

View File

@ -1,12 +1,18 @@
/*
* Author: esteldunedain
* Get unit dogtag data
* Get unit dogtag data.
*
* Arguments:
* 0: Target <OBJECT>
*
* Return Value:
* None
* Dogtag Data <ARRAY>
* 0: Name <STRING>
* 1: SSN <STRING>
* 2: Blood Type <STRING>
*
* Example:
* _dogtagData = [unit, player] call ace_dogtags_fnc_getDogtagData
*
* Public: No
*/

View File

@ -1,6 +1,6 @@
/*
* Author: SzwedzikPL
* Server: creates new dogtag item and send it to client
* Server: creates new dogtag item and send it to client.
*
* Arguments:
* 0: Player <OBJECT>
@ -9,6 +9,9 @@
* Return Value:
* None
*
* Example:
* [player, unit] call ace_dogtags_fnc_getDogtagItem
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,6 +1,6 @@
/*
* Author: SzwedzikPL
* Server: returns to client data on given dogtag
* Server: returns to client data on given dogtag.
*
* Arguments:
* 0: Player <OBJECT>
@ -9,11 +9,14 @@
* Return Value:
* None
*
* Example:
* [player, unit] call ace_dogtags_fnc_sendDogtagData
*
* Public: No
*/
#include "script_component.hpp"
if(!isServer) exitWith {};
if (!isServer) exitWith {};
params ["_target", "_item"];
TRACE_2("sendDogtagData",_target,_item);

View File

@ -1,14 +1,17 @@
/*
* Author: SzwedzikPL
* Shows dogtag
* Shows dogtag.
*
* Arguments:
* 0: Dog tag data <ARRAY>
* 0: Dogtag data <ARRAY>
* 1: Display as double tag <BOOLEAN>
*
* Return Value:
* None
*
* Example:
* [["name", "610-27-5955", "A POS"], true] call ace_dogtags_fnc_showDogtag
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -9,7 +9,7 @@
* A random three/two/four format social security number <STRING>
*
* Example:
* ["AAA"] call ace_dogtags_fnc_ssn
* _ssn = ["AAA"] call ace_dogtags_fnc_ssn
*
* Public: No
*/

View File

@ -1,7 +1,7 @@
/*
* Author: SzwedzikPL
* If dogtag is not already taken triggers event on server
* If dogtag already taken displays info about it
* If dogtag is not already taken triggers event on server.
* If dogtag already taken displays info about it.
*
* Arguments:
* 0: Player <OBJECT>
@ -10,6 +10,9 @@
* Return Value:
* None
*
* Example:
* [player, unit] call ace_dogtags_fnc_takeDogtag
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,4 +1,5 @@
#define COMPONENT dogtags
#define COMPONENT_BEAUTIFIED Dogtags
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL