mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add Wipe glasses self interaction (#7307)
This commit is contained in:
parent
654feca3a1
commit
7f62067a7b
@ -148,6 +148,7 @@ Tonic
|
||||
Tourorist <tourorist@gmail.com>
|
||||
Tuupertunut
|
||||
Valentin Torikian <valentin.torikian@gmail.com>
|
||||
veteran29
|
||||
voiper
|
||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Winter <simon@agius-muscat.net>
|
||||
|
14
addons/goggles/CfgVehicles.hpp
Normal file
14
addons/goggles/CfgVehicles.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(wipeGlasses) {
|
||||
displayName = CSTRING(WipeGlasses);
|
||||
condition = QUOTE(GVAR(showClearGlasses) && {call FUNC(canWipeGlasses)});
|
||||
statement = QUOTE(call FUNC(clearGlasses));
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -17,6 +17,7 @@ PREP(isGogglesVisible);
|
||||
PREP(isInRotorWash);
|
||||
|
||||
// general
|
||||
PREP(canWipeGlasses);
|
||||
PREP(clearGlasses);
|
||||
PREP(getExplosionIndex);
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ACE3 Common", QGVAR(wipeGlasses), localize LSTRING(WipeGlasses), {
|
||||
if (GVAR(effects) != 2) exitWith {false}; //Can only wipe if full effects setting is set
|
||||
if (!GETVAR(ace_player,ACE_isUnconscious,false)) exitWith {
|
||||
// Conditions: specific
|
||||
if !(call FUNC(canWipeGlasses)) exitWith {false};
|
||||
|
||||
call FUNC(clearGlasses);
|
||||
|
||||
true
|
||||
};
|
||||
false
|
||||
},
|
||||
{false},
|
||||
[20, [true, true, false]], false] call CBA_fnc_addKeybind;
|
||||
|
@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
#include "initSettings.sqf"
|
||||
|
||||
ADDON = true;
|
||||
|
@ -16,6 +16,7 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
#define COMBAT_GOGGLES ACE_Overlay = QPATHTOF(textures\HUD\CombatGoggles.paa); \
|
||||
ACE_OverlayCracked = QPATHTOF(textures\HUD\CombatGogglesCracked.paa); \
|
||||
|
18
addons/goggles/functions/fnc_canWipeGlasses.sqf
Normal file
18
addons/goggles/functions/fnc_canWipeGlasses.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: veteran29
|
||||
* Checks if player can wipe goggles.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Can wipe goggles <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_goggles_fnc_canWipeGlasses
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
GVAR(effects) == 2 && {!GETVAR(ACE_player,ACE_isUnconscious,false)} // return
|
8
addons/goggles/initSettings.sqf
Normal file
8
addons/goggles/initSettings.sqf
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
QGVAR(showClearGlasses),
|
||||
"CHECKBOX",
|
||||
[LSTRING(SettingShowClearGlasses), LSTRING(SettingShowClearGlasses)],
|
||||
localize LSTRING(SettingsName),
|
||||
false, // default value
|
||||
0 // isGlobal
|
||||
] call CBA_fnc_addSetting;
|
@ -14,6 +14,19 @@
|
||||
<Portuguese>Óculos</Portuguese>
|
||||
<French>Lunettes</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Goggles_SettingsName">
|
||||
<English>ACE Goggles</English>
|
||||
<German>ACE Schutzbrille</German>
|
||||
<Italian>ACE Occhiali</Italian>
|
||||
<Chinese>ACE 護目鏡</Chinese>
|
||||
<Chinesesimp>ACE 护目镜</Chinesesimp>
|
||||
<Japanese>ACE ゴーグル</Japanese>
|
||||
<Korean>ACE 고글</Korean>
|
||||
<Polish>ACE Gogle</Polish>
|
||||
<Russian>ACE Очки</Russian>
|
||||
<Portuguese>ACE Óculos</Portuguese>
|
||||
<French>ACE Lunettes</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Goggles_ShowInThirdPerson">
|
||||
<English>Show Goggle Effects in Third Person</English>
|
||||
<German>Brilleneffekt in dritter Person anzeigen</German>
|
||||
@ -85,5 +98,9 @@
|
||||
<Chinese>染色 + 影響</Chinese>
|
||||
<Portuguese>Cor + Efeitos</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Goggles_SettingShowClearGlasses">
|
||||
<English>Show Wipe Goggles self interaction</English>
|
||||
<Polish>Pokaż interakcję Wyczyść Gogle</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user