From b40915dd129b96c9f32d51b421cbbe6e7e5d3c89 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 12 Jun 2016 23:56:00 +0200 Subject: [PATCH] Cealnup quotes, capitalization, function headers --- addons/gunbag/CfgVehicles.hpp | 36 +++++++++---------- addons/gunbag/README.md | 1 + addons/gunbag/config.cpp | 4 ++- addons/gunbag/functions/fnc_calculateMass.sqf | 5 ++- addons/gunbag/functions/fnc_canInteract.sqf | 5 ++- addons/gunbag/functions/fnc_hasGunbag.sqf | 7 ++-- addons/gunbag/functions/fnc_offGunbag.sqf | 7 ++-- .../functions/fnc_offGunbagCallback.sqf | 7 ++-- addons/gunbag/functions/fnc_status.sqf | 7 ++-- addons/gunbag/functions/fnc_toGunbag.sqf | 7 ++-- .../gunbag/functions/fnc_toGunbagCallback.sqf | 7 ++-- addons/gunbag/stringtable.xml | 8 ++--- 12 files changed, 64 insertions(+), 37 deletions(-) diff --git a/addons/gunbag/CfgVehicles.hpp b/addons/gunbag/CfgVehicles.hpp index bf73d63755..a162eb2323 100644 --- a/addons/gunbag/CfgVehicles.hpp +++ b/addons/gunbag/CfgVehicles.hpp @@ -3,29 +3,29 @@ class CfgVehicles { class CAManBase: Man { class ACE_Actions { class ACE_MainActions { - class GVAR(WeapontoGunbag) { - displayName = CSTRING(toGunbag); + class GVAR(weaponToGunbag) { + displayName = CSTRING(ToGunbag); condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 0}); statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag)); showDisabled = 0; priority = 1; - icon = PATHTOF(ui\gunbag_icon_ca.paa); + icon = QPATHTOF(ui\gunbag_icon_ca.paa); }; - class GVAR(WeaponoffGunbag) { - displayName = CSTRING(offGunbag); + class GVAR(weaponOffGunbag) { + displayName = CSTRING(OffGunbag); condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 1}); statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag)); showDisabled = 0; priority = 1; - icon = PATHTOF(ui\gunbag_icon_ca.paa); + icon = QPATHTOF(ui\gunbag_icon_ca.paa); }; - class GVAR(StatusGunbag) { + class GVAR(statusGunbag) { displayName = CSTRING(Status); condition = QUOTE([_target] call FUNC(hasGunbag)); statement = QUOTE([_target] call FUNC(status)); showDisabled = 0; priority = 2; - icon = PATHTOF(ui\gunbag_icon_ca.paa); + icon = QPATHTOF(ui\gunbag_icon_ca.paa); }; }; }; @@ -33,35 +33,35 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Equipment { class GVAR(actions) { - displayName = CSTRING(displayname); + displayName = CSTRING(Displayname); condition = QUOTE([_player] call FUNC(hasGunbag)); showDisabled = 0; priority = 0.1; - icon = PATHTOF(ui\gunbag_icon_ca.paa); + icon = QPATHTOF(ui\gunbag_icon_ca.paa); - class GVAR(WeapontoGunbag) { - displayName = CSTRING(toGunbag); + class GVAR(weaponToGunbag) { + displayName = CSTRING(ToGunbag); condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 0); statement = QUOTE([ARR_2(_player,_player)] call FUNC(toGunbag)); showDisabled = 0; priority = 1; - icon = PATHTOF(ui\gunbag_icon_ca.paa); + icon = QPATHTOF(ui\gunbag_icon_ca.paa); }; - class GVAR(WeaponoffGunbag) { - displayName = CSTRING(offGunbag); + class GVAR(weaponOffGunbag) { + displayName = CSTRING(OffGunbag); condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 1); statement = QUOTE([ARR_2(_player,_player)] call FUNC(offGunbag)); showDisabled = 0; priority = 1; - icon = PATHTOF(ui\gunbag_icon_ca.paa); + icon = QPATHTOF(ui\gunbag_icon_ca.paa); }; - class GVAR(StatusGunbag) { + class GVAR(statusGunbag) { displayName = CSTRING(Status); condition = QUOTE([_player] call FUNC(hasGunbag)); statement = QUOTE([_player] call FUNC(status)); showDisabled = 0; priority = 2; - icon = PATHTOF(ui\gunbag_icon_ca.paa); + icon = QPATHTOF(ui\gunbag_icon_ca.paa); }; }; }; diff --git a/addons/gunbag/README.md b/addons/gunbag/README.md index 6a7d4f6f6d..734c18f3c5 100644 --- a/addons/gunbag/README.md +++ b/addons/gunbag/README.md @@ -8,3 +8,4 @@ Adds a gunbag for DMRs. The people responsible for merging changes to this component or answering potential questions. +- [commy2](https://github.com/commy2) diff --git a/addons/gunbag/config.cpp b/addons/gunbag/config.cpp index d5f4696bfe..9347810b3e 100644 --- a/addons/gunbag/config.cpp +++ b/addons/gunbag/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction", "ace_movement"}; - author[] = {"Ir0n1E"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ir0n1E"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/gunbag/functions/fnc_calculateMass.sqf b/addons/gunbag/functions/fnc_calculateMass.sqf index 47e8a9151d..e365930d16 100644 --- a/addons/gunbag/functions/fnc_calculateMass.sqf +++ b/addons/gunbag/functions/fnc_calculateMass.sqf @@ -1,6 +1,6 @@ /* * Author: Ir0n1E - * calculate mass of weapon an items + * Calculate mass of weapon an items. * * Arguments: * 0: Weapon @@ -10,6 +10,9 @@ * Return Value: * Mass * + * Example: + * ["weapon", ["item1", "item2"], ["mag1", "mag2"]] call ace_gunbag_fnc_calculateMass + * * Public: No */ #include "script_component.hpp" diff --git a/addons/gunbag/functions/fnc_canInteract.sqf b/addons/gunbag/functions/fnc_canInteract.sqf index 0d098b9f7e..b24533f632 100644 --- a/addons/gunbag/functions/fnc_canInteract.sqf +++ b/addons/gunbag/functions/fnc_canInteract.sqf @@ -1,6 +1,6 @@ /* * Author: Ir0n1E - * Check if client able to interact with gunbag + * Check if client able to interact with gunbag. * * Arguments: * 0: Unit @@ -9,6 +9,9 @@ * Return Value: * -1: can't interact 0: empty gunbag 1: full gunbag * + * Example: + * _canInteract = [player, target] call ace_gunbag_fnc_canInteract + * * Public: No */ #include "script_component.hpp" diff --git a/addons/gunbag/functions/fnc_hasGunbag.sqf b/addons/gunbag/functions/fnc_hasGunbag.sqf index f7cab0435d..ec1d2473a1 100644 --- a/addons/gunbag/functions/fnc_hasGunbag.sqf +++ b/addons/gunbag/functions/fnc_hasGunbag.sqf @@ -1,12 +1,15 @@ /* * Author: Ir0n1E - * switches gunbag full/empty for mass calculation + * Switches gunbag full/empty for mass calculation. * * Arguments: * 0: Unit * * Return Value: - * (BOOL) + * Has Gunbag + * + * Example: + * [player] call ace_gunbag_fnc_hasGunbag * * Public: No */ diff --git a/addons/gunbag/functions/fnc_offGunbag.sqf b/addons/gunbag/functions/fnc_offGunbag.sqf index d11043f065..96d379e58c 100644 --- a/addons/gunbag/functions/fnc_offGunbag.sqf +++ b/addons/gunbag/functions/fnc_offGunbag.sqf @@ -1,13 +1,16 @@ /* * Author: Ir0n1E - * get weapon out of gunbag + * Get weapon out of gunbag. * * Arguments: * 0: Unit * 1: Target * * Return Value: - * Nothing + * None + * + * Example: + * [player, target] call ace_gunbag_fnc_toGunbag * * Public: No */ diff --git a/addons/gunbag/functions/fnc_offGunbagCallback.sqf b/addons/gunbag/functions/fnc_offGunbagCallback.sqf index 2bee565bd1..ecb1ac2d59 100644 --- a/addons/gunbag/functions/fnc_offGunbagCallback.sqf +++ b/addons/gunbag/functions/fnc_offGunbagCallback.sqf @@ -1,13 +1,16 @@ /* * Author: Ir0n1E - * get weapon out of gunbag + * Get weapon out of gunbag. * * Arguments: * 0: Unit * 1: Target * * Return Value: - * Nothing + * None + * + * Example: + * [player, target] call ace_gunbag_fnc_offGunbagCallback * * Public: No */ diff --git a/addons/gunbag/functions/fnc_status.sqf b/addons/gunbag/functions/fnc_status.sqf index 6b6196ba01..33c30ec0e1 100644 --- a/addons/gunbag/functions/fnc_status.sqf +++ b/addons/gunbag/functions/fnc_status.sqf @@ -1,12 +1,15 @@ /* * Author: Ir0n1E - * check gunbag status full/empty + * Check gunbag status full/empty. * * Arguments: * 0: Unit * * Return Value: - * Nothing + * None + * + * Example: + * [player] call ace_gunbag_fnc_status * * Public: No */ diff --git a/addons/gunbag/functions/fnc_toGunbag.sqf b/addons/gunbag/functions/fnc_toGunbag.sqf index 27ca4e2924..3dbbaf1005 100644 --- a/addons/gunbag/functions/fnc_toGunbag.sqf +++ b/addons/gunbag/functions/fnc_toGunbag.sqf @@ -1,13 +1,16 @@ /* * Author: Ir0n1E - * put weapon into gunbag + * Put weapon into gunbag. * * Arguments: * 0: Unit * 1: Target * * Return Value: - * Nothing + * None + * + * Example: + * [player, target] call ace_gunbag_fnc_toGunbag * * Public: No */ diff --git a/addons/gunbag/functions/fnc_toGunbagCallback.sqf b/addons/gunbag/functions/fnc_toGunbagCallback.sqf index c02d29e0e3..c861b56ec4 100644 --- a/addons/gunbag/functions/fnc_toGunbagCallback.sqf +++ b/addons/gunbag/functions/fnc_toGunbagCallback.sqf @@ -1,13 +1,16 @@ /* * Author: Ir0n1E - * put weapon into gunbag + * Put weapon into gunbag. * * Arguments: * 0: Unit * 1: Target * * Return Value: - * Nothing + * None + * + * Example: + * [player, target] call ace_gunbag_fnc_toGunbagCallback * * Public: No */ diff --git a/addons/gunbag/stringtable.xml b/addons/gunbag/stringtable.xml index d779918988..fda8ee3846 100644 --- a/addons/gunbag/stringtable.xml +++ b/addons/gunbag/stringtable.xml @@ -1,6 +1,6 @@ - + Gunbag Waffentasche @@ -9,11 +9,11 @@ Gunbag (Tan) Waffentasche (Tan) - + Put weapon into gunbag Lege Waffe in Waffentasche - + Get weapon out of gunbag Hole Waffe aus Waffentasche @@ -21,7 +21,7 @@ Status Gunbag Status Waffentasche - + Gunbag Empty Waffentasche leer