From 278f0ab889cb3e5a19f80d67f97f5478ae1213f4 Mon Sep 17 00:00:00 2001 From: Glowbal <thomasskooi@live.nl> Date: Tue, 24 Feb 2015 18:02:41 +0100 Subject: [PATCH] Fixed indentation Added check for AI units --- .../functions/fnc_displayTextPicture.sqf | 27 ++++++++++--------- .../functions/fnc_displayTextStructured.sqf | 23 ++++++++-------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/addons/common/functions/fnc_displayTextPicture.sqf b/addons/common/functions/fnc_displayTextPicture.sqf index 6216adb20e..9885524db7 100644 --- a/addons/common/functions/fnc_displayTextPicture.sqf +++ b/addons/common/functions/fnc_displayTextPicture.sqf @@ -22,24 +22,25 @@ _imageColor resize 3; _target = if (count _this > 3) then {_this select 3} else {ACE_player}; if (!local _target && {_target != ACE_player}) exitwith { - [_this, QUOTE(DFUNC(displayTextPicture)), _target] call FUNC(execRemoteFnc); + [_this, QUOTE(DFUNC(displayTextPicture)), _target] call FUNC(execRemoteFnc); }; +if (_target != ACE_player) exitWith {}; if (typeName _text != "TEXT") then { - if (typeName _text == "ARRAY") then { - if (count _text > 0) then { - { - if (typeName _x == "STRING" && {isLocalized _x}) then { - _text set [_foreachIndex, localize _x]; - }; - }foreach _text; - _text = format _text; - }; - }; - if (typeName _text == "STRING" && {isLocalized _text}) then { + if (typeName _text == "ARRAY") then { + if (count _text > 0) then { + { + if (typeName _x == "STRING" && {isLocalized _x}) then { + _text set [_foreachIndex, localize _x]; + }; + }foreach _text; + _text = format _text; + }; + }; + if (typeName _text == "STRING" && {isLocalized _text}) then { _text = localize _text; }; - _text = parseText format ["<t align='center'>%1</t>", _text]; + _text = parseText format ["<t align='center'>%1</t>", _text]; }; _text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text]; [_text, 2] call FUNC(displayTextStructured); diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index be3e4b585b..90f066057b 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -19,20 +19,21 @@ _size = if (count _this > 1) then {_this select 1} else {0.1;}; _target = if (count _this > 2) then {_this select 2} else {ACE_player}; if (!local _target && {_target != ACE_player}) exitwith { - [_this, QUOTE(DFUNC(displayTextStructured)), _target] call FUNC(execRemoteFnc); + [_this, QUOTE(DFUNC(displayTextStructured)), _target] call FUNC(execRemoteFnc); }; +if (_target != ACE_player) exitWith {}; if (typeName _text != "TEXT") then { - if (typeName _text == "ARRAY") then { - if (count _text > 0) then { - { - if (typeName _x == "STRING" && {isLocalized _x}) then { - _text set [_foreachIndex, localize _x]; - }; - }foreach _text; - _text = format _text; - }; - }; + if (typeName _text == "ARRAY") then { + if (count _text > 0) then { + { + if (typeName _x == "STRING" && {isLocalized _x}) then { + _text set [_foreachIndex, localize _x]; + }; + }foreach _text; + _text = format _text; + }; + }; if (typeName _text == "STRING" && {isLocalized _text}) then { _text = localize _text; };