mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of github.com:KoffeinFlummi/ACE3
This commit is contained in:
commit
f90f1cfc21
@ -29,3 +29,9 @@ if (isServer) then {
|
||||
|
||||
//Medical Integration Events???
|
||||
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||
["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||
["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||
|
@ -16,16 +16,3 @@ class CfgPatches {
|
||||
#include "CfgMoves.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
class ACE_canInteractConditions {
|
||||
class GVAR(isNotEscorting) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isEscorting),false)));
|
||||
};
|
||||
class GVAR(isNotHandcuffed) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isHandcuffed),false)));
|
||||
};
|
||||
class GVAR(isNotSurrendering) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isSurrendering),false)));
|
||||
};
|
||||
};
|
||||
|
@ -55,8 +55,6 @@ if (_currentVersion != _previousVersion) then {
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
call COMPILE_FILE(scripts\assignedItemFix);
|
||||
|
||||
call COMPILE_FILE(scripts\initCanInteractFunction);
|
||||
call COMPILE_FILE(scripts\initScrollWheel);
|
||||
|
||||
0 spawn {
|
||||
@ -161,3 +159,5 @@ _vehicle setFuel _fuelLevel;
|
||||
|
||||
["displayTextStructured", FUNC(displayTextStructured)] call FUNC(addEventhandler);
|
||||
["displayTextPicture", FUNC(displayTextPicture)] call FUNC(addEventhandler);
|
||||
|
||||
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
|
||||
|
@ -7,6 +7,7 @@ ADDON = false;
|
||||
PREP(addActionEventHandler);
|
||||
PREP(addActionMenuEventHandler);
|
||||
PREP(addCameraEventHandler);
|
||||
PREP(addCanInteractWithCondition);
|
||||
PREP(addCustomEventHandler);
|
||||
PREP(addLineToDebugDraw);
|
||||
PREP(addMapMarkerCreatedEventHandler);
|
||||
@ -147,6 +148,7 @@ PREP(receiveRequest);
|
||||
PREP(removeActionEventHandler);
|
||||
PREP(removeActionMenuEventHandler);
|
||||
PREP(removeCameraEventHandler);
|
||||
PREP(removeCanInteractWithCondition);
|
||||
PREP(removeCustomEventHandler);
|
||||
PREP(removeMapMarkerCreatedEventHandler);
|
||||
PREP(removeScrollWheelEventHandler);
|
||||
|
@ -51,12 +51,6 @@ class ACE_Rsc_Control_Base {
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class ACE_canInteractConditions {
|
||||
class GVAR(notOnMap) {
|
||||
condition = "!visibleMap";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Settings {
|
||||
/*
|
||||
*class GVAR(sampleSetting) {
|
||||
|
38
addons/common/functions/fnc_addCanInteractWithCondition.sqf
Normal file
38
addons/common/functions/fnc_addCanInteractWithCondition.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Add a condition that gets checked by ace_common_fnc_canInteractWith.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The conditions id. Used to remove later or as exception name. An already existing name overwrites. (String)
|
||||
* 1: The condition to check. format of "_this" is "[_player, _target]". (Code)
|
||||
*
|
||||
* Return Value:
|
||||
* Unit can interact?
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_conditionName", "_conditionFunc"];
|
||||
|
||||
_conditionName = toLower (_this select 0);
|
||||
_conditionFunc = _this select 1;
|
||||
|
||||
private ["_conditions", "_conditionNames", "_conditionFuncs"];
|
||||
|
||||
_conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
|
||||
_conditionNames = _conditions select 0;
|
||||
_conditionFuncs = _conditions select 1;
|
||||
|
||||
private "_index";
|
||||
_index = _conditionNames find _conditionName;
|
||||
|
||||
if (_index == -1) then {
|
||||
_index = count _conditionNames;
|
||||
};
|
||||
|
||||
_conditionNames set [_index, _conditionName];
|
||||
_conditionFuncs set [_index, _conditionFunc];
|
||||
|
||||
GVAR(InteractionConditions) = [_conditionNames, _conditionFuncs];
|
@ -1,11 +1,49 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Check if the unit can interact.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The player. (Object)
|
||||
* 1: The interaction target. objNull to ignore. (Object)
|
||||
* 2: Exceptions. What general conditions are to skip? (Array)
|
||||
*
|
||||
* Return Value:
|
||||
* Unit can interact?
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target", "_owner"];
|
||||
private ["_unit", "_target", "_exceptions"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_exceptions = _this select 2;
|
||||
|
||||
_owner = _target getVariable ["ACE_isUsedBy", objNull];
|
||||
_exceptions = [_exceptions, {toLower _this}] call FUNC(map);
|
||||
|
||||
isNull _owner || {_unit == _owner} || {!isPlayer _owner}
|
||||
// exit if the target is not free to interact
|
||||
private "_owner";
|
||||
_owner = _target getVariable [QGVAR(owner), objNull];
|
||||
|
||||
if (!isNull _owner && {_unit != _owner} && {!([_owner] call FUNC(isPlayer))}) exitWith {false};
|
||||
|
||||
// check general conditions
|
||||
|
||||
private ["_conditions", "_conditionNames", "_conditionFuncs"];
|
||||
|
||||
_conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
|
||||
_conditionNames = _conditions select 0;
|
||||
_conditionFuncs = _conditions select 1;
|
||||
|
||||
private "_canInteract";
|
||||
_canInteract = true;
|
||||
|
||||
{
|
||||
if (!(_x in _exceptions) && {!([_unit, _target] call (_conditionFuncs select _forEachIndex))}) exitWith {
|
||||
_canInteract = false;
|
||||
};
|
||||
} forEach _conditionNames;
|
||||
|
||||
_canInteract
|
||||
|
@ -1,7 +1,20 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Unit claims the ownership over an object. This is used to prevent multiple players from draging the same ammo box or using up the same wheel when repairing etc.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that claims another object. ObjNull to remove claim. (Object)
|
||||
* 1: The object that gets claimed. (Object)
|
||||
* 2: Lock the claimed object aswell? (Bool)
|
||||
*
|
||||
* Return Value:
|
||||
* NONE
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target", "_lockTarget", "_owner"];
|
||||
private ["_unit", "_target", "_lockTarget"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
@ -9,20 +22,26 @@ _lockTarget = _this select 2;
|
||||
|
||||
if (isNil "_lockTarget") then {_lockTarget = false};
|
||||
|
||||
_owner = _target getVariable ["ACE_isUsedBy", objNull];
|
||||
private "_owner";
|
||||
_owner = _target getVariable [QGVAR(owner), objNull];
|
||||
|
||||
if (!isNull _owner && {!isNull _unit} && {_unit != _owner}) then {
|
||||
diag_log text "[ACE] ERROR: Claiming already owned object.";
|
||||
};
|
||||
|
||||
_target setVariable ["ACE_isUsedBy", _unit, true];
|
||||
// transfer this immediately
|
||||
_target setVariable [QGVAR(owner), _unit, true];
|
||||
|
||||
// lock target object
|
||||
if (_lockTarget) then {
|
||||
if (!isNull _unit) then {
|
||||
[_target, "{_locked = locked _this; _this setVariable ['ACE_lockStatus', _locked]; _this lock 2}", _target] call FUNC(execRemoteFnc);
|
||||
} else {
|
||||
[_target, "{_this lock (_this getVariable ['ACE_lockStatus', locked _this])}", _target] call FUNC(execRemoteFnc);
|
||||
};
|
||||
if (!isNull _unit) then {
|
||||
["lockVehicle", _target, _target] call FUNC(targetEvent);
|
||||
} else {
|
||||
["unlockVehicle", _target, _target] call FUNC(targetEvent);
|
||||
};
|
||||
};
|
||||
|
||||
//systemChat str locked _target; systemChat str (_target getVariable ['ACE_lockStatus', locked _target]);
|
||||
/*
|
||||
systemChat str locked _target;
|
||||
systemChat str (_target getVariable [QGVAR(lockStatus), locked _target]);
|
||||
*/
|
||||
|
@ -1,8 +1,19 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Counterpart of ace_common_fnc_claim. Check if the given object is claimed by another unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Any object. (Object)
|
||||
*
|
||||
* Return Value:
|
||||
* Is this object claimed by someone?
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_object";
|
||||
private "_target";
|
||||
|
||||
_object = _this select 0;
|
||||
_target = _this select 0;
|
||||
|
||||
!isNull (_object getVariable ["ACE_isUsedBy", objNull])
|
||||
!isNull (_target getVariable [QGVAR(owner), objNull])
|
||||
|
@ -11,7 +11,7 @@
|
||||
* 3: CODE or STRING - On Failure: Code called or STRING raised as event.
|
||||
* 4: STRING - (Optional) Localized Title
|
||||
* 5: CODE - (Optional) Code to check each frame
|
||||
* 6: ARRAY - (Optional) Exceptions for checking EGVAR(common,canInteract)
|
||||
* 6: ARRAY - (Optional) Exceptions for checking EGVAR(common,canInteractWith)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
@ -62,7 +62,7 @@ _perFrameFunction = {
|
||||
if (!([_args, _elapsedTime, _totalTime, _errorCode] call _condition)) then {
|
||||
_errorCode = 3;
|
||||
} else {
|
||||
if (!(_exceptions call EGVAR(common,canInteract))) then {
|
||||
if (!([_player, objNull, _exceptions] call EGVAR(common,canInteractWith))) then {
|
||||
_errorCode = 4;
|
||||
} else {
|
||||
if (_elapsedTime >= _totalTime) then {
|
||||
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Remove a condition that gets checked by ace_common_fnc_canInteractWith.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The conditions id. (String)
|
||||
*
|
||||
* Return Value:
|
||||
* Unit can interact?
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_conditionName";
|
||||
|
||||
_conditionName = toLower (_this select 0);
|
||||
|
||||
private ["_conditions", "_conditionNames", "_conditionFuncs"];
|
||||
|
||||
_conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
|
||||
_conditionNames = _conditions select 0;
|
||||
_conditionFuncs = _conditions select 1;
|
||||
|
||||
private "_index";
|
||||
_index = _conditionNames find _conditionName;
|
||||
|
||||
if (_index == -1) exitWith {};
|
||||
|
||||
_conditionNames deleteAt _index;
|
||||
_conditionFuncs deleteAt _index;
|
||||
|
||||
GVAR(InteractionConditions) = [_conditionNames, _conditionFuncs];
|
@ -1,20 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_function", "_configFile", "_count", "_index", "_config", "_configName", "_condition"];
|
||||
|
||||
_function = "private '_exceptions'; _exceptions = _this; alive ACE_player";
|
||||
|
||||
_configFile = configFile >> "ACE_canInteractConditions";
|
||||
_count = count _configFile;
|
||||
|
||||
for "_index" from 0 to (_count -1) do {
|
||||
_config = _configFile select _index;
|
||||
_configName = configName _config;
|
||||
|
||||
_condition = getText (_config >> "condition");
|
||||
|
||||
_function = _function + format ["&& {%1 || {'%2' in _exceptions}}", _condition, _configName];
|
||||
};
|
||||
|
||||
GVAR(canInteract) = compileFinal _function;
|
@ -3,8 +3,7 @@
|
||||
["ACE3", QGVAR(lazeTarget), localize "STR_ACE_FCS_LaseTarget",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
|
||||
|
||||
@ -21,8 +20,7 @@
|
||||
GVAR(isDownStateKey1) = false;
|
||||
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(GVAR(enabled) && FUNC(canUseFCS)) exitWith {false};
|
||||
|
||||
@ -35,8 +33,7 @@
|
||||
["ACE3", QGVAR(adjustRangeUp), localize "STR_ACE_FCS_AdjustRangeUp",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
||||
|
||||
@ -50,8 +47,7 @@
|
||||
["ACE3", QGVAR(adjustRangDown), localize "STR_ACE_FCS_AdjustRangeDown",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
||||
|
||||
|
@ -13,8 +13,7 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
|
||||
["ACE3", QGVAR(switchGrenadeMode), localize "STR_ACE_Grenades_SwitchGrenadeMode",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(captives,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
|
||||
|
||||
|
@ -46,7 +46,7 @@ _recurseFnc = {
|
||||
if (_condition == "") then {_condition = "true"};
|
||||
|
||||
// Add canInteract (including exceptions) and canInteractWith to condition
|
||||
_condition = _condition + format [QUOTE( && {%1 call EGVAR(common,canInteract)} && {[ARR_2(ACE_player, _target)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
|
||||
_condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, _target, %1)] call EGVAR(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
|
||||
|
||||
_showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0;
|
||||
_enableInside = (getNumber (_entryCfg >> "enableInside")) > 0;
|
||||
|
@ -43,7 +43,7 @@ _recurseFnc = {
|
||||
if (_condition == "") then {_condition = "true"};
|
||||
|
||||
// Add canInteract (including exceptions) and canInteractWith to condition
|
||||
_condition = _condition + format [QUOTE( && {%1 call EGVAR(common,canInteract)} && {[ARR_2(ACE_player, _target)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
|
||||
_condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, objNull, %1)] call EGVAR(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
|
||||
|
||||
_showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0;
|
||||
_enableInside = (getNumber (_entryCfg >> "enableInside")) > 0;
|
||||
|
@ -19,8 +19,7 @@ GVAR(isOpeningDoor) = false;
|
||||
["ACE3", QGVAR(openDoor), localize "STR_ACE_Interaction_OpenDoor",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (GVAR(isOpeningDoor) || {[2] call FUNC(getDoor) select 1 == ''}) exitWith {false};
|
||||
|
||||
@ -40,8 +39,7 @@ GVAR(isOpeningDoor) = false;
|
||||
["ACE3", QGVAR(tapShoulder), localize "STR_ACE_Interaction_TapShoulder",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
|
||||
|
||||
@ -55,8 +53,7 @@ GVAR(isOpeningDoor) = false;
|
||||
["ACE3", QGVAR(modifierKey), localize "STR_ACE_Interaction_ModifierKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotDragging"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
ACE_Modifier = 1;
|
||||
@ -69,3 +66,5 @@ GVAR(isOpeningDoor) = false;
|
||||
false;
|
||||
},
|
||||
[29, [false, false, false]], false] call cba_fnc_addKeybind;
|
||||
|
||||
["isNotSwimming", {!underwater (_this select 0)}] call EFUNC(common,addCanInteractWithCondition);
|
||||
|
@ -24,9 +24,3 @@ class ACE_Settings {
|
||||
typeName = "BOOL";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_canInteractConditions {
|
||||
class GVAR(isNotSwimming) {
|
||||
condition = QUOTE( !underwater ACE_player );
|
||||
};
|
||||
};
|
||||
|
@ -47,7 +47,7 @@ playSound "ACE_Sound_Click";
|
||||
!GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
|
||||
};
|
||||
|
||||
if (!_usedMouseWheel && {time < _time} && {[] call EGVAR(common,canInteract)}) then {
|
||||
if (!_usedMouseWheel && {time < _time} && {[ACE_player, objNull, []] call EGVAR(common,canInteractWith)}) then {
|
||||
_phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
|
||||
|
||||
{_house animate [_x, _phase]} forEach _animations;
|
||||
|
@ -1,8 +1,3 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
@ -103,31 +98,31 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,8 +21,7 @@
|
||||
["ACE3", QGVAR(climb), localize "STR_ACE_Movement_Climb",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (ACE_player != (vehicle ACE_player)) exitWith {false};
|
||||
|
||||
|
@ -10,8 +10,7 @@ if (!hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(showNameTags), localize "STR_ACE_NameTags_ShowNames",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
GVAR(ShowNamesTime) = time;
|
||||
|
@ -40,8 +40,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
||||
["ACE3", QGVAR(IncreaseNVGBrightness), localize "STR_ACE_NightVision_IncreaseNVGBrightness",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(captives,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if ((currentVisionMode _player != 1)) exitWith {false};
|
||||
|
||||
@ -55,8 +54,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
||||
["ACE3", QGVAR(DecreaseNVGBrightness), localize "STR_ACE_NightVision_DecreaseNVGBrightness",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(captives,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if ((currentVisionMode _player != 1)) exitWith {false};
|
||||
|
||||
|
@ -6,8 +6,8 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Combat Space Enhancement"};
|
||||
authorUrl = "http://csemod.com";
|
||||
author[] = {"Glowbal", "PabstMirror"};
|
||||
authorUrl = "http://github.com/Glowbal";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
@ -24,4 +24,4 @@ class CfgAddons {
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "gui\define.hpp"
|
||||
#include "gui\settingsMenu.hpp"
|
||||
#include "gui\pauseMenu.hpp"
|
||||
#include "gui\pauseMenu.hpp"
|
||||
|
@ -13,6 +13,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingIndex", "_rightDropDownIndex"];
|
||||
|
@ -13,6 +13,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_localizedHeader"];
|
||||
|
@ -13,6 +13,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Filter only user setable setting
|
||||
@ -38,3 +39,9 @@ GVAR(clientSideColors) = [];
|
||||
|
||||
//Delay a frame
|
||||
[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
|
||||
|
||||
private "_menu";
|
||||
disableSerialization;
|
||||
_menu = uiNamespace getvariable "ACE_settingsMenu";
|
||||
(_menu displayCtrl 1002) ctrlEnable false;
|
||||
(_menu displayCtrl 1003) ctrlEnable false;
|
||||
|
@ -13,23 +13,26 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_newColor", "_settingIndex"];
|
||||
|
||||
_newColor = [];
|
||||
{
|
||||
_newColor pushBack ((sliderPosition _x) / 255);
|
||||
} forEach [410, 411, 412, 413];
|
||||
|
||||
_settingIndex = lbCurSel 200;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_COLORS): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideColors)))) then {
|
||||
_settingIndex = (GVAR(clientSideColors) select _settingIndex) select 0;
|
||||
[MENU_TAB_COLORS, _settingIndex, _newColor] call FUNC(updateSetting);
|
||||
case (MENU_TAB_COLORS): {
|
||||
|
||||
_newColor = [];
|
||||
{
|
||||
_newColor pushBack ((sliderPosition _x) / 255);
|
||||
} forEach [410, 411, 412, 413];
|
||||
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideColors)))) then {
|
||||
_settingIndex = (GVAR(clientSideColors) select _settingIndex) select 0;
|
||||
[MENU_TAB_COLORS, _settingIndex, _newColor] call FUNC(updateSetting);
|
||||
};
|
||||
[false] call FUNC(settingsMenuUpdateList);
|
||||
};
|
||||
[false] call FUNC(settingsMenuUpdateList);
|
||||
};
|
||||
default {};
|
||||
};
|
||||
|
@ -13,6 +13,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_name", "_default", "_lastSelected"];
|
||||
|
@ -13,6 +13,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor"];
|
||||
@ -22,58 +23,58 @@ _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
|
||||
_ctrlList = _settingsMenu displayCtrl 200;
|
||||
|
||||
_collection = switch (GVAR(optionMenu_openTab)) do {
|
||||
case MENU_TAB_OPTIONS: {GVAR(clientSideOptions)};
|
||||
case MENU_TAB_COLORS: {GVAR(clientSideColors)};
|
||||
default {[]};
|
||||
case MENU_TAB_OPTIONS: {GVAR(clientSideOptions)};
|
||||
case MENU_TAB_COLORS: {GVAR(clientSideColors)};
|
||||
default {[]};
|
||||
};
|
||||
|
||||
if (count _collection > 0) then {
|
||||
_settingIndex = (lbCurSel _ctrlList);
|
||||
if (_settingIndex > (count _collection)) then {
|
||||
_settingIndex = count _collection - 1;
|
||||
};
|
||||
|
||||
if (_settingIndex < 0) exitwith {
|
||||
_settingIndex = 0;
|
||||
};
|
||||
_setting = _collection select _settingIndex;
|
||||
|
||||
_entryName = _setting select 0;
|
||||
_localizedName = _setting select 3;
|
||||
_localizedDescription = _setting select 4;
|
||||
|
||||
if (_localizedName == "") then {_localizedName = _entryName;};
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
_possibleValues = _setting select 5;
|
||||
_settingsValue = _setting select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
if ((_setting select 1) == "BOOL") then {
|
||||
lbClear 400;
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Disabled")];
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Enabled")];
|
||||
_settingsValue = [0, 1] select _settingsValue;
|
||||
} else {
|
||||
lbClear 400;
|
||||
{ lbAdd [400, _x]; } foreach _possibleValues;
|
||||
};
|
||||
(_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue;
|
||||
_settingIndex = (lbCurSel _ctrlList);
|
||||
if (_settingIndex > (count _collection)) then {
|
||||
_settingIndex = count _collection - 1;
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
_currentColor = _setting select 8;
|
||||
{
|
||||
sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))];
|
||||
} forEach [410, 411, 412, 413];
|
||||
|
||||
if (_settingIndex < 0) then {
|
||||
_settingIndex = 0;
|
||||
};
|
||||
_setting = _collection select _settingIndex;
|
||||
|
||||
_entryName = _setting select 0;
|
||||
_localizedName = _setting select 3;
|
||||
_localizedDescription = _setting select 4;
|
||||
|
||||
if (_localizedName == "") then {_localizedName = _entryName;};
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
_possibleValues = _setting select 5;
|
||||
_settingsValue = _setting select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
if ((_setting select 1) == "BOOL") then {
|
||||
lbClear 400;
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Disabled")];
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Enabled")];
|
||||
_settingsValue = [0, 1] select _settingsValue;
|
||||
} else {
|
||||
lbClear 400;
|
||||
{ lbAdd [400, _x]; } foreach _possibleValues;
|
||||
};
|
||||
(_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue;
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
_currentColor = _setting select 8;
|
||||
{
|
||||
sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))];
|
||||
} forEach [410, 411, 412, 413];
|
||||
};
|
||||
};
|
||||
};
|
||||
} else { //no settings in list:
|
||||
lbClear 400;
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
||||
lbClear 400;
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText "No settings available";
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText "No settings available";
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText "No settings available";
|
||||
};
|
||||
|
@ -13,6 +13,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView"];
|
||||
@ -25,35 +26,35 @@ _ctrlList = _settingsMenu displayCtrl 200;
|
||||
lbclear _ctrlList;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
{
|
||||
_ctrlList lbadd (_x select 3);
|
||||
|
||||
_settingsValue = _x select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
_settingsText = if ((_x select 1) == "BOOL") then {
|
||||
[(localize "STR_ACE_OptionsMenu_Disabled"), (localize "STR_ACE_OptionsMenu_Enabled")] select _settingsValue;
|
||||
} else {
|
||||
(_x select 5) select _settingsValue;
|
||||
};
|
||||
|
||||
_ctrlList lbadd (_settingsText);
|
||||
}foreach GVAR(clientSideOptions);
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
{
|
||||
_ctrlList lbadd (_x select 3);
|
||||
|
||||
_settingsValue = _x select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
_settingsText = if ((_x select 1) == "BOOL") then {
|
||||
[(localize "STR_ACE_OptionsMenu_Disabled"), (localize "STR_ACE_OptionsMenu_Enabled")] select _settingsValue;
|
||||
} else {
|
||||
(_x select 5) select _settingsValue;
|
||||
};
|
||||
|
||||
_ctrlList lbadd (_settingsText);
|
||||
}foreach GVAR(clientSideOptions);
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
{
|
||||
_color = +(_x select 8);
|
||||
{
|
||||
_color set [_forEachIndex, ((round (_x * 100))/100)];
|
||||
} forEach _color;
|
||||
_settingsColor = str _color;
|
||||
_ctrlList lbadd (_x select 3);
|
||||
_ctrlList lbadd (_settingsColor);
|
||||
_ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 8)];
|
||||
}foreach GVAR(clientSideColors);
|
||||
};
|
||||
_color = +(_x select 8);
|
||||
{
|
||||
_color set [_forEachIndex, ((round (_x * 100))/100)];
|
||||
} forEach _color;
|
||||
_settingsColor = str _color;
|
||||
_ctrlList lbadd (_x select 3);
|
||||
_ctrlList lbadd (_settingsColor);
|
||||
_ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 8)];
|
||||
}foreach GVAR(clientSideColors);
|
||||
};
|
||||
};
|
||||
if (_updateKeyView) then {
|
||||
[] call FUNC(settingsMenuUpdateKeyView);
|
||||
[] call FUNC(settingsMenuUpdateKeyView);
|
||||
};
|
||||
|
@ -15,6 +15,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_changed"];
|
||||
|
@ -4,7 +4,7 @@ class ACE_settingsMenu {
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen););
|
||||
onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;);
|
||||
|
||||
#define SIZEX ((0.70 * safezoneW) max 1.0)
|
||||
#define SIZEX (((safezoneW / safezoneH) min 1.2))
|
||||
#define SIZEY (SIZEX / 1.2)
|
||||
#define UNITX (SIZEX / 40)
|
||||
#define UNITY (SIZEY / 25)
|
||||
@ -42,6 +42,10 @@ class ACE_settingsMenu {
|
||||
x = 26.1 * UNITX + OFFSETX;
|
||||
w = 12.9 * UNITX;
|
||||
};
|
||||
class RightBackgroundHeader: RightBackground {
|
||||
h = 1.4 * UNITY;
|
||||
colorBackground[] = {0,0,0,1};
|
||||
};
|
||||
};
|
||||
|
||||
class controls {
|
||||
@ -85,7 +89,7 @@ class ACE_settingsMenu {
|
||||
colorBackgroundFocused[] = {1,1,1,1};
|
||||
colorBackground[] = {1,1,1,1};
|
||||
colorbackground2[] = {1,1,1,1};
|
||||
colorDisabled[] = {0.5,0.5,0.5,0.8};
|
||||
colorDisabled[] = {1,1,1,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
periodFocus = 1;
|
||||
periodOver = 1;
|
||||
@ -99,13 +103,13 @@ class ACE_settingsMenu {
|
||||
};
|
||||
class selectionAction_3: selectionAction_1 {
|
||||
idc = 1002;
|
||||
text = "---";
|
||||
text = "";
|
||||
x = 20 * UNITX + OFFSETX;
|
||||
action = "";
|
||||
};
|
||||
class selectionAction_4: selectionAction_1 {
|
||||
idc = 1003;
|
||||
text = "---";
|
||||
text = "";
|
||||
x = 29.5 * UNITX + OFFSETX;
|
||||
action = "";
|
||||
};
|
||||
@ -115,7 +119,7 @@ class ACE_settingsMenu {
|
||||
y = 5.5 * UNITY + OFFSETY;
|
||||
w = 23 * UNITX;
|
||||
h = 15 * UNITY;
|
||||
SizeEx = (UNITY * 0.7);
|
||||
SizeEx = (UNITY * 0.8);
|
||||
colorBackground[] = {0, 0, 0, 0.9};
|
||||
colorSelectBackground[] = {0, 0, 0, 0.9};
|
||||
columns[] = {0.0, 0.6};
|
||||
@ -128,7 +132,7 @@ class ACE_settingsMenu {
|
||||
w = 11 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
text = "";
|
||||
SizeEx = (UNITY * 0.75);
|
||||
SizeEx = (UNITY *1);
|
||||
};
|
||||
class labelKey: ACE_gui_staticBase { //Variable Name
|
||||
idc = 300;
|
||||
@ -137,13 +141,13 @@ class ACE_settingsMenu {
|
||||
w = 11 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
text = "";
|
||||
SizeEx = (UNITY * 0.60);
|
||||
SizeEx = (UNITY * 0.65);
|
||||
};
|
||||
class Label2: labelKey {
|
||||
idc = 301;
|
||||
y = 7.3 * UNITY + OFFSETY;
|
||||
text = "$STR_ACE_OptionsMenu_Setting";
|
||||
SizeEx = (UNITY * 0.75);
|
||||
SizeEx = (UNITY * 1);
|
||||
};
|
||||
class comboBox1: ACE_gui_comboBoxBase {
|
||||
idc = 400;
|
||||
@ -152,7 +156,7 @@ class ACE_settingsMenu {
|
||||
w = 7 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
onLBSelChanged = QUOTE( call FUNC(onListBoxSettingsChanged));
|
||||
SizeEx = (UNITY * 0.75);
|
||||
SizeEx = (UNITY * 0.9);
|
||||
};
|
||||
class sliderBar1: RscXSliderH {
|
||||
idc = 410;
|
||||
@ -191,15 +195,16 @@ class ACE_settingsMenu {
|
||||
text = "";
|
||||
style = ST_LEFT + ST_MULTI;
|
||||
lineSpacing = 1;
|
||||
SizeEx = (UNITY * 0.60);
|
||||
SizeEx = (UNITY * 0.8);
|
||||
};
|
||||
class actionClose: ACE_gui_buttonBase {
|
||||
idc = 10;
|
||||
text = "$STR_DISP_CLOSE";
|
||||
x = 1 * UNITX + OFFSETX;
|
||||
y = 22.3 * UNITY + OFFSETY;
|
||||
w = 6 * UNITX;
|
||||
w = 7.5 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
style = ST_LEFT;
|
||||
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)";
|
||||
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
|
||||
@ -217,21 +222,10 @@ class ACE_settingsMenu {
|
||||
periodOver = 1;
|
||||
action = "closedialog 0;";
|
||||
};
|
||||
|
||||
//probably use this for the export to hpp button:
|
||||
/* class action_animation: actionClose {
|
||||
idc = 1100;
|
||||
text = "$STR_ACE_OptionsMenu_FixAnimation";
|
||||
x = 7.5 * UNITX + OFFSETX;
|
||||
// action = "if ([player] call ACE_fnc_canInteract && {animationState player == 'deadState' || animationState player == 'unconscious'} && {(vehicle player == player)}) then { [player, 'amovppnemstpsnonwnondnon'] call ACE_fnc_broadcastAnim; };";
|
||||
action = QUOTE(_this call FUNC(k,rgr));
|
||||
}; */
|
||||
|
||||
|
||||
class action_reset: actionClose {
|
||||
idc = 1100;
|
||||
text = "$STR_ACE_OptionsMenu_ResetAll";
|
||||
x = 14 * (SIZEX / 40) + OFFSETX;
|
||||
x = 26.1 * (SIZEX / 40) + OFFSETX;
|
||||
action = QUOTE([] call FUNC(resetSettings));
|
||||
};
|
||||
};
|
||||
|
@ -7,8 +7,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(unjamWeapon), localize "STR_ACE_Overheating_UnjamWeapon",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon) &&
|
||||
{currentWeapon ACE_player in (ACE_player getVariable [QGVAR(jammedWeapons), []])}
|
||||
|
@ -19,8 +19,7 @@ if (!hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(showAltimeter), localize "STR_ACE_Parachute_showAltimeter",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
if (!('ACE_Altimeter' in assignedItems ace_player)) exitWith {false};
|
||||
if (!(missionNamespace getVariable [QGVAR(AltimeterActive), false])) then {
|
||||
[ace_player] call FUNC(showAltimeter);
|
||||
|
@ -7,8 +7,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(checkAmmo), localize "STR_ACE_Reload_checkAmmo",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon) ||
|
||||
{(vehicle ACE_player) isKindOf 'StaticWeapon'}) exitWith {false};
|
||||
|
@ -42,7 +42,7 @@ if (_maxAmmo == 0) exitWith {};
|
||||
// Condition to call each frame
|
||||
_condition = {
|
||||
EXPLODE_2_PVT((_this select 0),_player,_target);
|
||||
([_player, _target] call EFUNC(common,canInteract)) && ((_player distance _target) < 3) && ((speed _target) < 1)
|
||||
([_player, _target, []] call EFUNC(common,canInteractWith)) && ((_player distance _target) < 3) && ((speed _target) < 1)
|
||||
};
|
||||
|
||||
_onFinish = {
|
||||
|
@ -7,8 +7,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(RestWeapon), localize "STR_ACE_Resting_RestWeapon",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon) &&
|
||||
{inputAction 'reloadMagazine' == 0} &&
|
||||
|
@ -9,8 +9,7 @@
|
||||
["ACE3", QGVAR(safeMode), localize "STR_ACE_SafeMode_SafeMode",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
|
@ -36,8 +36,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(AdjustUp), localize "STR_ACE_Scopes_AdjustUp",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
if !([ACE_player, 0, 0.1] call FUNC(canAdjustScope)) exitWith {false};
|
||||
@ -52,8 +51,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(AdjustDown), localize "STR_ACE_Scopes_AdjustDown",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
if !([ACE_player, 0, -0.1] call FUNC(canAdjustScope)) exitWith {false};
|
||||
@ -68,8 +66,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(AdjustLeft), localize "STR_ACE_Scopes_AdjustLeft",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
if !([ACE_player, -0.1, 0] call FUNC(canAdjustScope)) exitWith {false};
|
||||
@ -84,8 +81,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(AdjustRight), localize "STR_ACE_Scopes_AdjustRight",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
if !([ACE_player, 0.1, 0] call FUNC(canAdjustScope)) exitWith {false};
|
||||
|
@ -3,8 +3,7 @@
|
||||
["ACE3", QGVAR(AzimuthKey), localize "STR_ACE_Vector_AzimuthKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(currentWeapon ACE_player == "ACE_Vector" && {ACE_player == cameraOn} && {cameraView == "GUNNER"}) exitWith {false};
|
||||
|
||||
@ -21,8 +20,7 @@
|
||||
GVAR(isDownStateKey1) = false;
|
||||
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
["azimuth"] call FUNC(onKeyUp);
|
||||
@ -34,8 +32,7 @@
|
||||
["ACE3", QGVAR(DistanceKey), localize "STR_ACE_Vector_DistanceKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(currentWeapon ACE_player == "ACE_Vector" && {ACE_player == cameraOn} && {cameraView == "GUNNER"}) exitWith {false};
|
||||
|
||||
@ -52,8 +49,7 @@
|
||||
GVAR(isDownStateKey2) = false;
|
||||
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
["distance"] call FUNC(onKeyUp);
|
||||
|
@ -64,7 +64,7 @@ case (_funcType == "startLockpick"): {
|
||||
_condition = {
|
||||
PARAMS_1(_args);
|
||||
EXPLODE_2_PVT(_args,_unit,_veh);
|
||||
([_unit] call EFUNC(common,canInteract)) && ((_unit distance _veh) < 5) && ((speed _veh) < 1)
|
||||
([_unit, objNull, []] call EFUNC(common,canInteractWith)) && ((_unit distance _veh) < 5) && ((speed _veh) < 1)
|
||||
};
|
||||
[_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize "STR_ACE_Vehicle_Action_LockpickInUse"), _condition] call EFUNC(common,progressBar);
|
||||
};
|
||||
|
@ -7,8 +7,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(speedLimiter), localize "STR_ACE_SpeedLimiter",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(ACE_player == driver vehicle ACE_player &&
|
||||
{vehicle ACE_player isKindOf 'Car' ||
|
||||
|
@ -7,8 +7,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectPistol), localize "STR_ACE_WeaponSelect_SelectPistol",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -22,8 +21,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectRifle), localize "STR_ACE_WeaponSelect_SelectRifle",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -37,8 +35,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectRifleMuzzle), localize "STR_ACE_WeaponSelect_SelectRifleMuzzle",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -52,8 +49,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectLauncher), localize "STR_ACE_WeaponSelect_SelectLauncher",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -67,8 +63,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectBinocular), localize "STR_ACE_WeaponSelect_SelectBinocular",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -82,8 +77,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectGrenadeFrag), localize "STR_ACE_WeaponSelect_SelectGrenadeFrag",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -97,8 +91,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectGrenadeOther), localize "STR_ACE_WeaponSelect_SelectGrenadeOther",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -112,8 +105,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(HolsterWeapon), localize "STR_ACE_WeaponSelect_HolsterWeapon",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(interaction,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||
|
||||
@ -127,8 +119,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(EngineOn), localize "STR_ACE_WeaponSelect_EngineOn",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {!isEngineOn vehicle ACE_player}) exitWith {false};
|
||||
|
||||
@ -142,8 +133,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(EngineOff), localize "STR_ACE_WeaponSelect_EngineOff",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {isEngineOn vehicle ACE_player}) exitWith {false};
|
||||
|
||||
@ -157,8 +147,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectMainGun), localize "STR_ACE_WeaponSelect_SelectMainGun",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(ACE_player != vehicle ACE_player) exitWith {false};
|
||||
|
||||
@ -172,8 +161,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectMachineGun), localize "STR_ACE_WeaponSelect_SelectMachineGun",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(ACE_player != vehicle ACE_player) exitWith {false};
|
||||
|
||||
@ -187,8 +175,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(SelectMissiles), localize "STR_ACE_WeaponSelect_SelectMissiles",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(ACE_player != vehicle ACE_player) exitWith {false};
|
||||
|
||||
@ -202,8 +189,7 @@ if !(hasInterface) exitWith {};
|
||||
["ACE3", QGVAR(FireSmokeLauncher), localize "STR_ACE_WeaponSelect_FireSmokeLauncher",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(ACE_player != vehicle ACE_player && {ACE_player == commander vehicle ACE_player}) exitWith {false};
|
||||
|
||||
|
BIN
extras/logo.png
BIN
extras/logo.png
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
BIN
logo_ace3_ca.paa
Normal file
BIN
logo_ace3_ca.paa
Normal file
Binary file not shown.
12
mod.cpp
Normal file
12
mod.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
name = "ACE3";
|
||||
picture = "logo_ace3_ca.paa";
|
||||
actionName = "Github";
|
||||
action = "https://github.com/KoffeinFlummi/ACE3";
|
||||
description = "ACE3 - Version 3.0.0";
|
||||
logo = "logo_ace3_ca.paa";
|
||||
logoOver = "logo_ace3_ca.paa";
|
||||
tooltip = "ACE3";
|
||||
tooltipOwned = "ACE3 Owned";
|
||||
overview = "ACE3 is a joint effort by the teams behind ACE2, AGM and CSE to improve the realism and authenticity of Arma3.";
|
||||
author = "ACE3 Team";
|
||||
overviewPicture = "logo_ace3_ca.paa";
|
Loading…
Reference in New Issue
Block a user