mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Goggles Code refactoring initial commit
This commit is contained in:
parent
6e24d2868c
commit
d25d79c485
@ -1,4 +1,11 @@
|
|||||||
|
|
||||||
class ACE_Settings {
|
class ACE_Settings {
|
||||||
|
/*class GVAR(enable) { // @todo
|
||||||
|
value = 0;
|
||||||
|
typeName = "BOOL";
|
||||||
|
isClientSettable = 1;
|
||||||
|
displayName = CSTRING(enable);
|
||||||
|
};*/
|
||||||
class GVAR(showInThirdPerson) {
|
class GVAR(showInThirdPerson) {
|
||||||
value = 0;
|
value = 0;
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
|
@ -1,10 +1,36 @@
|
|||||||
|
|
||||||
class Extended_PreInit_EventHandlers {
|
class Extended_PreInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Extended_PostInit_EventHandlers {
|
class Extended_PostInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_Killed_EventHandlers {
|
||||||
|
class CAManBase {
|
||||||
|
class ADDON {
|
||||||
|
killed = QUOTE(_this call FUNC(handleKilled));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_Fired_EventHandlers {
|
||||||
|
class CAManBase {
|
||||||
|
class ADDON {
|
||||||
|
fired = QUOTE(if (local (_this select 0)) then {_this call FUNC(handleFired)});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_Explosion_EventHandlers {
|
||||||
|
class CAManBase {
|
||||||
|
class ADDON {
|
||||||
|
explosion = QUOTE(if (local (_this select 0)) then {_this call FUNC(handleExplosion)});
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,24 +1,8 @@
|
|||||||
/*
|
|
||||||
* Author: Garth 'L-H' de Wet
|
|
||||||
* Sets up the glasses mod for usage. Initialises variables and event handlers.
|
|
||||||
* Shouldn't be called by a user/modder ever. Done by the engine.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: No
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
["ACE3 Common", QGVAR(wipeGlasses), localize LSTRING(WipeGlasses),
|
["ACE3 Common", QGVAR(wipeGlasses), localize LSTRING(WipeGlasses), {
|
||||||
{
|
|
||||||
if (!(GETVAR(ace_player,ACE_isUnconscious,false))) exitWith {
|
if (!(GETVAR(ace_player,ACE_isUnconscious,false))) exitWith {
|
||||||
call FUNC(clearGlasses);
|
call FUNC(clearGlasses);
|
||||||
true
|
true
|
||||||
@ -26,7 +10,12 @@ if (!hasInterface) exitWith {};
|
|||||||
false
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[20, [true, true, false]], false] call cba_fnc_addKeybind;
|
[20, [true, true, false]], false] call CBA_fnc_addKeybind;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if isNil(QGVAR(UsePP)) then {
|
if isNil(QGVAR(UsePP)) then {
|
||||||
GVAR(UsePP) = true;
|
GVAR(UsePP) = true;
|
||||||
|
@ -1,22 +1,12 @@
|
|||||||
/*
|
|
||||||
* Author: Garth 'L-H' de Wet
|
|
||||||
* Initialises Goggles.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: No
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP(handleExplosion);
|
||||||
|
PREP(handleFired);
|
||||||
|
PREP(handleKilled);
|
||||||
|
|
||||||
|
|
||||||
PREP(applyDirtEffect);
|
PREP(applyDirtEffect);
|
||||||
PREP(applyDust);
|
PREP(applyDust);
|
||||||
PREP(applyGlassesEffect);
|
PREP(applyGlassesEffect);
|
||||||
|
Loading…
Reference in New Issue
Block a user