mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into drag
This commit is contained in:
commit
1117942c7a
@ -27,12 +27,11 @@ if (isServer) then {
|
||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
||||
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//TODO: Medical Integration Events???
|
||||
//Medical Integration Events???
|
||||
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// [_unit, "knockedOut", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// [_unit, "wokeUp", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
["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);
|
||||
|
@ -19,10 +19,9 @@ PREP(doUnloadCaptive);
|
||||
PREP(handleGetIn);
|
||||
PREP(handleGetOut);
|
||||
PREP(handleKilled);
|
||||
PREP(handleKnockedOut);
|
||||
PREP(handleOnUnconscious);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handleUnitInitPost);
|
||||
PREP(handleWokeUp);
|
||||
PREP(handleZeusDisplayChanged);
|
||||
PREP(moduleSurrender);
|
||||
PREP(setHandcuffed);
|
||||
|
@ -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)));
|
||||
};
|
||||
};
|
||||
|
@ -51,7 +51,7 @@ if (_state) then {
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
};
|
||||
};
|
||||
[_escortFnc, 0.2, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
[_escortFnc, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Handles when a unit gets knocked out. Ends surrendering.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_handleKnockedOut
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
||||
//ToDo: Waiting on medical integration
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Handles the "medical_onUnconscious" event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 0: Is Unconsisisiouses <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_handleOnUnconscious
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_isUnconc);
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
systemChat format ["med: %1", _this];
|
||||
|
||||
if (_isUnconc) then {
|
||||
//Knocked out: If surrendering, stop
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
||||
} else {
|
||||
//Woke up: if handcuffed, goto animation
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* TODO
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ACE_captives_fnc_handleWokeUp
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 0] call EFUNC(common,doAnimation);
|
||||
};
|
@ -52,7 +52,7 @@ if (_state) then {
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Handcuff animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
@ -71,8 +71,8 @@ if (_state) then {
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
|
||||
if ((vehicle _unit) == _unit) then {
|
||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
||||
if (((vehicle _unit) == _unit) && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
//Break out of hands up animation loop
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ if (_state) then {
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Surrender animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -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];
|
@ -11,4 +11,4 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
sunOrMoon * sunOrMoon + moonIntensity/5 min 1
|
||||
sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5 min 1) * (1 - overcast)
|
||||
|
@ -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,5 +19,7 @@ if(!GVAR(keyDown)) then {
|
||||
|
||||
GVAR(keyDown) = true;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interactMenuOpened", [0]] call EFUNC(common,localEvent);
|
||||
};
|
||||
true
|
||||
|
@ -17,6 +17,8 @@ if(!GVAR(keyDownSelfAction)) then {
|
||||
GVAR(keyDown) = false;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interactMenuOpened", [1]] call EFUNC(common,localEvent);
|
||||
|
||||
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || visibleMap;
|
||||
|
||||
if (GVAR(useCursorMenu)) then {
|
||||
|
@ -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;
|
||||
|
516
addons/inventory/RscDisplayInventory.hpp
Normal file
516
addons/inventory/RscDisplayInventory.hpp
Normal file
@ -0,0 +1,516 @@
|
||||
/*
|
||||
Adjust the scaling of the inventory screen
|
||||
- changes it from scaling based on user's interface size to a dynamic size based on a setting variable
|
||||
- text size and row height size are uneffected (so more rows in a list)
|
||||
- also tweaks the height of the two ProgressBars which looked odd scaled up so much
|
||||
|
||||
regex:
|
||||
x = "[-+]?(\d*[.]?\d+).*
|
||||
x = X_PART\(\1\);
|
||||
*/
|
||||
|
||||
class RscText;
|
||||
class RscPicture;
|
||||
class RscListBox;
|
||||
class RscProgress;
|
||||
class RscStructuredText;
|
||||
class RscActiveText;
|
||||
class RscCombo;
|
||||
|
||||
#define X_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2))
|
||||
#define Y_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))
|
||||
#define W_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40))
|
||||
#define H_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))
|
||||
|
||||
#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2))
|
||||
#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2))
|
||||
#define W_MAKEITBIGGA(num) (num * (safeZoneH / 40))
|
||||
#define H_MAKEITBIGGA(num) (num * (safeZoneH / 30))
|
||||
|
||||
#define X_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), X_BIS(num), X_MAKEITBIGGA(num))])
|
||||
#define Y_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), Y_BIS(num), Y_MAKEITBIGGA(num))])
|
||||
#define W_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), W_BIS(num), W_MAKEITBIGGA(num))])
|
||||
#define H_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), H_BIS(num), H_MAKEITBIGGA(num))])
|
||||
|
||||
class RscDisplayInventory {
|
||||
class controls {
|
||||
class CA_ContainerBackground: RscText {
|
||||
//crate: GroundLoad adjust size
|
||||
x = X_PART(1);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(12);
|
||||
h = H_PART(22.5);
|
||||
};
|
||||
class CA_PlayerBackground: RscText {
|
||||
//center player's container: decrease height because of progressbar height decrease
|
||||
x = X_PART(14.6);
|
||||
y = Y_PART(2);
|
||||
w = W_PART(24.4);
|
||||
h = H_PART(21.5);
|
||||
};
|
||||
class TitleBackground: RscText {
|
||||
x = X_PART(14.6);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(24.4);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class PlayersName: RscText {
|
||||
x = X_PART(15.6);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(19.8);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class RankBackground: RscText {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(1.25);
|
||||
w = W_PART(0.6);
|
||||
h = H_PART(0.6);
|
||||
};
|
||||
class RankPicture: RscPicture {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(1.25);
|
||||
w = W_PART(0.6);
|
||||
h = H_PART(0.6);
|
||||
};
|
||||
class ButtonBack: RscActiveText {
|
||||
x = X_PART(38);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class BackgroundSlotPrimary: RscPicture {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotPrimaryMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondary: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(11.5);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotSecondaryMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgun: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(17);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotHandgunMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHeadgear: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotGoggles: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotHMD: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotBinoculars: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotMap: BackgroundSlotPrimary {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotGPS: BackgroundSlotPrimary {
|
||||
x = X_PART(17.32);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotCompass: BackgroundSlotPrimary {
|
||||
x = X_PART(21.76);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotRadio: BackgroundSlotPrimary {
|
||||
x = X_PART(19.54);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotWatch: BackgroundSlotPrimary {
|
||||
x = X_PART(23.98);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class ExternalContainerBackground: RscPicture {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(3.7);
|
||||
w = W_PART(11);
|
||||
h = H_PART(18.4);
|
||||
};
|
||||
class PlayerContainerBackground: ExternalContainerBackground {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(14);
|
||||
};
|
||||
class GroundTab: RscActiveText {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(1.5);
|
||||
w = W_PART(5.5);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class SoldierTab: GroundTab {
|
||||
x = X_PART(7);
|
||||
y = Y_PART(1.5);
|
||||
w = W_PART(5.5);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundContainer: RscListBox {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(3.7);
|
||||
w = W_PART(11);
|
||||
h = H_PART(18.4);
|
||||
};
|
||||
class GroundFilter: RscCombo {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(2.6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundLoad: RscProgress {
|
||||
//crate: GroundLoad adjust size
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(22.5);
|
||||
w = W_PART(11);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class SlotPrimary: GroundTab {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotPrimaryMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(9);
|
||||
};
|
||||
class SlotPrimaryFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondary: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(11.5);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotSecondaryMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(14.5);
|
||||
};
|
||||
class SlotSecondaryFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgun: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(17);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotHandgunMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(20);
|
||||
};
|
||||
class SlotHandgunFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHeadgear: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotGoggles: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotHMD: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotBinoculars: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotMap: SlotPrimary {
|
||||
x = X_PART(15.16);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotGPS: SlotPrimary {
|
||||
x = X_PART(17.38);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotCompass: SlotPrimary {
|
||||
x = X_PART(21.82);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotRadio: SlotPrimary {
|
||||
x = X_PART(19.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotWatch: SlotPrimary {
|
||||
x = X_PART(24.04);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class UniformTab: GroundTab {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class UniformSlot: SlotPrimary {
|
||||
x = X_PART(15.35);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class UniformLoad: GroundLoad {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class UniformContainer: GroundContainer {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(14);
|
||||
};
|
||||
class VestTab: UniformTab {
|
||||
x = X_PART(18.85);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class VestSlot: SlotPrimary {
|
||||
x = X_PART(19.1);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class VestLoad: GroundLoad {
|
||||
x = X_PART(18.85);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class BackpackTab: UniformTab {
|
||||
x = X_PART(22.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackpackSlot: SlotPrimary {
|
||||
x = X_PART(22.85);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackpackLoad: GroundLoad {
|
||||
x = X_PART(22.6);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class TotalLoad: GroundLoad {
|
||||
//center: progressbar height decrease
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(22.5);
|
||||
w = W_PART(23.4);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class ContainerMarker: GroundTab {
|
||||
x = X_PART(0);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundMarker: ContainerMarker {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class SoldierMarker: ContainerMarker {
|
||||
x = X_PART(3);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
};
|
||||
};
|
@ -12,503 +12,16 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "RscDisplayInventory.hpp"
|
||||
|
||||
class RscText;
|
||||
class RscPicture;
|
||||
class RscListBox;
|
||||
class RscProgress;
|
||||
class RscStructuredText;
|
||||
class RscActiveText;
|
||||
class RscCombo;
|
||||
class RscControlsGroupNoScrollbars;
|
||||
|
||||
/*
|
||||
Adjust the scaling of the inventory screen
|
||||
- changes it from scaling based on user's interface size to a static size
|
||||
- text size and row height size are uneffected
|
||||
- also tweaks the height of the two ProgressBars which looked odd scaled up so much
|
||||
*/
|
||||
|
||||
class RscDisplayInventory {
|
||||
class controls {
|
||||
class CA_ContainerBackground: RscText {
|
||||
//crate: GroundLoad adjust size
|
||||
x = "1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "12 * (safeZoneH / 40)";
|
||||
h = "22.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class CA_PlayerBackground: RscText {
|
||||
//center player's container: decrease height because of progressbar height decrease
|
||||
x = "14.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "24.4 * (safeZoneH / 40)";
|
||||
h = "21.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class TitleBackground: RscText {
|
||||
x = "14.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "24.4 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class PlayersName: RscText {
|
||||
text = "Player name:";
|
||||
x = "15.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "19.8 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class RankBackground: RscText {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.25 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "0.6 * (safeZoneH / 40)";
|
||||
h = "0.6 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class RankPicture: RscPicture {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.25 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "0.6 * (safeZoneH / 40)";
|
||||
h = "0.6 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ButtonBack: RscActiveText {
|
||||
x = "38 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimary: RscPicture {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondary: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "11.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgun: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "17 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHeadgear: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotGoggles: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHMD: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotBinoculars: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotMap: BackgroundSlotPrimary {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotGPS: BackgroundSlotPrimary {
|
||||
x = "17.32 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotCompass: BackgroundSlotPrimary {
|
||||
x = "21.76 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotRadio: BackgroundSlotPrimary {
|
||||
x = "19.54 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotWatch: BackgroundSlotPrimary {
|
||||
x = "23.98 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ExternalContainerBackground: RscPicture {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "3.7 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "18.4 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class PlayerContainerBackground: ExternalContainerBackground {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "14 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundTab: RscActiveText {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "5.5 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SoldierTab: GroundTab {
|
||||
x = "7 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "5.5 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundContainer: RscListBox {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "3.7 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "18.4 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundFilter: RscCombo {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundLoad: RscProgress {
|
||||
//crate: GroundLoad adjust size
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "22.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimary: GroundTab {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotPrimaryFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondary: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "11.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotSecondaryFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgun: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "17 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotHandgunFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHeadgear: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotGoggles: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHMD: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotBinoculars: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotMap: SlotPrimary {
|
||||
x = "15.16 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotGPS: SlotPrimary {
|
||||
x = "17.38 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotCompass: SlotPrimary {
|
||||
x = "21.82 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotRadio: SlotPrimary {
|
||||
x = "19.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotWatch: SlotPrimary {
|
||||
x = "24.04 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformTab: GroundTab {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformSlot: SlotPrimary {
|
||||
x = "15.35 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformLoad: GroundLoad {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformContainer: GroundContainer {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "14 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestTab: UniformTab {
|
||||
x = "18.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestSlot: SlotPrimary {
|
||||
x = "19.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestLoad: GroundLoad {
|
||||
x = "18.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackTab: UniformTab {
|
||||
x = "22.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackSlot: SlotPrimary {
|
||||
x = "22.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackLoad: GroundLoad {
|
||||
x = "22.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class TotalLoad: GroundLoad {
|
||||
//center: progressbar height decrease
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "22.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "23.4 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ContainerMarker: GroundTab {
|
||||
x = "0 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundMarker: ContainerMarker {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SoldierMarker: ContainerMarker {
|
||||
x = "3 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ACE_Settings {
|
||||
class GVAR(inventoryDisplaySize) {
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
isClientSetable = 1;
|
||||
displayName = "$STR_ACE_Inventory_SettingName";
|
||||
description = "$STR_ACE_Inventory_SettingDescription";
|
||||
values[] = {"Normal (Default Size)", "Medium", "Bigger"};
|
||||
};
|
||||
};
|
||||
|
||||
|
12
addons/inventory/stringtable.xml
Normal file
12
addons/inventory/stringtable.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2015-02-13 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Inventory">
|
||||
<Key ID="STR_ACE_Inventory_SettingName">
|
||||
<English>Make Inventory Display Bigger</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Inventory_SettingDescription">
|
||||
<English>Normally inventory display is scaled by UI size. This allows scaling the Inventory UI size up, but doesn't increase font size allowing more rows displayed.</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -4,3 +4,8 @@ class Extended_PreInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) );
|
||||
};
|
||||
};
|
||||
|
@ -1,19 +0,0 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(CutFence) {
|
||||
displayName = "$STR_ACE_logistics_wirecutter_CutFence";
|
||||
condition = QUOTE([_player] call FUNC(canCutFence));
|
||||
statement = QUOTE([_player] call FUNC(cutDownFence));
|
||||
exceptions[] = {};
|
||||
showDisabled = 1;
|
||||
priority = 0;
|
||||
icon = PATHTOF(UI\wirecutter_ca.paa);
|
||||
hotkey = "C";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
5
addons/logistics_wirecutter/XEH_clientInit.sqf
Normal file
5
addons/logistics_wirecutter/XEH_clientInit.sqf
Normal file
@ -0,0 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["interactMenuOpened", {_this call FUNC(interactEH)}] call EFUNC(common,addEventHandler);
|
@ -2,11 +2,11 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(canCutFence);
|
||||
PREP(cutDownFence);
|
||||
PREP(cutDownFenceAbort);
|
||||
PREP(cutDownFenceCallback);
|
||||
PREP(getNearestFence);
|
||||
PREP(interactEH);
|
||||
PREP(isFence);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
requiredAddons[] = {"ace_interact_menu"};
|
||||
author[] = {"gpgpgpgp", "PabstMirror"};
|
||||
authorUrl = "";
|
||||
VERSION_CONFIG;
|
||||
@ -13,6 +13,5 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
@ -1,18 +0,0 @@
|
||||
/* fnc_canCutFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Condition check if player is able to cut a fence.
|
||||
* Checks for "ACE_wirecutter" item and if there is a nearby fence.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Unit to check condition for (player)
|
||||
*
|
||||
* Return value:
|
||||
* BOOL
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
PARAMS_1(_unit);
|
||||
|
||||
("ACE_wirecutter" in (items _unit)) && {!(isNull ([_unit] call FUNC(getNearestFence)))}
|
@ -1,20 +1,31 @@
|
||||
// by gpgpgpgp, edited by commy2
|
||||
/*
|
||||
* Author: gpgpgpgp, edited by commy2, PabstMirror
|
||||
* Starts cutting down a fence
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Fence <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player, berlinWall] call ace_logistics_wirecutter_fnc_cutDownFence
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
private ["_timeToCut"];
|
||||
|
||||
PARAMS_2(_unit,_fenceObject);
|
||||
if (_unit != ACE_player) exitWith {};
|
||||
|
||||
_fenceObject = [ACE_player] call FUNC(getNearestFence);
|
||||
if (isNull _fenceObject) exitWith {};
|
||||
|
||||
_timeToCut = 5;
|
||||
if !([ACE_player] call EFUNC(common,isEngineer)) then {
|
||||
_timeToCut = _timeToCut + 5;
|
||||
};
|
||||
_timeToCut = if ([ACE_player] call EFUNC(common,isEngineer)) then {5} else {10};
|
||||
|
||||
[ACE_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||
|
||||
if (_timeToCut > 4.5) then {
|
||||
if (_timeToCut > 5) then {
|
||||
playSound "ACE_wirecutter_sound_long";
|
||||
} else {
|
||||
playSound "ACE_wirecutter_sound";
|
||||
|
@ -1,4 +1,18 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Stops cutting down fence (reset animation)
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_logistics_wirecutter_fnc_cutDownFenceAbort
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -1,7 +1,22 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Once progressbar is done: Fence is cutdown
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Fence Object <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [aFence] call ace_logistics_wirecutter_fnc_cutDownFenceCallback
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_fenceObject);
|
||||
|
||||
_fenceObject setdamage 1;
|
||||
[localize "STR_ACE_logistics_wirecutter_FenceCut"] call EFUNC(common,displayTextStructured);
|
||||
// [localize "STR_ACE_logistics_wirecutter_FenceCut"] call EFUNC(common,displayTextStructured);
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -1,15 +1,18 @@
|
||||
/* fnc_getNearestFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Gets nearest fence within 5 meters to the unit.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Unit to search for fence objects arround
|
||||
*
|
||||
* Return value:
|
||||
* OBJECT - Nearest object that is a fence, objNull if none found.
|
||||
*/
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Gets nearest fence object (not actully used, left for utility)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <OBJECT>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_logistics_wirecutter_fnc_getNearestFence
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_nearestFence";
|
||||
@ -20,6 +23,6 @@ _nearestFence = objNull;
|
||||
if ((isNull _nearestFence) && {[_x] call FUNC(isFence)}) then {
|
||||
_nearestFence = _x;
|
||||
};
|
||||
} forEach nearestObjects [_unit, [], 5];
|
||||
} forEach nearestObjects [_unit, [], 15];
|
||||
|
||||
_nearestFence
|
||||
|
64
addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Normal file
64
addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* When interact_menu starts rendering (from "interact_keyDown" event)
|
||||
*
|
||||
* Arguments:
|
||||
* Interact Menu Type (0 - world, 1 - self) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [0] call ace_logistics_wirecutter_fnc_interactEH
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_interactionType);
|
||||
|
||||
if (_interactionType != 0) exitWith {};
|
||||
|
||||
//for performance only do stuff it they have a wirecutter item
|
||||
//(if they somehow get one durring keydown they'll just have to reopen)
|
||||
if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
||||
|
||||
[{
|
||||
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper"];
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_3_PVT(_args,_setPosition,_addedHelpers,_fencesHelped);
|
||||
|
||||
if (!EGVAR(interact_menu,keyDown)) then {
|
||||
{deleteVehicle _x;} forEach _addedHelpers;
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
} else {
|
||||
//If play moved >5 meters from last pos, then rescan
|
||||
if (((getPosASL ace_player) distance _setPosition) > 5) then {
|
||||
|
||||
_fncStatement = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
[ace_player, _attachedFence] call FUNC(cutDownFence);
|
||||
};
|
||||
_fncCondition = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items ace_player))})
|
||||
};
|
||||
|
||||
{
|
||||
if (!(_x in _fencesHelped)) then {
|
||||
if ([_x] call FUNC(isFence)) then {
|
||||
_fencesHelped pushBack _x;
|
||||
_helper = "Sign_Sphere25cm_F" createVehicleLocal (getpos _x);
|
||||
[_helper, 0, [""], (localize "STR_ACE_logistics_wirecutter_CutFence"), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), [0,0,0], _fncStatement, _fncCondition, 5] call EFUNC(interact_menu,addAction);
|
||||
_helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]);
|
||||
_helper hideObject true;
|
||||
_helper setVariable [QGVAR(attachedFence), _x];
|
||||
_addedHelpers pushBack _helper;
|
||||
};
|
||||
};
|
||||
} forEach nearestObjects [ace_player, [], 15];
|
||||
|
||||
_args set [0, (getPosASL ace_player)];
|
||||
};
|
||||
};
|
||||
}, 0.1, [((getPosASL ace_player) vectorAdd [-100,0,0]), [], []]] call CBA_fnc_addPerFrameHandler;
|
@ -1,16 +1,19 @@
|
||||
/* fnc_isFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
|
||||
* Call is fairly expensive because of all of the string checking.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Ojbect to test
|
||||
*
|
||||
* Return value:
|
||||
* BOOL
|
||||
*/
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
|
||||
* Call is fairly expensive because of all of the string checking.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: An Object To Test <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Is it a fence <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [aFence] call ace_logistics_wirecutter_fnc_isFence
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//find is case sensitive, so keep everything lowercase
|
||||
@ -27,14 +30,14 @@ _typeOf = toLower (typeOf _object);
|
||||
_returnValue = false;
|
||||
|
||||
if (_typeOf != "") then {
|
||||
_returnValue = _typeOf in (FENCE_A3_TYPENAMES + FENCE_AIA_TYPENAMES);
|
||||
_returnValue = _typeOf in (FENCE_A3_TYPENAMES + FENCE_AIA_TYPENAMES);
|
||||
} else {
|
||||
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
|
||||
{
|
||||
if ((_typeOf find _x) != -1) then {
|
||||
_returnValue = true;
|
||||
};
|
||||
} forEach (FENCE_A3_P3DS + FENCE_AIA_P3DS);
|
||||
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
|
||||
{
|
||||
if ((_typeOf find _x) != -1) then {
|
||||
_returnValue = true;
|
||||
};
|
||||
} forEach (FENCE_A3_P3DS + FENCE_AIA_P3DS);
|
||||
};
|
||||
|
||||
_returnValue
|
||||
|
@ -1,12 +1,11 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
serverInit = QUOTE( call COMPILE_FILE(XEH_preInitServer) );
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
class ADDON {
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
};
|
||||
|
@ -1,67 +1,42 @@
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class Flag;
|
||||
class Flag;
|
||||
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
|
||||
|
||||
class ACE_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = PATHTOF(data\mapToolFixed.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingNormal.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingSmall.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
};
|
||||
|
@ -1,155 +1,28 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
|
||||
class ACE_MapTools {
|
||||
displayName = "$STR_ACE_Map_MapTools_Menu";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
||||
statement = "";
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
enableInside = 1;
|
||||
|
||||
class ACE_MapToolsHide {
|
||||
displayName = "$STR_ACE_Map_MapToolsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_MapToolsShowNormal {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowNormal";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowSmall {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowSmall";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignNorth {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignNorth";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignCompass {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignCompass";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsShow {
|
||||
displayName = "$STR_ACE_Map_MapGpsShow";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsHide {
|
||||
displayName = "$STR_ACE_Map_MapGpsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class ACE_CopyMap {
|
||||
displayName = "$STR_ACE_Map_CopyMap";
|
||||
condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target}));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,15 +0,0 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_MapTools: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_MapTools_Name";
|
||||
descriptionShort = "$STR_ACE_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\maptool_item.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,93 +1,9 @@
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlack""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorBlack")]);
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorRed""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),QUOTE(ColorRed))]);
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorGreen""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorGreen")]);
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlue""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]);
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorYellow""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]);
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorWhite""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]);
|
||||
};
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
};
|
||||
|
@ -1,81 +0,0 @@
|
||||
#define GUI_GRID_X (0)
|
||||
#define GUI_GRID_Y (0)
|
||||
#define GUI_GRID_W (0.025)
|
||||
#define GUI_GRID_H (0.04)
|
||||
|
||||
#define ST_LEFT 0x00
|
||||
#define ST_RIGHT 0x01
|
||||
#define ST_CENTER 0x02
|
||||
|
||||
#define W_gps 0.4025
|
||||
#define H_gps 0.25
|
||||
#define X_gps safeZoneX + safeZoneW - 1.1 * W_gps
|
||||
#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps
|
||||
|
||||
class RscTitles {
|
||||
class RscACE_MapGps {
|
||||
idd = 9855;
|
||||
movingEnable = 1;
|
||||
duration = 3600;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
// onLoad = QUOTE(uiNamespace setVariable [ARR_2(QGVAR(ui_mapGpsDisplay), _this select 0)];);
|
||||
onLoad = "uiNamespace setVariable ['ACE_map_ui_mapGpsDisplay', _this select 0];"; //@todo cbaify this
|
||||
//onUnLoad = "_this call onRscLoad";
|
||||
class controls {
|
||||
class back:RscPicture {
|
||||
x = X_gps;
|
||||
y = Y_gps;
|
||||
w = W_gps;
|
||||
h = H_gps;
|
||||
text = PATHTOF(UI\mapGps.paa);
|
||||
colorBackground[] = {1, 1, 1, 1};
|
||||
};
|
||||
class heading: RscText{
|
||||
idc = 913590;
|
||||
x = X_gps + W_gps * 0.25;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_LEFT;
|
||||
text = "225";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class altitude: RscText{
|
||||
idc = 913591;
|
||||
x = X_gps + W_gps * 0.55;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_RIGHT;
|
||||
text = "55 m";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class coordinates: RscText{
|
||||
idc = 913592;
|
||||
x = X_gps + W_gps * 0.2;
|
||||
y = Y_gps + H_gps * 0.33;
|
||||
w = W_gps * 0.6;
|
||||
h = H_gps * 0.35;
|
||||
style = ST_CENTER;
|
||||
text = "012.3 115.1";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
38
addons/map/MapTweaks.hpp
Normal file
38
addons/map/MapTweaks.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
// Hide Bushes
|
||||
class Bush {
|
||||
icon = "";
|
||||
color[] = {0.450000, 0.640000, 0.330000, 0.0};
|
||||
size = 14;
|
||||
importance = "0.2 * 14 * 0.05";
|
||||
coefMin = 0.250000;
|
||||
coefMax = 4;
|
||||
};
|
||||
|
||||
// Hide Trees
|
||||
class SmallTree {
|
||||
icon = "";
|
||||
color[] = {0.450000, 0.640000, 0.330000, 0.0};
|
||||
size = 12;
|
||||
importance = "0.6 * 12 * 0.05";
|
||||
coefMin = 0.250000;
|
||||
coefMax = 4;
|
||||
};
|
||||
class Tree {
|
||||
icon = "";
|
||||
color[] = {0.450000, 0.640000, 0.330000, 0.0};
|
||||
size = 12;
|
||||
importance = "0.9 * 16 * 0.05";
|
||||
coefMin = 0.250000;
|
||||
coefMax = 4;
|
||||
};
|
||||
|
||||
class Legend {
|
||||
x = SafeZoneX+SafeZoneW-.340;
|
||||
y = SafeZoneY+SafeZoneH-.152;
|
||||
font = "PuristaMedium";
|
||||
w = .340;
|
||||
h = .152;
|
||||
sizeEx = 0.039210;
|
||||
colorBackground[] = {0.906000, 0.901000, 0.880000, 0.5};
|
||||
color[] = {0, 0, 0, 0.75};
|
||||
};
|
@ -1,7 +1,12 @@
|
||||
ace_map
|
||||
=======
|
||||
|
||||
Various tweaks to the in-game map.
|
||||
Various tweaks to the in-game map. Including:
|
||||
- Better map styling (countours, legend, hiding bushes and trees, etc).
|
||||
- Max zoom level (optional)
|
||||
- Map shaking while walking (optional)
|
||||
- Map illumination (optional)
|
||||
- Blufor tracker (optional)
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -1,71 +1,22 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith{};
|
||||
ADDON = false;
|
||||
LOG(MSG_INIT);
|
||||
|
||||
// Init variables
|
||||
GVAR(mapVisableLastFrame) = false;
|
||||
GVAR(mapGpsShow) = true;
|
||||
// Calculate the maximum zoom allowed for this map
|
||||
call FUNC(determineZoom);
|
||||
|
||||
GVAR(mapTool_Shown) = 0;
|
||||
GVAR(mapTool_pos) = [0,0];
|
||||
GVAR(mapTool_angle) = 0;
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_lineMarkers) = [];
|
||||
GVAR(drawing_drawColor) = "ColorBlack";
|
||||
GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
//Probably need this spawn, because CBA_fnc_addPerFrameHandler doesn't work durring breifing.
|
||||
// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is.
|
||||
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
||||
[] spawn {
|
||||
_fnc_installMapEvents = {
|
||||
_d = _this;
|
||||
diag_log format ["Installing EH in display %1", _d];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
||||
};
|
||||
// Wait until the map display is detected
|
||||
waitUntil {(!isNull findDisplay 12)};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
||||
GVAR(lastStillTime) = time;
|
||||
GVAR(isShaking) = false;
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
GVAR(drawing_syncMarkers) = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call _fnc_installMapEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call _fnc_installMapEvents;
|
||||
} else {
|
||||
37 call _fnc_installMapEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
{
|
||||
_x call FUNC(addLineMarker);
|
||||
} forEach GVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
12 call _fnc_installMapEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
|
||||
[FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}];
|
||||
};
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,35 +1,12 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
LOG(MSG_INIT);
|
||||
|
||||
PREP(addLineMarker);
|
||||
PREP(blueForceTrackingModule);
|
||||
PREP(blueForceTrackingUpdate);
|
||||
PREP(calculateMapScale);
|
||||
PREP(cancelDrawing);
|
||||
PREP(canDraw);
|
||||
PREP(canUseMapTools);
|
||||
PREP(canUseMapGPS);
|
||||
PREP(copyMapReceiveMarkers);
|
||||
PREP(copyMapRemoteSend);
|
||||
PREP(copyMapStart);
|
||||
PREP(handleKeyDown);
|
||||
PREP(handleMouseButton);
|
||||
PREP(handleMouseMove);
|
||||
PREP(handleMouseZChanged);
|
||||
PREP(isInsideMapTool);
|
||||
PREP(mapStateUpdater);
|
||||
PREP(openMapGps);
|
||||
PREP(openMapGpsUpdate);
|
||||
PREP(removeLineMarker);
|
||||
PREP(updateMapToolMarkers);
|
||||
PREP(updateLineMarker);
|
||||
|
||||
//Add Event Handlers:
|
||||
["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler);
|
||||
PREP(determineMapLight);
|
||||
PREP(determineZoom);
|
||||
PREP(updateMapEffects);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,6 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(drawing_serverLineMarkers) = [];
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
@ -1,15 +1,15 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_MapTools"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","Rocko","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
@ -28,10 +28,6 @@ class ACE_Settings {
|
||||
value = 1.0;
|
||||
typeName = "SCALAR";
|
||||
};
|
||||
class GVAR(EveryoneCanDrawOnBriefing) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(BFT_Enabled) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
@ -40,116 +36,154 @@ class ACE_Settings {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(mapIllumination) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(mapShake) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(mapLimitZoom) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
};
|
||||
|
||||
#include "MapGpsUI.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMarkers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
class RscMapControl {
|
||||
sizeExGrid = 0.032;
|
||||
maxSatelliteAlpha = 0.5;
|
||||
|
||||
// From Arma 2
|
||||
colorTracks[] = {1.0,0.0,0.0,1};
|
||||
colorTracksFill[] = {1.0,1.0,0.0,1};
|
||||
colorRoads[] = {0.0,0.0,0.0,1};
|
||||
colorRoadsFill[] = {1,1,0,1};
|
||||
colorMainRoads[] = {0.0,0.0,0.0,1};
|
||||
colorMainRoadsFill[] = {1,0.6,0.4,1};
|
||||
colorRailWay[] = {0.8,0.2,0,1};
|
||||
|
||||
// From ACE2
|
||||
colorBackground[] = {0.929412, 0.929412, 0.929412, 1.0};
|
||||
colorOutside[] = {0.929412, 0.929412, 0.929412, 1.0};
|
||||
colorCountlines[] = {0.647059, 0.533333, 0.286275, 1};
|
||||
colorMainCountlines[] = {0.858824, 0, 0,1};
|
||||
colorForest[] = {0.6, 0.8, 0.2, 0.25};
|
||||
colorLevels[] = {0.0, 0.0, 0.0, 1.0};
|
||||
colorRocks[] = {0.50, 0.50, 0.50, 0.50};
|
||||
|
||||
sizeExLevel = 0.03;
|
||||
showCountourInterval = 1; // refs #13673
|
||||
|
||||
sizeExGrid = 0.032;
|
||||
};
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// Tweak map styling
|
||||
class controlsBackground {
|
||||
class CA_Map : RscMapControl {
|
||||
#include "MapTweaks.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// DIARY
|
||||
class RscDisplayDiary {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2,37 +2,37 @@
|
||||
|
||||
// Delete last set of markers (always)
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
deleteMarkerLocal _x;
|
||||
} forEach GVAR(BFT_markers);
|
||||
|
||||
|
||||
if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
|
||||
|
||||
_groupsToDrawMarkers = [];
|
||||
_playerSide = call EFUNC(common,playerSide);
|
||||
_groupsToDrawMarkers = [];
|
||||
_playerSide = call EFUNC(common,playerSide);
|
||||
|
||||
if (GVAR(BFT_HideAiGroups)) then {
|
||||
_groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter);
|
||||
} else {
|
||||
_groupsToDrawMarkers = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call EFUNC(common,isPlayer);
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call EFUNC(common,filter);
|
||||
};
|
||||
if !(GVAR(BFT_HideAiGroups)) then {
|
||||
_groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter);
|
||||
} else {
|
||||
_groupsToDrawMarkers = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call EFUNC(common,isPlayer);
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call EFUNC(common,filter);
|
||||
};
|
||||
|
||||
{
|
||||
_markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
|
||||
|
||||
{
|
||||
_markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
_colour = format ["Color%1", side _x];
|
||||
|
||||
_colour = format ["Color%1", side _x];
|
||||
_marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _x);
|
||||
|
||||
_marker = createMarkerLocal [format ["ACE_BFT_%1", _i], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _x);
|
||||
|
||||
GVAR(BFT_markers) pushBack _marker;
|
||||
} forEach _groupsToDrawMarkers;
|
||||
GVAR(BFT_markers) pushBack _marker;
|
||||
} forEach _groupsToDrawMarkers;
|
||||
};
|
||||
|
144
addons/map/functions/fnc_determineMapLight.sqf
Normal file
144
addons/map/functions/fnc_determineMapLight.sqf
Normal file
@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Author: Rocko and CAA-Picard
|
||||
* Calculates the current map illumination for a given unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Does the map needs shading? <BOOL>
|
||||
* 1: Color of the overlay <ARRAY>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_1_PVT(_this,_unit);
|
||||
|
||||
private ["_isEnclosed","_nearObjects","_light","_ll","_flashlight"];
|
||||
|
||||
// Blend two colors
|
||||
_fnc_blendColor = {
|
||||
EXPLODE_3_PVT(_this,_c1,_c2,_alpha);
|
||||
[(_c1 select 0) * (1 - _alpha) + (_c2 select 0) * _alpha,
|
||||
(_c1 select 1) * (1 - _alpha) + (_c2 select 1) * _alpha,
|
||||
(_c1 select 2) * (1 - _alpha) + (_c2 select 2) * _alpha,
|
||||
(_c1 select 3) * (1 - _alpha) + (_c2 select 3) * _alpha]
|
||||
};
|
||||
|
||||
// Ambient light tint depending on time of day
|
||||
_lightTint = switch (true) do {
|
||||
case (sunOrMoon == 1.0) : { [0.5,0.5,0.5,1] };
|
||||
case (sunOrMoon > 0.80) : {[[1.0 - overcast,0.2,0,1], [1,1,1,1], (sunOrMoon - 0.8)/0.2] call _fnc_blendColor};
|
||||
case (sunOrMoon > 0.50) : {[[0,0,0.1,1], [1.0 - overcast,0.2,0,1], (sunOrMoon - 0.5)/0.3] call _fnc_blendColor};
|
||||
case (sunOrMoon <= 0.5) : { [0,0,0.1,1] };
|
||||
};
|
||||
|
||||
// Calculates overlay color from tint and light level
|
||||
_fnc_calcColor = {
|
||||
EXPLODE_2_PVT(_this,_c1,_lightLevel);
|
||||
|
||||
if (_lightLevel < 0.5) then {
|
||||
_l = _lightLevel / 0.5;
|
||||
[(_c1 select 0) * _l,
|
||||
(_c1 select 1) * _l,
|
||||
(_c1 select 2) * _l,
|
||||
(_c1 select 3) * (1 - _lightLevel)]
|
||||
} else {
|
||||
_l = (_lightLevel - 0.5) / 0.5;
|
||||
[(_c1 select 0) * (1 - _l) + _l,
|
||||
(_c1 select 1) * (1 - _l) + _l,
|
||||
(_c1 select 2) * (1 - _l) + _l,
|
||||
(_c1 select 3) * (1 - _lightLevel)]
|
||||
};
|
||||
};
|
||||
|
||||
_lightLevel = 0.04 + (0.96 * call EFUNC(common,ambientBrightness));
|
||||
|
||||
// check if player has NVG enabled
|
||||
if (currentVisionMode _unit == 1) exitWith {
|
||||
// stick to nvg color
|
||||
[true, [154/255,253/255,177/255,0.5]]
|
||||
};
|
||||
|
||||
// Do not obscure the map if the ambient light level is above 0.95
|
||||
if (_lightLevel > 0.95) exitWith {
|
||||
[false, [0.5,0.5,0.5,0]]
|
||||
};
|
||||
|
||||
// Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination)
|
||||
if (vehicle _unit != _unit) then {
|
||||
// Player is in a vehicle
|
||||
if ((vehicle _unit) isKindOf "Tank") then {
|
||||
_isEnclosed = true;
|
||||
};
|
||||
};
|
||||
if (_isEnclosed) exitWith {
|
||||
TRACE_1("Player in a enclosed vehicle","");
|
||||
[false, [1,1,1,0]]
|
||||
};
|
||||
|
||||
// Player is not in a vehicle
|
||||
TRACE_1("Player is on foot or in an open vehicle","");
|
||||
|
||||
// Check if player is near a campfires, lights or vehicles with lights on - 15m
|
||||
_nearObjects = [nearestObjects [_unit, ["All"], 15], {(inflamed _this) || (isLightOn _this)}] call EFUNC(common,filter);
|
||||
if (count (_nearObjects) > 0) then {
|
||||
_light = _nearObjects select 0;
|
||||
|
||||
_ll = (1 - (((((_unit distance _light) - 5)/10) max 0) min 1));
|
||||
if (_ll > _lightLevel) then {
|
||||
_lightLevel = _ll;
|
||||
TRACE_1("player near campfire","");
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Gun with light
|
||||
_nearObjects = [nearestObjects [_unit, ["CAManBase"], 10], { _this isFlashlightOn (currentWeapon _this)}] call EFUNC(common,filter);
|
||||
if (count (_nearObjects) > 0) then {
|
||||
_light = (_nearObjects select 0);
|
||||
_flashlight = (_light weaponAccessories currentMuzzle _light) select 1;
|
||||
|
||||
// Check if it's a day laser
|
||||
if (_flashlight == "ACE_acc_pointer_red") exitWith {};
|
||||
if (_flashlight == "ACE_acc_pointer_green") exitWith {};
|
||||
|
||||
_lightLevel = _lightLevel max (1 - (((((_unit distance _light) - 2)/8) max 0) min 1));
|
||||
TRACE_1("Using gun light","");
|
||||
};
|
||||
|
||||
|
||||
// @todo: Illumination flares (timed)
|
||||
|
||||
|
||||
// Using chemlights
|
||||
_nearObjects = [_unit nearObjects ["SmokeShell", 4], {
|
||||
alive _this && {(typeOf _this == "Chemlight_red") || {
|
||||
(typeOf _this == "Chemlight_green") || {
|
||||
(typeOf _this == "Chemlight_blue") || {
|
||||
(typeOf _this == "Chemlight_yellow")}}}}}] call EFUNC(common,filter);
|
||||
if (count (_nearObjects) > 0) then {
|
||||
_light = _nearObjects select 0;
|
||||
|
||||
_ll = (1 - ((((_unit distance _light) - 2)/2) max 0)) * 0.4;
|
||||
if (_ll > _lightLevel) then {
|
||||
_flareTint = switch (typeOf _light) do {
|
||||
case "Chemlight_red" : {[1,0,0,1]};
|
||||
case "Chemlight_green" : {[0,1,0,1]};
|
||||
case "Chemlight_blue" : {[0,0,1,1]};
|
||||
case "Chemlight_yellow" : {[1,1,0,1]};
|
||||
};
|
||||
_lightTint = [_lightTint, _flareTint, (_ll - _lightLevel)/(1 - _lightLevel)] call _fnc_blendColor;
|
||||
_lightLevel = _ll;
|
||||
TRACE_1("player near chemlight","");
|
||||
};
|
||||
};
|
||||
|
||||
// Do not obscure the map if the ambient light level is above 0.95
|
||||
if (_lightLevel > 0.95) exitWith {
|
||||
[false, [0.5,0.5,0.5,0]]
|
||||
};
|
||||
|
||||
// Calculate resulting map color
|
||||
[true, [_lightTint, _lightLevel] call _fnc_calcColor]
|
43
addons/map/functions/fnc_determineZoom.sqf
Normal file
43
addons/map/functions/fnc_determineZoom.sqf
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Author: Rocko
|
||||
* Calculate the maximum zoom level allowed for the current map
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_grids", "_fourSize", "_sixSize", "_continue", "_size"];
|
||||
_grids = configFile >> "CfgWorlds" >> worldName >> "Grid";
|
||||
_fourSize = -1;
|
||||
_sixSize = -1;
|
||||
for "_i" from 1 to 10 do {
|
||||
_continue = false;
|
||||
if (isClass(_grids >> format["Zoom%1", _i])) then {
|
||||
_continue = true;
|
||||
_size = getText(_grids >> format["Zoom%1", _i] >> "formatX");
|
||||
if ((count toArray(_size)) == 2) then {
|
||||
_fourSize = getNumber(_grids >> format["Zoom%1", _i] >> "zoomMax");
|
||||
};
|
||||
if ((count toArray(_size)) == 3) then {
|
||||
_sixSize = getNumber(_grids >> format["Zoom%1", _i] >> "zoomMax");
|
||||
};
|
||||
if (_fourSize != -1 && {_sixSize != -1}) then {
|
||||
_continue = false;
|
||||
};
|
||||
};
|
||||
if (!_continue) exitWith {};
|
||||
};
|
||||
|
||||
if(_fourSize != -1 && {_sixSize != -1}) then {
|
||||
if (isNil QGVAR(minMapSize)) then {
|
||||
GVAR(minMapSize) = _sixSize + 0.01
|
||||
} else {
|
||||
GVAR(minMapSize) = -1
|
||||
};
|
||||
};
|
78
addons/map/functions/fnc_updateMapEffects.sqf
Normal file
78
addons/map/functions/fnc_updateMapEffects.sqf
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Author: Rocko and CAA-Picard
|
||||
* On map draw, updates the effects
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mapCtrl","_mapScale"];
|
||||
|
||||
_mapCtrl = ((findDisplay 12) displayCtrl 51);
|
||||
_mapScale = ctrlMapScale _mapCtrl;
|
||||
|
||||
if (GVAR(mapIllumination)) then {
|
||||
private ["_data","_darkenFill"];
|
||||
|
||||
// Calculate map illumination
|
||||
_data = [[ACE_player], FUNC(determineMapLight), missionNamespace, QGVAR(mapLight), 0.1] call EFUNC(common,cachedCall);
|
||||
|
||||
EXPLODE_2_PVT(_data,_darkenMap,_darkenColor);
|
||||
if (_darkenMap) then {
|
||||
_darkenFill = format["#(rgb,1,1,1)color(%1,%2,%3,%4)",_darkenColor select 0, _darkenColor select 1, _darkenColor select 2, _darkenColor select 3];
|
||||
_mapCtrl drawRectangle [(getArray(configFile >> 'CfgWorlds' >> worldName >> 'centerPosition')),80000,80000,0,_darkenColor,_darkenFill];
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(mapShake)) then {
|
||||
private ["_speed","_amplitude", "_time", "_shakePos"];
|
||||
|
||||
// Only shake map while moving on foot
|
||||
_speed = 0;
|
||||
if (vehicle ACE_player == ACE_player) then {
|
||||
_speed = vectorMagnitude (velocity ACE_player);
|
||||
};
|
||||
|
||||
// If speed is large enough, create anims to shake map
|
||||
if (_speed > 0.1) then {
|
||||
if (ctrlMapAnimDone _mapCtrl) then {
|
||||
|
||||
_amplitude = (_speed - 0.1) / 5 * (1000 * _mapScale);
|
||||
_time = 0.1;
|
||||
|
||||
_shakePos = [(GVAR(lastStillPosition) select 0) + sin((time + _time - GVAR(lastStillTime))*100) * _amplitude * 0.25,
|
||||
(GVAR(lastStillPosition) select 1) + sin((time + _time - GVAR(lastStillTime))*260) * _amplitude];
|
||||
|
||||
_mapCtrl ctrlMapAnimAdd [_time, _mapScale, _shakePos];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
|
||||
GVAR(isShaking) = true;
|
||||
};
|
||||
} else {
|
||||
if (GVAR(isShaking)) then {
|
||||
// Stop shaking, return to original position
|
||||
_mapCtrl ctrlMapAnimAdd [0, _mapScale, GVAR(lastStillPosition)];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
GVAR(isShaking) = false;
|
||||
} else {
|
||||
// The map is still, store state
|
||||
ctrlMapAnimClear _mapCtrl;
|
||||
GVAR(lastStillPosition) = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5];
|
||||
GVAR(lastStillTime) = time;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(mapLimitZoom)) then {
|
||||
if (GVAR(minMapSize) >= _mapScale) then {
|
||||
ctrlMapAnimClear _mapCtrl;
|
||||
_mapCtrl ctrlMapAnimAdd [0, GVAR(minMapSize) + 0.001, (_mapCtrl ctrlMapScreenToWorld [0.5, 0.5])];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
};
|
||||
};
|
@ -2,147 +2,6 @@
|
||||
<!-- Edited with tabler - 2014-12-22 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Map">
|
||||
<Key ID="STR_ACE_MapTools_Name">
|
||||
<English>Map Tools</English>
|
||||
<Spanish>Herramientas de mapa</Spanish>
|
||||
<French>Outils de navigation</French>
|
||||
<Polish>Narzędzia nawigacyjne</Polish>
|
||||
<German>Kartenwerkzeug</German>
|
||||
<Czech>Pomůcky k Mapě</Czech>
|
||||
<Italian>Strumenti Cartografici</Italian>
|
||||
<Portuguese>Ferramentas de Mapa</Portuguese>
|
||||
<Hungarian>Térképészeti eszközök</Hungarian>
|
||||
<Russian>Инструменты карты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_Description">
|
||||
<English>The Map Tools allow you to measure distances and angles on the map.</English>
|
||||
<Spanish>Las herramientas de mapa permiten medir distancias y ángulos en el mapa.</Spanish>
|
||||
<French>Les outils de navigation permettent de mesurer des distances et des angles sur la carte.</French>
|
||||
<Polish>Narzędzia nawigacyjne pozwalają na mierzenie odległości i kątów na mapie.</Polish>
|
||||
<German>Das Kartenwerkzeug erlaubt es dir, Distanzen und Winkel zu messen.</German>
|
||||
<Czech>Pomůcky k mapě slouží k měření vzdáleností a úhlů na mapě.</Czech>
|
||||
<Italian>Gli Strumenti Cartografici ti consentono di misurare distanze ed angoli sulla mappa.</Italian>
|
||||
<Portuguese>As Ferramentas de Mapa permitem que você meça distâncias e ângulos no mapa.</Portuguese>
|
||||
<Hungarian>A térképészeti eszközökkel távolságokat és szögeket tud mérni a térképen.</Hungarian>
|
||||
<Russian>Картографические инструменты позволяют измерять расстояния и углы на карте.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapTools_Menu">
|
||||
<English>Map Tools >></English>
|
||||
<Spanish>Herramientas de mapa >></Spanish>
|
||||
<French>Outils de navigation >></French>
|
||||
<Polish>Narzędzia nawigacyjne >></Polish>
|
||||
<German>Kartenwerkzeug >></German>
|
||||
<Czech>Pomůcky k Mapě >></Czech>
|
||||
<Italian>Strumenti Cartografici >></Italian>
|
||||
<Portuguese>Ferramentas de Mapa >></Portuguese>
|
||||
<Hungarian>Térképészeti eszközök >></Hungarian>
|
||||
<Russian>Инструменты карты >></Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsHide">
|
||||
<English>Hide Map Tool</English>
|
||||
<German>Verstecke Kartenwerkzeug</German>
|
||||
<Spanish>Ocultar herr. de mapa</Spanish>
|
||||
<French>Ranger les outils</French>
|
||||
<Italian>Nascondi Strumenti Cartografici</Italian>
|
||||
<Portuguese>Ocultar Ferramenta de Mapa</Portuguese>
|
||||
<Hungarian>Térképészeti eszközök elrejtése</Hungarian>
|
||||
<Polish>Ukryj narzędzia nawigacyjne</Polish>
|
||||
<Czech>Schovat pomůcku k mapě</Czech>
|
||||
<Russian>Скрыть инструменты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsShowNormal">
|
||||
<English>Show Normal Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (normal)</German>
|
||||
<Spanish>Mostrar herr. de mapa normal</Spanish>
|
||||
<French>Montrer outils normaux</French>
|
||||
<Italian>Visualizza Strumenti Cartografici standard</Italian>
|
||||
<Portuguese>Mostrar Ferramenta de Mapa Padrão</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz megjelenítése (normál méret)</Hungarian>
|
||||
<Polish>Pokaż normalne narzędzia nawigacyjne</Polish>
|
||||
<Czech>Zobrazit normální pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (средн. размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsShowSmall">
|
||||
<English>Show Small Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (klein)</German>
|
||||
<Spanish>Mostrar herr. de mapa pequeñas</Spanish>
|
||||
<French>Montrer petits outils</French>
|
||||
<Italian>Visualizza Strumenti Cartografici piccoli</Italian>
|
||||
<Portuguese>Mostrar Ferramenta de Mapa Pequena</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz megjelenítése (kicsinyített)</Hungarian>
|
||||
<Polish>Pokaż pomniejszone narzędzia nawigacyjne</Polish>
|
||||
<Czech>Zobrazit malou pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (малый размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsAlignNorth">
|
||||
<English>Align Map Tool to North</English>
|
||||
<German>Kartenwerkzeug nach Norden ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa al norte</Spanish>
|
||||
<French>Aligner au nord</French>
|
||||
<Italian>Allinea gli Strumenti Cartografici con il Nord</Italian>
|
||||
<Portuguese>Alinhar Ferramenta de Mapa com o Norte</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz Északhoz állítása</Hungarian>
|
||||
<Polish>Wyrównaj linijkę do północy</Polish>
|
||||
<Czech>Srovnat pomůcku k mapě na sever</Czech>
|
||||
<Russian>Выровнять инструменты на север</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsAlignCompass">
|
||||
<English>Align Map Tool to Compass</English>
|
||||
<German>Kartenwerkzeug am Kompass ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa a la brújula</Spanish>
|
||||
<French>Aligner sur la boussole</French>
|
||||
<Italian>Allinea gli Strumenti Cartografici con la bussola</Italian>
|
||||
<Portuguese>Alinhar Ferramenta de Mapa com a Bússola</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz iránytűhöz állítása</Hungarian>
|
||||
<Polish>Wyrównaj linijkę do kompasu</Polish>
|
||||
<Czech>Srovnat pomůcku k mapě ke kompasu</Czech>
|
||||
<Russian>Выровнять инструменты по компасу</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapGpsShow">
|
||||
<English>Show GPS on Map</English>
|
||||
<German>Zeige GPS auf der Karte</German>
|
||||
<Spanish>Mostrar el GPS sobre el mapa</Spanish>
|
||||
<French>Ranger le GPS</French>
|
||||
<Italian>Visualizza il GPS sulla mappa</Italian>
|
||||
<Portuguese>Mostrar GPS no Mapa</Portuguese>
|
||||
<Hungarian>GPS megjelnítése a térképen</Hungarian>
|
||||
<Polish>Pokaż GPS na mapie</Polish>
|
||||
<Czech>Zobrazit GPS na mapě</Czech>
|
||||
<Russian>Показать GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapGpsHide">
|
||||
<English>Hide GPS on Map</English>
|
||||
<German>Verstecke GPS auf der Karte</German>
|
||||
<Spanish>Ocultar el GPS del mapa</Spanish>
|
||||
<French>Montrer le GPS</French>
|
||||
<Italian>Nascondi il GPS sulla mappa</Italian>
|
||||
<Portuguese>Ocultar GPS no Mapa</Portuguese>
|
||||
<Hungarian>GPS elrejtése térképről</Hungarian>
|
||||
<Polish>Ukryj GPS na mapie</Polish>
|
||||
<Czech>Schovat GPS na mapě</Czech>
|
||||
<Russian>Скрыть GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_CopyMap">
|
||||
<English>Copy Map</English>
|
||||
<German>Karte kopieren</German>
|
||||
<Spanish>Copiar mapa</Spanish>
|
||||
<Russian>Скопировать карту</Russian>
|
||||
<Polish>Kopiuj oznaczenia mapy</Polish>
|
||||
<French>Copier la carte</French>
|
||||
<Czech>Zkopírovat mapu</Czech>
|
||||
<Italian>Copiare Carta</Italian>
|
||||
<Hungarian>Térkép másolása</Hungarian>
|
||||
<Portuguese>Copiar Mapa</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MarkerDirection">
|
||||
<English>Direction: %1°</English>
|
||||
<German>Drehung: %1°</German>
|
||||
<French>Direction: %1°</French>
|
||||
<Czech>Směr: %1°</Czech>
|
||||
<Polish>Kierunek: %1°</Polish>
|
||||
<Spanish>Dirección: %1°</Spanish>
|
||||
<Hungarian>Irány: %1</Hungarian>
|
||||
<Russian>Направление:%1</Russian>
|
||||
</Key>
|
||||
|
||||
</Package>
|
||||
</Project>
|
1
addons/maptools/$PBOPREFIX$
Normal file
1
addons/maptools/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\Addons\map
|
11
addons/maptools/CfgEventHandlers.hpp
Normal file
11
addons/maptools/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
};
|
26
addons/maptools/CfgMarkers.hpp
Normal file
26
addons/maptools/CfgMarkers.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class ACE_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = PATHTOF(data\mapToolFixed.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingNormal.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingSmall.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
};
|
128
addons/maptools/CfgVehicles.hpp
Normal file
128
addons/maptools/CfgVehicles.hpp
Normal file
@ -0,0 +1,128 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
|
||||
class ACE_MapTools {
|
||||
displayName = "$STR_ACE_MapTools_MapTools_Menu";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
||||
statement = "";
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
enableInside = 1;
|
||||
|
||||
class ACE_MapToolsHide {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowNormal {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsShowNormal";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowSmall {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsShowSmall";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignNorth {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsAlignNorth";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignCompass {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsAlignCompass";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsShow {
|
||||
displayName = "$STR_ACE_MapTools_MapGpsShow";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsHide {
|
||||
displayName = "$STR_ACE_MapTools_MapGpsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class ACE_CopyMap {
|
||||
displayName = "$STR_ACE_MapTools_CopyMap";
|
||||
condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target}));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
};
|
15
addons/maptools/CfgWeapons.hpp
Normal file
15
addons/maptools/CfgWeapons.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_MapTools: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_MapTools_Name";
|
||||
descriptionShort = "$STR_ACE_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\maptool_item.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
80
addons/maptools/MapControls.hpp
Normal file
80
addons/maptools/MapControls.hpp
Normal file
@ -0,0 +1,80 @@
|
||||
class controls {
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlack')]);
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorRed')]);
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorGreen')]);
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlue')]);
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorYellow')]);
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorWhite')]);
|
||||
};
|
||||
};
|
79
addons/maptools/MapGpsUI.hpp
Normal file
79
addons/maptools/MapGpsUI.hpp
Normal file
@ -0,0 +1,79 @@
|
||||
#define GUI_GRID_X (0)
|
||||
#define GUI_GRID_Y (0)
|
||||
#define GUI_GRID_W (0.025)
|
||||
#define GUI_GRID_H (0.04)
|
||||
|
||||
#define ST_LEFT 0x00
|
||||
#define ST_RIGHT 0x01
|
||||
#define ST_CENTER 0x02
|
||||
|
||||
#define W_gps 0.4025
|
||||
#define H_gps 0.25
|
||||
#define X_gps safeZoneX + safeZoneW - 1.1 * W_gps
|
||||
#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps
|
||||
|
||||
class RscTitles {
|
||||
class RscACE_MapGps {
|
||||
idd = 9855;
|
||||
movingEnable = 1;
|
||||
duration = 3600;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ui_mapGpsDisplay)), _this select 0)];);
|
||||
class controls {
|
||||
class back:RscPicture {
|
||||
x = X_gps;
|
||||
y = Y_gps;
|
||||
w = W_gps;
|
||||
h = H_gps;
|
||||
text = PATHTOF(UI\mapGps.paa);
|
||||
colorBackground[] = {1, 1, 1, 1};
|
||||
};
|
||||
class heading: RscText{
|
||||
idc = 913590;
|
||||
x = X_gps + W_gps * 0.25;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_LEFT;
|
||||
text = "225";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class altitude: RscText{
|
||||
idc = 913591;
|
||||
x = X_gps + W_gps * 0.55;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_RIGHT;
|
||||
text = "55 m";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class coordinates: RscText{
|
||||
idc = 913592;
|
||||
x = X_gps + W_gps * 0.2;
|
||||
y = Y_gps + H_gps * 0.33;
|
||||
w = W_gps * 0.6;
|
||||
h = H_gps * 0.35;
|
||||
style = ST_CENTER;
|
||||
text = "012.3 115.1";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
14
addons/maptools/README.md
Normal file
14
addons/maptools/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
ace_maptools
|
||||
============
|
||||
|
||||
Map tools:
|
||||
- Roamer
|
||||
- Map drawing
|
||||
- Showing GPS on map
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [NouberNou](https://github.com/NouberNou)
|
BIN
addons/maptools/UI/IconBFTracking_ca.paa
Normal file
BIN
addons/maptools/UI/IconBFTracking_ca.paa
Normal file
Binary file not shown.
71
addons/maptools/XEH_postInitClient.sqf
Normal file
71
addons/maptools/XEH_postInitClient.sqf
Normal file
@ -0,0 +1,71 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// Init variables
|
||||
GVAR(mapVisableLastFrame) = false;
|
||||
GVAR(mapGpsShow) = true;
|
||||
|
||||
GVAR(mapTool_Shown) = 0;
|
||||
GVAR(mapTool_pos) = [0,0];
|
||||
GVAR(mapTool_angle) = 0;
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_lineMarkers) = [];
|
||||
GVAR(drawing_drawColor) = "ColorBlack";
|
||||
GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is.
|
||||
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
||||
[] spawn {
|
||||
_fnc_installMapEvents = {
|
||||
_d = _this;
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
||||
};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
GVAR(drawing_syncMarkers) = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call _fnc_installMapEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call _fnc_installMapEvents;
|
||||
} else {
|
||||
37 call _fnc_installMapEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
{
|
||||
_x call FUNC(addLineMarker);
|
||||
} forEach GVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
12 call _fnc_installMapEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
|
||||
[FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
38
addons/maptools/XEH_preInit.sqf
Normal file
38
addons/maptools/XEH_preInit.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(addLineMarker);
|
||||
PREP(calculateMapScale);
|
||||
PREP(cancelDrawing);
|
||||
PREP(canDraw);
|
||||
PREP(canUseMapTools);
|
||||
PREP(canUseMapGPS);
|
||||
PREP(copyMapReceiveMarkers);
|
||||
PREP(copyMapRemoteSend);
|
||||
PREP(copyMapStart);
|
||||
PREP(handleKeyDown);
|
||||
PREP(handleMouseButton);
|
||||
PREP(handleMouseMove);
|
||||
PREP(handleMouseZChanged);
|
||||
PREP(isInsideMapTool);
|
||||
PREP(mapStateUpdater);
|
||||
PREP(openMapGps);
|
||||
PREP(openMapGpsUpdate);
|
||||
PREP(removeLineMarker);
|
||||
PREP(updateMapToolMarkers);
|
||||
PREP(updateLineMarker);
|
||||
|
||||
if (isServer) then {
|
||||
GVAR(drawing_serverLineMarkers) = [];
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
//Add Event Handlers:
|
||||
["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
ADDON = true;
|
74
addons/maptools/config.cpp
Normal file
74
addons/maptools/config.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_MapTools"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"CAA-Picard"};
|
||||
authorUrl = "https://github.com/esteldunedain/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(EveryoneCanDrawOnBriefing) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
class RscActiveText;
|
||||
class RscPicture;
|
||||
class RscText;
|
||||
class RscObject;
|
||||
class RscButton;
|
||||
class RscButtonMenuOK;
|
||||
class RscButtonMenuCancel;
|
||||
class RscButtonMenu;
|
||||
class RscEdit;
|
||||
|
||||
#include "MapGpsUI.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMarkers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
1
addons/maptools/functions/script_component.hpp
Normal file
1
addons/maptools/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\maptools\script_component.hpp"
|
17
addons/maptools/script_component.hpp
Normal file
17
addons/maptools/script_component.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#define COMPONENT maptools
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_MAPTOOLS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_MAPTOOLS
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAPTOOLS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
|
||||
|
||||
#define MARKERNAME_MAPTOOL_FIXED "ACE_MapToolFixed"
|
||||
#define MARKERNAME_MAPTOOL_ROTATINGNORMAL "ACE_MapToolRotatingNormal"
|
||||
#define MARKERNAME_MAPTOOL_ROTATINGSMALL "ACE_MapToolRotatingSmall"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user