Skip to content

Commit

Permalink
read new 'url' entry
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Jun 1, 2016
1 parent af6ce34 commit 4ec1484
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
18 changes: 15 additions & 3 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 = ("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 {};

Expand All @@ -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 ["<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
8 changes: 4 additions & 4 deletions addons/xeh/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4ec1484

Please sign in to comment.