Skip to content
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

switch help framework to 'authorS', remove all author[] #345

Merged
merged 4 commits into from
Jun 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addons/ai/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/arrays/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/diagnostic/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/events/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/hashes/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/help/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
35 changes: 25 additions & 10 deletions addons/help/fnc_setCreditsLine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ 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'} &&
{getText (_x >> 'author') != ''}
" configClasses _config) call (uiNamespace getVariable "BIS_fnc_selectRandom"); //bwc for 1.54 (Linux build)

if (isNil "_entry") exitWith {};

Expand All @@ -50,24 +54,35 @@ 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 = "";

if (isText (_entry >> "authorUrl")) then {
_url = getText (_entry >> "authorUrl");
if (isText (_entry >> "url")) then {
_url = getText (_entry >> "url");

if (!CBA_MonochromeCredits) then {
_url = format ["<t color='#566D7E'>%1</t>", _url];
};
} else {
if (isText (_entry >> "authorUrl")) then {
_url = getText (_entry >> "authorUrl");

if (!CBA_MonochromeCredits) then {
_url = format ["<t color='#566D7E'>%1</t>", _url];
};
};
};

// version if any
Expand Down
3 changes: 2 additions & 1 deletion addons/jr/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion addons/keybinding/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/linux/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
9 changes: 9 additions & 0 deletions addons/main/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project name="CBA_A3">
<Package name="Main">
<Key ID="STR_CBA_Author">
<English>CBA Team</English>
<German>CBA-Team</German>
</Key>
</Package>
</Project>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 spaces indentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as other .xml files.

3 changes: 2 additions & 1 deletion addons/main_a3/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/network/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/strings/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/ui/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/vectors/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion addons/versioning/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
11 changes: 6 additions & 5 deletions addons/xeh/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 { author = ""; };
class Extended_EventHandlers: ADDON { author = ""; };
class CBA_Extended_EventHandlers: ADDON { author = ""; };
class cba_ee: ADDON { author = ""; };
};

#include "CfgEventHandlers.hpp"
Expand Down