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 GVAR(enable) { // @todo
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(enable);
|
||||
};*/
|
||||
class GVAR(showInThirdPerson) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
|
@ -1,10 +1,36 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
class ADDON {
|
||||
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"
|
||||
|
||||
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 {
|
||||
call FUNC(clearGlasses);
|
||||
true
|
||||
@ -26,7 +10,12 @@ if (!hasInterface) exitWith {};
|
||||
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 {
|
||||
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"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(handleExplosion);
|
||||
PREP(handleFired);
|
||||
PREP(handleKilled);
|
||||
|
||||
|
||||
PREP(applyDirtEffect);
|
||||
PREP(applyDust);
|
||||
PREP(applyGlassesEffect);
|
||||
|
Loading…
Reference in New Issue
Block a user