From f94f7045ef45ad949647177b1999c23f70e3fb00 Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 31 May 2016 14:12:39 +0200 Subject: [PATCH 1/4] switch help framework to 'authorS', remove all author[] --- addons/ai/config.cpp | 3 ++- addons/arrays/config.cpp | 3 ++- addons/common/config.cpp | 3 ++- addons/diagnostic/config.cpp | 3 ++- addons/events/config.cpp | 3 ++- addons/hashes/config.cpp | 3 ++- addons/help/config.cpp | 3 ++- addons/help/fnc_setCreditsLine.sqf | 19 +++++++++++-------- addons/jr/config.cpp | 3 ++- addons/keybinding/config.cpp | 3 ++- addons/linux/config.cpp | 3 ++- addons/main/config.cpp | 3 ++- addons/main/stringtable.xml | 9 +++++++++ addons/main_a3/config.cpp | 3 ++- addons/network/config.cpp | 3 ++- addons/strings/config.cpp | 3 ++- addons/ui/config.cpp | 3 ++- addons/vectors/config.cpp | 3 ++- addons/versioning/config.cpp | 3 ++- addons/xeh/config.cpp | 11 ++++++----- 20 files changed, 60 insertions(+), 30 deletions(-) create mode 100644 addons/main/stringtable.xml diff --git a/addons/ai/config.cpp b/addons/ai/config.cpp index 9f07b73e4..1e0ae33b1 100644 --- a/addons/ai/config.cpp +++ b/addons/ai/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common" }; version = VERSION; - author[] = {"Rommel"}; + author = "$STR_CBA_Author"; + authors[] = {"Rommel"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/arrays/config.cpp b/addons/arrays/config.cpp index 160284cd9..663855417 100644 --- a/addons/arrays/config.cpp +++ b/addons/arrays/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common" }; version = VERSION; - author[] = {"Spooner"}; + author = "$STR_CBA_Author"; + authors[] = {"Spooner"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 06d2a6479..330e61c01 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -7,7 +7,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"A3_BaseConfig_F"}; version = VERSION; - author[] = {"Spooner","Sickboy","Rocko"}; + author = "$STR_CBA_Author"; + authors[] = {"Spooner","Sickboy","Rocko"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/diagnostic/config.cpp b/addons/diagnostic/config.cpp index f669496a1..78def0e71 100644 --- a/addons/diagnostic/config.cpp +++ b/addons/diagnostic/config.cpp @@ -6,7 +6,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"CBA_common","CBA_events","3DEN"}; version = VERSION; - author[] = {"Spooner","Sickboy"}; + author = "$STR_CBA_Author"; + authors[] = {"Spooner","Sickboy"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/events/config.cpp b/addons/events/config.cpp index 6fda4995b..a0b0fd37e 100644 --- a/addons/events/config.cpp +++ b/addons/events/config.cpp @@ -6,7 +6,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"CBA_common"}; version = VERSION; - author[] = {"Spooner","Sickboy","Xeno","commy2"}; + author = "$STR_CBA_Author"; + authors[] = {"Spooner","Sickboy","Xeno","commy2"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/hashes/config.cpp b/addons/hashes/config.cpp index 160284cd9..663855417 100644 --- a/addons/hashes/config.cpp +++ b/addons/hashes/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common" }; version = VERSION; - author[] = {"Spooner"}; + author = "$STR_CBA_Author"; + authors[] = {"Spooner"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/help/config.cpp b/addons/help/config.cpp index d4b46e5c3..bfce6792a 100644 --- a/addons/help/config.cpp +++ b/addons/help/config.cpp @@ -7,7 +7,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"cba_common","cba_hashes","cba_keybinding","A3_UI_F"}; version = VERSION; - author[] = {"alef","Rocko","Sickboy"}; + author = "$STR_CBA_Author"; + authors[] = {"alef","Rocko","Sickboy"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/help/fnc_setCreditsLine.sqf b/addons/help/fnc_setCreditsLine.sqf index d326d8886..eac2e6ad1 100644 --- a/addons/help/fnc_setCreditsLine.sqf +++ b/addons/help/fnc_setCreditsLine.sqf @@ -38,7 +38,7 @@ if (CBA_DisableCredits) exitWith {}; // find addon with author private _config = configFile >> "CfgPatches"; -private _entry = ("isArray (_x >> 'author') && {!(getArray (_x >> 'author') isEqualTo [])}" configClasses _config) call (uiNamespace getVariable "BIS_fnc_selectRandom"); //bwc for 1.54 (Linux build) +private _entry = ("isText (_x >> 'author') && {getText (_x >> 'author') != localize 'STR_A3_Bohemia_Interactive'}" configClasses _config) call (uiNamespace getVariable "BIS_fnc_selectRandom"); //bwc for 1.54 (Linux build) if (isNil "_entry") exitWith {}; @@ -50,14 +50,17 @@ if (!CBA_MonochromeCredits) then { }; // author(s) name -private _authors = getArray (_entry >> "author"); -private _author = _authors deleteAt 0; +private _author = getText (_entry >> "author"); -{ - if (_x isEqualType "") then { - _author = format ["%1, %2", _author, _x]; - }; -} forEach _authors; +if (isArray (_entry >> "authors")) then { + private _authors = getArray (_entry >> "authors"); + + { + if (_x isEqualType "") then { + _author = format ["%1, %2", _author, _x]; + }; + } forEach _authors; +}; // url if any private _url = ""; diff --git a/addons/jr/config.cpp b/addons/jr/config.cpp index 739be6477..181556fbc 100644 --- a/addons/jr/config.cpp +++ b/addons/jr/config.cpp @@ -16,7 +16,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"A3_Weapons_F","A3_Weapons_F_Mark","CBA_jr_prep"}; version = VERSION; - author[] = {"Robalo"}; + author = "$STR_CBA_Author"; + authors[] = {"Robalo"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; class asdg_jointrails { //compat diff --git a/addons/keybinding/config.cpp b/addons/keybinding/config.cpp index fde298d58..2cea900d1 100644 --- a/addons/keybinding/config.cpp +++ b/addons/keybinding/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common", "A3_UI_F" }; version = VERSION; - author[] = {"Taosenai"}; + author = "$STR_CBA_Author"; + authors[] = {"Taosenai"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/linux/config.cpp b/addons/linux/config.cpp index 748f1292a..e57ffc480 100644 --- a/addons/linux/config.cpp +++ b/addons/linux/config.cpp @@ -7,7 +7,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"cba_common","cba_events","cba_hashes","cba_jr","cba_xeh"}; version = VERSION; - author[] = {"commy2"}; + author = "$STR_CBA_Author"; + authors[] = {"commy2"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/main/config.cpp b/addons/main/config.cpp index 51d583c61..ff7c5a638 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -10,7 +10,8 @@ class CfgPatches { requiredAddons[] = {"cba_common", "cba_arrays", "cba_hashes", "cba_strings", "cba_events", "cba_diagnostic", "cba_network", "cba_ai", "cba_vectors", "cba_ui", "cba_ui_helper", "cba_help"}; versionDesc = "C.B.A."; VERSION_CONFIG; - author[] = {"CBA Team"}; + author = "$STR_CBA_Author"; + authors[] = {}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml new file mode 100644 index 000000000..546ee93d1 --- /dev/null +++ b/addons/main/stringtable.xml @@ -0,0 +1,9 @@ + + + + + CBA-Team + CBA-Team + + + diff --git a/addons/main_a3/config.cpp b/addons/main_a3/config.cpp index 3a283abd4..c176aa49f 100644 --- a/addons/main_a3/config.cpp +++ b/addons/main_a3/config.cpp @@ -9,7 +9,8 @@ class CfgPatches { "CBA_Main" }; VERSION_CONFIG; - author[] = {"CBA Team"}; + author = "$STR_CBA_Author"; + authors[] = {}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/network/config.cpp b/addons/network/config.cpp index c3273e26a..56ed541d4 100644 --- a/addons/network/config.cpp +++ b/addons/network/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common", "CBA_events" }; version = VERSION; - author[] = {"Sickboy"}; + author = "$STR_CBA_Author"; + authors[] = {"Sickboy"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/strings/config.cpp b/addons/strings/config.cpp index 8f9b91a00..b77674d83 100644 --- a/addons/strings/config.cpp +++ b/addons/strings/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common" }; version = VERSION; - author[] = {"Spooner", "Kronzky"}; + author = "$STR_CBA_Author"; + authors[] = {"Spooner", "Kronzky"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/ui/config.cpp b/addons/ui/config.cpp index 1c96783b1..49ce9e31d 100644 --- a/addons/ui/config.cpp +++ b/addons/ui/config.cpp @@ -6,7 +6,8 @@ class CfgPatches { requiredVersion = 1; requiredAddons[] = { "CBA_common", "CBA_arrays" }; version = VERSION; - author[] = {"Dr Eyeball"}; + author = "$STR_CBA_Author"; + authors[] = {"Dr Eyeball"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/vectors/config.cpp b/addons/vectors/config.cpp index ec597f5af..59b8cd74a 100644 --- a/addons/vectors/config.cpp +++ b/addons/vectors/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common" }; version = VERSION; - author[] = {"Vigilante"}; + author = "$STR_CBA_Author"; + authors[] = {"Vigilante"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/versioning/config.cpp b/addons/versioning/config.cpp index 3a7f35056..3d24d360d 100644 --- a/addons/versioning/config.cpp +++ b/addons/versioning/config.cpp @@ -7,7 +7,8 @@ class CfgPatches requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "CBA_common", "CBA_strings", "CBA_hashes", "CBA_diagnostic", "CBA_events", "CBA_network" }; version = VERSION; - author[] = {"Sickboy"}; + author = "$STR_CBA_Author"; + authors[] = {"Sickboy"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; }; diff --git a/addons/xeh/config.cpp b/addons/xeh/config.cpp index 3666f6722..484b0a20f 100644 --- a/addons/xeh/config.cpp +++ b/addons/xeh/config.cpp @@ -9,15 +9,16 @@ class CfgPatches { version = "4.0.0"; // Due to older mod versions requiring > 3,3,3 etc versionStr = "4.0.0"; versionAr[] = {4,0,0}; - author[] = {"CBA Team","Solus","Killswitch","commy2"}; + author = "$STR_CBA_Author"; + authors[] = {"Solus","Killswitch","commy2"}; authorUrl = "https://github.com/CBATeam/CBA_A3"; }; // Backwards compatibility - class cba_xeh_a3: ADDON {author[] = {};}; - class Extended_EventHandlers: ADDON {author[] = {};}; - class CBA_Extended_EventHandlers: ADDON {author[] = {};}; - class cba_ee: ADDON {author[] = {};}; + class cba_xeh_a3: ADDON {authors[] = {};}; + class Extended_EventHandlers: ADDON {authors[] = {};}; + class CBA_Extended_EventHandlers: ADDON {authors[] = {};}; + class cba_ee: ADDON {authors[] = {};}; }; #include "CfgEventHandlers.hpp" From 2a7a974601988597ff1d5da1ec143e9bda65767b Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 31 May 2016 14:43:17 +0200 Subject: [PATCH 2/4] 4 spaces indentation --- addons/main/stringtable.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 546ee93d1..3582c776f 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -1,9 +1,9 @@ - - - CBA-Team - CBA-Team - - + + + CBA-Team + CBA-Team + + From af6ce349ba7a768edb9fb6512823d1646457dcb7 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 1 Jun 2016 11:30:51 +0200 Subject: [PATCH 3/4] CBA Team remove hyphen --- addons/main/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 3582c776f..95968224f 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -2,7 +2,7 @@ - CBA-Team + CBA Team CBA-Team From 4ec148405f0d52604d88528f5eea0b4e01b690a7 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 1 Jun 2016 12:31:00 +0200 Subject: [PATCH 4/4] read new 'url' entry --- addons/help/fnc_setCreditsLine.sqf | 18 +++++++++++++++--- addons/xeh/config.cpp | 8 ++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/addons/help/fnc_setCreditsLine.sqf b/addons/help/fnc_setCreditsLine.sqf index eac2e6ad1..3b3c39cf1 100644 --- a/addons/help/fnc_setCreditsLine.sqf +++ b/addons/help/fnc_setCreditsLine.sqf @@ -38,7 +38,11 @@ if (CBA_DisableCredits) exitWith {}; // find addon with author private _config = configFile >> "CfgPatches"; -private _entry = ("isText (_x >> 'author') && {getText (_x >> 'author') != localize 'STR_A3_Bohemia_Interactive'}" configClasses _config) call (uiNamespace getVariable "BIS_fnc_selectRandom"); //bwc for 1.54 (Linux build) +private _entry = (" + isText (_x >> 'author') && + {getText (_x >> 'author') != localize 'STR_A3_Bohemia_Interactive'} && + {getText (_x >> 'author') != ''} +" configClasses _config) call (uiNamespace getVariable "BIS_fnc_selectRandom"); //bwc for 1.54 (Linux build) if (isNil "_entry") exitWith {}; @@ -65,12 +69,20 @@ if (isArray (_entry >> "authors")) then { // url if any private _url = ""; -if (isText (_entry >> "authorUrl")) then { - _url = getText (_entry >> "authorUrl"); +if (isText (_entry >> "url")) then { + _url = getText (_entry >> "url"); if (!CBA_MonochromeCredits) then { _url = format ["%1", _url]; }; +} else { + if (isText (_entry >> "authorUrl")) then { + _url = getText (_entry >> "authorUrl"); + + if (!CBA_MonochromeCredits) then { + _url = format ["%1", _url]; + }; + }; }; // version if any diff --git a/addons/xeh/config.cpp b/addons/xeh/config.cpp index 484b0a20f..f4e804cdf 100644 --- a/addons/xeh/config.cpp +++ b/addons/xeh/config.cpp @@ -15,10 +15,10 @@ class CfgPatches { }; // Backwards compatibility - class cba_xeh_a3: ADDON {authors[] = {};}; - class Extended_EventHandlers: ADDON {authors[] = {};}; - class CBA_Extended_EventHandlers: ADDON {authors[] = {};}; - class cba_ee: ADDON {authors[] = {};}; + class cba_xeh_a3: ADDON { author = ""; }; + class Extended_EventHandlers: ADDON { author = ""; }; + class CBA_Extended_EventHandlers: ADDON { author = ""; }; + class cba_ee: ADDON { author = ""; }; }; #include "CfgEventHandlers.hpp"