mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e2ac18a05d
* advanced_ballistics * advanced_fatigue * advanced_throwing * ai * aircraft * arsenal * atragmx * attach * backpacks * ballistics * captives * cargo * chemlights * common * concertina_wire * cookoff * dagr * disarming * disposable * dogtags * dragging * explosives * fastroping * fcs * finger * frag * gestures * gforces * goggles * grenades * gunbag * hearing * hitreactions * huntir * interact_menu * interaction * inventory * kestrel4500 * laser * laserpointer * logistics_uavbattery * logistics_wirecutter * magazinerepack * map * map_gestures * maptools * markers * medical * medical_ai * medical_blood * medical_menu * microdagr * minedetector * missileguidance * missionmodules * mk6mortar * modules * movement * nametags * nightvision * nlaw * optics * optionsmenu * overheating * overpressure * parachute * pylons * quickmount * rangecard * rearm * recoil * refuel * reload * reloadlaunchers * repair * respawn * safemode * sandbag * scopes * slideshow * spectator * spottingscope * switchunits * tacticalladder * tagging * trenches * tripod * ui * vector * vehiclelock * vehicles * viewdistance * weaponselect * weather * winddeflection * yardage450 * zeus * arsenal defines.hpp * optionals * DEBUG_MODE_FULL 1 * DEBUG_MODE_FULL 2 * Manual fixes * Add SQF Validator check for #include after block comment * explosives fnc_openTimerUI * fix uniqueItems
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Garth 'L-H' de Wet
|
|
* Sets screen tint for glasses.
|
|
* Sets screen overlay for glasses. (broken/fixed)
|
|
* Sets dirt/rain overlay for glasses.
|
|
*
|
|
* Arguments:
|
|
* 0: Player <OBJECT>
|
|
* 1: Glasses classname to be applied <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [ace_player, goggles ace_player] call ace_goggles_fnc_applyGlassesEffect
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_player", "_glasses"];
|
|
TRACE_2("applyGlassesEffect",_player,_glasses);
|
|
|
|
// remove old effect
|
|
call FUNC(removeGlassesEffect);
|
|
|
|
if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith {
|
|
TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator)
|
|
};
|
|
|
|
private _config = configFile >> "CfgGlasses" >> _glasses;
|
|
|
|
private _postProcessColour = getArray (_config >> "ACE_Color");
|
|
private _postProcessTintAmount = getNumber (_config >> "ACE_TintAmount");
|
|
|
|
if (_postProcessTintAmount != 0 && {GVAR(UsePP)}) then {
|
|
_postProcessColour set [3, _postProcessTintAmount/100];
|
|
GVAR(PostProcess) ppEffectAdjust[0.9, 1.1, 0.004, _postProcessColour, [0,0,0,1],[0,0,0,0]];
|
|
GVAR(PostProcess) ppEffectCommit 0;
|
|
GVAR(PostProcess) ppEffectEnable true;
|
|
_postProcessColour set [3, _postProcessTintAmount/250];
|
|
GVAR(PostProcess) ppEffectAdjust[0.9, 1.1, 0.004, _postProcessColour, [0,0,0,1],[0,0,0,0]];
|
|
GVAR(PostProcess) ppEffectCommit 30;
|
|
};
|
|
|
|
private _imagePath = getText (_config >> ["ACE_Overlay", "ACE_OverlayCracked"] select GETBROKEN);
|
|
|
|
if (_imagePath != "") then {
|
|
GVAR(GogglesLayer) cutRsc ["RscACE_Goggles", "PLAIN", 1, false];
|
|
(GLASSDISPLAY displayCtrl 10650) ctrlSetText _imagePath;
|
|
};
|
|
|
|
if (GVAR(effects) == 2) then {
|
|
if (GETDIRT) then {
|
|
call FUNC(applyDirtEffect);
|
|
};
|
|
|
|
if (GETDUSTT(DACTIVE)) then {
|
|
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
|
|
call FUNC(applyDustEffect);
|
|
};
|
|
};
|
|
|
|
GVAR(EffectsActive) = true;
|