Merge branch 'master' into add-mine-detector

This commit is contained in:
Glowbal 2016-05-03 22:44:16 +02:00
commit 0652978c86
106 changed files with 1540 additions and 508 deletions

View File

@ -88,7 +88,7 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
_bulletTraceVisible = false;
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then {
if (currentWeapon ACE_player == binocular ACE_player) then {
_bulletTraceVisible = true;
} else {
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {

View File

@ -27,27 +27,7 @@ class Extended_Killed_EventHandlers {
//Need initPost or we have problems with setVariable with 'ACE_Cargo'
class Extended_InitPost_EventHandlers {
class StaticWeapon {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ReammoBox_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class Cargo_base_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class CargoNet_01_box_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Land_CargoBox_V1_F {
class ThingX {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
@ -62,32 +42,12 @@ class Extended_InitPost_EventHandlers {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class MetalCase_01_base_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class RoadCone_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Car {
class LandVehicle {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Tank {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Helicopter {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Plane {
class Air {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
@ -97,16 +57,6 @@ class Extended_InitPost_EventHandlers {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class ACE_RepairItem_Base {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ACE_bodyBagObject {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ACE_ConcertinaWireCoil {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));

View File

@ -304,6 +304,25 @@ class CfgVehicles {
GVAR(canLoad) = 1;
};
// Taru pods
class Pod_Heli_Transport_04_base_F;
class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F {
GVAR(space) = 8;
GVAR(hasCargo) = 1;
};
class Land_Pod_Heli_Transport_04_box_F: Pod_Heli_Transport_04_base_F {
GVAR(space) = 20;
GVAR(hasCargo) = 1;
};
class Land_Pod_Heli_Transport_04_medevac_F: Pod_Heli_Transport_04_base_F {
GVAR(space) = 8;
GVAR(hasCargo) = 1;
};
class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F {
GVAR(space) = 12;
GVAR(hasCargo) = 1;
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
GVAR(size) = 2; // 1 = small, 2 = large

View File

@ -20,6 +20,8 @@ TRACE_1("params", _vehicle);
private _type = typeOf _vehicle;
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
if (isServer) then {
{
if (isClass _x) then {
@ -38,7 +40,6 @@ if (_type in GVAR(initializedVehicleClasses)) exitWith {};
GVAR(initializedVehicleClasses) pushBack _type;
if (!hasInterface) exitWith {};
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
TRACE_1("Adding unload cargo action to class", _type);

View File

@ -175,6 +175,7 @@
<Italian>Rendi oggetto caricabile</Italian>
<Spanish>Hacer objeto cargable</Spanish>
<French>Rendre l'objet chargeable</French>
<Czech>Vytvořit objekt nakladatelným</Czech>
</Key>
<Key ID="STR_ACE_Cargo_makeLoadable_description">
<English>Sets the synced object as loadable by the cargo system.</English>
@ -183,6 +184,7 @@
<Italian>Imposta l'oggetto sincronizzato come caricabile dal sistema cargo</Italian>
<Spanish>Sincronizar un objecto para hacerlo cargable.</Spanish>
<French>Rend l'objet synchronisé comme chargeable par le système de cargaison.</French>
<Czech>Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému.</Czech>
</Key>
<Key ID="STR_ACE_Cargo_makeLoadable_setSize_displayName">
<English>Object's Size</English>
@ -191,6 +193,7 @@
<Italian>Dimensioni dell'oggetto</Italian>
<Spanish>Tamaño del objeto</Spanish>
<French>Taille de l'objet</French>
<Czech>Velikost objektu</Czech>
</Key>
</Package>
</Project>
</Project>

View File

@ -133,6 +133,7 @@ if (isServer) then {
["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler);
["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler);
["loadPersonEvent", FUNC(loadPersonLocal)] call FUNC(addEventhandler);
["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler);
["lockVehicle", {
@ -146,6 +147,7 @@ if (isServer) then {
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
["engineOn", {(_this select 0) engineOn (_this select 1)}] call FUNC(addEventhandler);
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);

View File

@ -23,7 +23,7 @@ if (isServer) then {
params ["_eventName", "_client"];
if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
ACE_LOGERROR("Request for synced event - key not found.");
ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName);
false
};

View File

@ -17,7 +17,7 @@
params ["_name", "_args", "_ttl"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Synced event key not found.");
ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
false
};

View File

@ -10,6 +10,9 @@
* Return Value:
* Boolean of success <BOOL>
*
* Example:
* ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler
*
* Public: Yes
*/
#include "script_component.hpp"
@ -17,7 +20,7 @@
params ["_name", "_handler", ["_ttl", 0]];
if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Duplicate synced event creation.");
ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name);
false
};

View File

@ -92,6 +92,15 @@ while {_rangeToCheck < _maxDistance} do {
private _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1];
private _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, (_radiusOfItem + 0.5)];
private _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL];
if (((count _testIntersections) == 1) && {isNull ((_testIntersections select 0) select 2)}) then {
private _hitGroundASL = (_testIntersections select 0) select 0;
private _hitHeightOffset = ((AGLtoASL _roundAGL) select 2) - (_hitGroundASL select 2);
private _hit2dOffset = _roundAGL distance2D _hitGroundASL;
private _slope = _hitHeightOffset atan2 _hit2dOffset;
if (_slope < 25) then { //Ignore ground hit if slope is reasonable
_testIntersections = [];
};
};
if (!(_testIntersections isEqualTo [])) exitWith {
TRACE_2("collision low/high",_roundAGL,_testIntersections);
_roundPointIsValid = false;

View File

@ -21,33 +21,18 @@ private _vehicle = objNull;
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
private _loadcar = nearestObject [_unit, "Car"];
private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F"], 10];
if (_unit distance _loadcar <= 10) then {
_vehicle = _loadcar;
} else {
private _loadair = nearestObject [_unit, "Air"];
if (_unit distance _loadair <= 10) then {
_vehicle = _loadair;
} else {
private _loadtank = nearestObject [_unit, "Tank"];
if (_unit distance _loadtank <= 10) then {
_vehicle = _loadtank;
} else {
private _loadboat = nearestObject [_unit, "Ship_F"];
if (_unit distance _loadboat <= 10) then {
_vehicle = _loadboat;
};
};
{
TRACE_1("",_x);
if ((_x emptyPositions "cargo" > 0) || {_x emptyPositions "gunner" > 0}) exitWith {
_vehicle = _x;
};
};
} forEach _nearVehicles;
if (!isNull _vehicle) then {
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
[[_unit, _vehicle, _caller], QFUNC(loadPersonLocal), _unit, false] call FUNC(execRemoteFnc);
["loadPersonEvent", _unit, [_unit, _vehicle, _caller]] call FUNC(objectEvent);
};
_vehicle

View File

@ -15,7 +15,7 @@
params ["_name"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Synced event key not found.");
ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
false
};

View File

@ -17,7 +17,7 @@
params ["_name", "_args", ["_ttl", 0]];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Synced event key not found.");
ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
false
};

View File

@ -802,6 +802,7 @@
<Italian>Non c'è spazio per scaricare</Italian>
<Spanish>No hay espacio para descargar.</Spanish>
<French>Pas de place pour décharger</French>
<Czech>Nedostatek místa k vyložení</Czech>
</Key>
</Package>
</Project>

View File

@ -86,7 +86,7 @@ class CfgVehicles {
selection = "";
displayName = "$STR_ACE_UNROLLWIRE";
distance = 5;
condition = "true";
condition = "alive _target";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount));
showDisabled = 0;
exceptions[] = {};

View File

@ -14,13 +14,17 @@
*/
#include "script_component.hpp"
params ["_wire", "_killer"];
TRACE_2("params",_wire,_killer);
private ["_distance", "_vehicle"];
if (isNull _killer) then {
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
if (isNull _killer) then {
_killer = nearestObject [_wire, "car"];
private _midPoint = ((_wire selectionPosition "start") vectorAdd (_wire selectionPosition "deploy")) vectorMultiply 0.5;
{
if ((vectorMagnitude velocity _x) > 0) exitWith {_killer = _x};
} forEach (nearestObjects [(_wire modelToWorld _midPoint), ["Car"], 8]);
};
};
if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {};

View File

@ -522,7 +522,7 @@ GVAR(menuRun) = true;
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
};
if (ACE_time - GVAR(busyTimer) > 0.6) then {
if (ACE_player hasWeapon "ACE_Vector") then {
if (({_x isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]} count (weapons ACE_player)) > 0) then {
GVAR(displaySelection) = "VECTOR";
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
GVAR(vectorConnected) = true;

View File

@ -50,8 +50,7 @@ class CfgVehicles {
mapSize = 0.2;
icon = "iconObject_1x2";
model = "\A3\Weapons_f\dummyweapon.p3d";
scope = 2;
scopeCurator = 1;
scope = 1;
vehicleClass = "Cargo";
class ACE_Actions {
class ACE_MainActions {
@ -81,8 +80,7 @@ class CfgVehicles {
mapSize = 0.2;
icon = "iconObject_1x2";
model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d";
scope = 2;
scopeCurator = 1;
scope = 1;
vehicleClass = "Cargo";
class ACE_Actions {
class ACE_MainActions {

View File

@ -648,6 +648,7 @@
<Spanish>Mina M6 SLAM (Ataque Inferior)</Spanish>
<French>Mine M6 SLAM (par le bas)</French>
<Italian>Mina M6 SLAM (base)</Italian>
<Czech>M6 SLAM (Útok zespoda)</Czech>
</Key>
<Key ID="STR_ACE_Explosives_Module_SLAMSideAttack_DisplayName">
<English>M6 SLAM Mine (Side Attack)</English>
@ -663,6 +664,7 @@
<Spanish>Mina M6 SLAM (Ataque Lateral)</Spanish>
<French>Mine M6 SLAM (de flanc)</French>
<Italian> STR_ACE_Explosives_Module_SLAMBottomAttack_DisplayName M6 SLAM Mine (Bottom Attack) Mine M6 SLAM (par le bas) M6-SLAM-Mine (Bodenangriff) Mina M6 SLAM (base) Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Laterale)</Italian>
<Czech>M6 SLAM (Útok do strany)</Czech>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDUrbanBig_Range_DisplayName">
<English>Large IED (Urban, Pressure Plate)</English>
@ -678,6 +680,7 @@
<Spanish>IED Grande (Urbano, Placa de presión)</Spanish>
<French>Grand EEI (Urbain, plaque de pression)</French>
<Italian>IED grande (urbano, a pressione)</Italian>
<Czech>IED, Velké (Městské, Nášlapné)</Czech>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDLandBig_Range_DisplayName">
<English>Large IED (Dug-in, Pressure Plate)</English>
@ -693,6 +696,7 @@
<Spanish>IED Grande (Enterrado, Placa de presión)</Spanish>
<French>Grand EEI (Enterré, plaque de pression)</French>
<Italian>IED grande (interrato, a pressione)</Italian>
<Czech>IED, Velké (Zakopané, Nášlapné)</Czech>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDUrbanSmall_Range_DisplayName">
<English>Small IED (Urban, Pressure Plate)</English>
@ -708,6 +712,7 @@
<Spanish>IED Pequeño (Urbano, Placa de presión)</Spanish>
<French>Petit EEI (Urbain, plaque de pression)</French>
<Italian>IED piccolo (urbano, a pressione)</Italian>
<Czech>IED, Malé (Městské, Nášlapné)</Czech>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDLandSmall_Range_DisplayName">
<English>Small IED (Dug-in, Pressure Plate)</English>
@ -723,6 +728,7 @@
<Spanish>IED Pequeño (Enterrado, Placa de presión)</Spanish>
<French>Petit EEI (Enterré, plaque de pression)</French>
<Italian>IED piccolo (interrato, a pressione)</Italian>
<Czech>IED, Malé (Zakopané, Nášlapné)</Czech>
</Key>
<Key ID="STR_ACE_Explosives_connectInventoryExplosiveToDeadman">
<English>Connect to %1</English>

View File

@ -73,6 +73,10 @@ class CfgVehicles {
class ACE_friesBase: Helicopter_Base_F {
destrType = "";
class Turrets {};
class ACE_Actions {};
class ACE_SelfActions {};
EGVAR(cargo,hasCargo) = 0;
EGVAR(cargo,space) = 0;
};
class ACE_friesAnchorBar: ACE_friesBase {
author = "jokoho48";
@ -205,7 +209,7 @@ class CfgVehicles {
GVAR(enabled) = 2;
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesGantryReverse";
GVAR(friesAttachmentPoint)[] = {1.04, 2.5, -0.34};
GVAR(friesAttachmentPoint)[] = {-1.04, 2.5, -0.34};
EQUIP_FRIES_ATTRIBUTE;
};
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {

View File

@ -1,6 +1,11 @@
#define COMPONENT fastroping
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_FASTROPING
#define DEBUG_MODE_FULL
#endif

View File

@ -8,6 +8,7 @@
<French>Equiper le FRIES</French>
<Spanish>Equipar FRIES</Spanish>
<Italian>Equipaggia la FRIES</Italian>
<Czech>Vybavit FRIES</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Module_FRIES_Description">
<English>Equips compatible helicopters with a Fast Rope Insertion Extraction System.</English>
@ -16,6 +17,7 @@
<French>Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System.</French>
<Spanish>Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope.</Spanish>
<Italian>Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System</Italian>
<Czech>Vybavit kompatibilní vrtulníky systémem Fast Rope Insertion Extraction (FRIES).</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_prepareFRIES">
<English>Prepare fast roping system</English>
@ -24,6 +26,7 @@
<French>Préparer le système de corde lisse</French>
<Spanish>Preparar el sistema fast roping</Spanish>
<Italian>Prepara le corde</Italian>
<Czech>Připravit systém slaňování</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_deployRopes">
<English>Deploy ropes</English>
@ -32,6 +35,7 @@
<French>Déployer les cordes</French>
<Spanish>Desplegar cuerdas</Spanish>
<Italian>Srotola le corde</Italian>
<Czech>Připravit lana</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_fastRope">
<English>Fast rope</English>
@ -40,6 +44,7 @@
<French>Descendre à la corde</French>
<Spanish>Descender por la cuerda</Spanish>
<Italian>Scendi sulla corda</Italian>
<Czech>SLANIT</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_cutRopes">
<English>Cut ropes</English>
@ -48,6 +53,7 @@
<French>Détacher les cordes</French>
<Spanish>Cortar cuerdas</Spanish>
<Italian>Taglia le corde</Italian>
<Czech>Odříznout lano</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES">
<English>Equip helicopter with FRIES</English>
@ -56,6 +62,7 @@
<French>Equiper l'hélicoptère avec le FRIED</French>
<Spanish>Equipar helicoptero con FRIES</Spanish>
<Italian>Equipaggia l'elicottero con FRIES</Italian>
<Czech>Vybavit vrtulník pomocí FRIES</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES_Tooltip">
<English>Equips the selected helicopter with a Fast Rope Insertion Extraction System</English>
@ -64,6 +71,7 @@
<French>Equipe l'hélicoptère sélectionné avec un Fast Rope Insertion Extraction System</French>
<Spanish>Equipa el helicoptero seleccionado con un Sistema de Inserción Extracción Fast Rope</Spanish>
<Italian>Equipaggia l'elicottero selezionato con il Fast Rope Insertion Extraction System</Italian>
<Czech>Vybavit vybraný vrtulník systémem Fast Rope Insertion Extraction (FRIES)</Czech>
</Key>
<Key ID="STR_ACE_Fastroping_Waypoint_Fastrope">
<English>LET UNITS FAST ROPE</English>

View File

@ -13,98 +13,98 @@ class CfgVehicles {
class GVAR(Advance) {
displayName = CSTRING(Advance);
condition = QUOTE(canStand _target);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureAdvance';);
showDisabled = 1;
priority = 1.9;
};
class GVAR(Go) {
displayName = CSTRING(Go);
condition = QUOTE(canStand _target);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
showDisabled = 1;
priority = 1.8;
};
class GVAR(Follow) {
displayName = CSTRING(Follow);
condition = QUOTE(canStand _target);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureFollow';);
showDisabled = 1;
priority = 1.7;
};
class GVAR(Up) {
displayName = CSTRING(Up);
condition = QUOTE(canStand _target);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureUp';);
showDisabled = 1;
priority = 1.5;
};
class GVAR(CeaseFire) {
displayName = CSTRING(CeaseFire);
condition = QUOTE(canStand _target);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
showDisabled = 1;
priority = 1.3;
};
class GVAR(Stop) {
displayName = CSTRING(Stop);
condition = QUOTE(canStand _target);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone
showDisabled = 1;
priority = 1.2;
};
class GVAR(Forward) {
displayName = CSTRING(Forward);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.9;
};
class GVAR(Regroup) {
displayName = CSTRING(Regroup);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.8;
};
class GVAR(Freeze) {
displayName = CSTRING(Freeze);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.7;
};
class GVAR(Cover) {
displayName = CSTRING(Cover);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.6;
};
class GVAR(Point) {
displayName = CSTRING(Point);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.5;
};
class GVAR(Engage) {
displayName = CSTRING(Engage);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.4;
};
class GVAR(Hold) {
displayName = CSTRING(Hold);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.3;
};
class GVAR(Warning) {
displayName = CSTRING(Warning);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.2;

View File

@ -10,9 +10,10 @@ GVAR(ReloadMutex) = true;
_x params ["_currentName", "_key", ["_vanillaKey", false] ];
// Don't add "ace_gestures_" prefix to BI gestures
private _signalName = _currentName;
if (!_vanillaKey) then {
_signalName = format [QGVAR(%1), _currentName];
private _signalName = if (_vanillaKey) then {
format ["BIgesture%1", _currentName];
} else {
format [QGVAR(%1), _currentName];
};
private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName];

View File

@ -0,0 +1,8 @@
class ACE_Settings {
class GVAR(enabledFor) {
displayName = CSTRING(enabledFor_displayName);
typeName = "SCALAR";
value = 1;
values[] = {ECSTRING(Common,Disabled), CSTRING(enabledFor_onlyAircraft), ECSTRING(Common,Enabled)};
};
};

View File

@ -1,2 +1,2 @@
PREP(addPFEH);
PREP(pfhUpdateGForces);

View File

@ -2,14 +2,38 @@
if (!hasInterface) exitWith {};
// Setup ppEffect
GVAR(GForces_CC) = ppEffectCreate ["ColorCorrections", 4215];
GVAR(GForces_CC) ppEffectEnable true;
GVAR(GForces_CC) ppEffectForceInNVG true;
GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];
GVAR(GForces_CC) ppEffectCommit 0.4;
GVAR(pfID) = -1;
GVAR(lastUpdateTime) = 0;
GVAR(oldVel) = [0,0,0];
["SettingsInitialized", {
TRACE_1("SettingsInitialized eh",GVAR(enabledFor));
[DFUNC(pfhUpdateGForces), 0, []] call CBA_fnc_addPerFrameHandler;
if (GVAR(enabledFor) == 0) exitWith {}; //Module has no effect if enabledFor is "None"
if (GVAR(enabledFor) == 2) exitWith { //PFEH is always on when enabledFor is "All"
[] call FUNC(addPFEH);
TRACE_1("adding perm PFEH",GVAR(pfID));
};
//PFEH only runs when player is in a type "Air" vehicle when enabledFor is "Aircraft"
if ((!isNull (vehicle ACE_player)) && {(vehicle ACE_player) isKindOf "Air"}) then { //"playerVehicleChanged" can happen before "settingInit"
[] call FUNC(addPFEH);
TRACE_1("adding temp PFEH [start in]",GVAR(pfID));
};
["playerVehicleChanged", {
params ["", "_vehicle"];
TRACE_2("playerVehicleChanged",_vehicle,typeOf _vehicle);
if (_vehicle isKindOf "Air") then {
if (GVAR(pfID) == -1) then {
[] call FUNC(addPFEH);
TRACE_1("adding temp PFEH",GVAR(pfID));
};
} else {
if (GVAR(pfID) != -1) then {
TRACE_1("removing temp PFEH",GVAR(pfID));
ppEffectDestroy GVAR(GForces_CC);
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
GVAR(pfID) = -1;
};
};
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);

View File

@ -0,0 +1,29 @@
/*
* Author: KoffeinFlummi and esteldunedain
* Adds the PFEH
*
* Argument:
* None
*
* Return value:
* None
*
* Public: No
*/
#include "script_component.hpp"
//Reset forces array
GVAR(GForces) = [];
GVAR(GForces_Index) = 0;
// Setup ppEffect
GVAR(GForces_CC) = ppEffectCreate ["ColorCorrections", 4215];
GVAR(GForces_CC) ppEffectEnable true;
GVAR(GForces_CC) ppEffectForceInNVG true;
GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];
GVAR(GForces_CC) ppEffectCommit 0.4;
GVAR(lastUpdateTime) = 0;
GVAR(oldVel) = [0,0,0];
GVAR(pfID) = [DFUNC(pfhUpdateGForces), 0, []] call CBA_fnc_addPerFrameHandler;

View File

@ -13,14 +13,14 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_params,_pfhId);
// Update the g-forces at constant mission time intervals (taking accTime into account)
if ((ACE_time - GVAR(lastUpdateTime)) < INTERVAL) exitWith {};
GVAR(lastUpdateTime) = ACE_time;
if (isNull ACE_player || !(alive ACE_player)) exitWith {};
BEGIN_COUNTER(everyInterval);
private _newVel = velocity (vehicle ACE_player);
private _accel = ((_newVel vectorDiff GVAR(oldVel)) vectorMultiply (1 / INTERVAL)) vectorAdd [0, 0, 9.8];
// Cap maximum G's to +- 10 to avoid g-effects when the update is low fps.
@ -91,3 +91,5 @@ if !(ACE_player getVariable ["ACE_isUnconscious", false]) then {
};
GVAR(GForces_CC) ppEffectCommit INTERVAL;
END_COUNTER(everyInterval);

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="gforces">
<Key ID="STR_ACE_gforces_enabledFor_displayName">
<English>Gforces Effects</English>
<German>Gforces Effekte</German>
<Spanish>Efectos Gforces</Spanish>
<Czech>G Force efekty</Czech>
</Key>
<Key ID="STR_ACE_gforces_enabledFor_onlyAircraft">
<English>Only Aircraft</English>
<German>Nur Luftfahrzeug</German>
<Spanish>Sólo Aeronave</Spanish>
<Czech>Pouze letadla</Czech>
</Key>
</Package>
</Project>

View File

@ -26,7 +26,7 @@ _effects set [BROKEN, _broken];
SETGLASSES(_unit,_effects);
if (stance _unit != "PRONE") then {
if ((stance _unit != "PRONE") && {primaryWeapon _unit != ""} && {currentWeapon _unit == primaryWeapon _unit}) then {
_unit playActionNow "gestureWipeFace";
};

View File

@ -356,6 +356,7 @@
<German>Aussteigen!</German>
<Spanish>Sal del vehículo!</Spanish>
<French>Sortez !</French>
<Czech>Vystupte</Czech>
</Key>
<Key ID="STR_ACE_Interaction_TeamManagement">
<English>Team Management</English>
@ -712,6 +713,7 @@
<Spanish>Encender</Spanish>
<French>Allumer</French>
<Italian>Accendi</Italian>
<Czech>Zapnout</Czech>
</Key>
<Key ID="STR_ACE_Interaction_TurnOff">
<English>Turn off</English>
@ -720,6 +722,7 @@
<Spanish>Apagar</Spanish>
<French>Eteindre</French>
<Italian>Spegni</Italian>
<Czech>Vypnout</Czech>
</Key>
<Key ID="STR_ACE_Interaction_PassMagazine">
<English>Pass magazine</English>
@ -760,7 +763,7 @@
<Polish>%1 podał Ci magazynek %2.</Polish>
<Russian>%1 передал вам магазин %2.</Russian>
<Portuguese>%1 passou a você um carregador %2.</Portuguese>
<Czech>%1 ti podal %2 zásobník.</Czech>
<Czech>%1 ti podal zásobník %2.</Czech>
<Italian>%1 ti ha passato un caricatore %2 .</Italian>
<Spanish>%1 te pasó un cargador %2.</Spanish>
<French>%1 vous a passé un chargeur %2.</French>

View File

@ -98,8 +98,17 @@ if (_range > 50 && {_range < 2500}) then {
};
};
if (isNull _newTarget) then {
_newTarget = cursorTarget;
if ((isNull _newTarget) && {cursorObject isKindOf "AllVehicles"}) then {
private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorObject, ace_player, cursorObject, true, 1];
if (_intersectionsToCursorTarget isEqualTo []) then {
_newTarget = cursorObject;
};
};
if ((isNull _newTarget) && {cursorTarget isKindOf "AllVehicles"}) then {
private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorTarget, ace_player, cursorTarget, true, 1];
if (_intersectionsToCursorTarget isEqualTo []) then {
_newTarget = cursorTarget;
};
};
// Create constants

View File

@ -27,11 +27,10 @@ _unit setVariable [QGVAR(heartRate), 0];
_timeInCardiacArrest = 120 + round(random(600));
[{
private ["_args","_unit","_startTime","_timeInCardiacArrest","_heartRate"];
params ["_args", "_idPFH"];
_args params ["_unit", "_startTime", "_timeInCardiacArrest"];
_heartRate = _unit getVariable [QGVAR(heartRate), 80];
private _heartRate = _unit getVariable [QGVAR(heartRate), 80];
if (_heartRate > 0 || !alive _unit) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
_unit setVariable [QGVAR(inCardiacArrest), nil,true];

View File

@ -56,6 +56,7 @@
<Polish>Wstrzyknij adenozynę</Polish>
<French>Injecter de l'adénosine</French>
<Italian>Inietta andenosina</Italian>
<Czech>Aplikovat adenosine</Czech>
</Key>
<Key ID="STR_ACE_Medical_Inject_Atropine">
<English>Inject Atropine</English>
@ -256,6 +257,7 @@
<Polish>Wstrzykiwanie adenozyny...</Polish>
<French>Injection d'adénosine...</French>
<Italian>Inietto l'andenosina</Italian>
<Czech>Aplikuji adenosine...</Czech>
</Key>
<Key ID="STR_ACE_Medical_Injecting_Atropine">
<English>Injecting Atropine...</English>
@ -363,14 +365,14 @@
<Italian>Bendaggio compressivo</Italian>
<French>Bandage gauze</French>
<Portuguese>Bandagem de Compressão</Portuguese>
<Czech>Tlakový obvaz</Czech>
<Czech>Obvaz Tlakový</Czech>
</Key>
<Key ID="STR_ACE_Medical_Actions_ElasticBandage">
<English>Elastic Bandage</English>
<German>Elastischer Verband</German>
<Spanish>Vendaje elástico</Spanish>
<Russian>Давящая повязка</Russian>
<Czech>Elastické obinadlo</Czech>
<Czech>Obavaz Elastický</Czech>
<Polish>Bandaż elastyczny</Polish>
<French>Pansement élastique</French>
<Hungarian>Rögzitő kötszer</Hungarian>
@ -831,7 +833,7 @@
<Hungarian>Nyomókötszer</Hungarian>
<Italian>Bendaggio compressivo</Italian>
<Portuguese>Bandagem de Compressão</Portuguese>
<Czech>Tlakový obvaz</Czech>
<Czech>Obvaz (Tlakový)</Czech>
</Key>
<Key ID="STR_ACE_Medical_Packing_Bandage_Desc_Short">
<English>Used to pack medium to large wounds and stem the bleeding</English>
@ -864,7 +866,7 @@
<Spanish>Vendaje (Elástico)</Spanish>
<French>Bandage (Élastique)</French>
<Polish>Bandaż (elastyczny)</Polish>
<Czech>Obvaz (elastický)</Czech>
<Czech>Obvaz (Elastický)</Czech>
<Hungarian>Rögzító kötszer</Hungarian>
<Italian>Benda (elastica)</Italian>
<Portuguese>Bandagem (Elástica)</Portuguese>
@ -936,7 +938,7 @@
<Spanish>Morfina auto-inyectable</Spanish>
<French>Auto-injecteur de Morphine</French>
<Polish>Autostrzykawka z morfiną</Polish>
<Czech>Autoinjektor morfin</Czech>
<Czech>Auto-morfin</Czech>
<Hungarian>Morfium autoinjektor</Hungarian>
<Italian>Autoiniettore di morfina</Italian>
<Portuguese>Auto-injetor de morfina</Portuguese>
@ -972,6 +974,7 @@
<Polish>Autostrzykawka z adenozyną</Polish>
<French>Auto-injécteur d'adénosine</French>
<Italian>Autoiniettore di adenosina</Italian>
<Czech>Auto-adenosine</Czech>
</Key>
<Key ID="STR_ACE_Medical_Adenosine_Desc_Short">
<English>Used to counter effects of Epinephrine</English>
@ -980,6 +983,7 @@
<Polish>Adenozyna. Stosowana do zwalczania efektów działania adrenaliny.</Polish>
<French>Utilisé pour contrer les effets de l'adrénaline</French>
<Italian>Usato per contrastare l'effetto dell'epinefrina</Italian>
<Czech>Slouží jako protiváha Adrenalinu</Czech>
</Key>
<Key ID="STR_ACE_Medical_Adenosine_Desc_Use">
<English>A drug used to counter the effects of Epinephrine</English>
@ -988,6 +992,7 @@
<Polish>Organiczny związek chemiczny z grupy nukleozydów. Skuteczna w leczeniu częstoskurczu komorowego. Działa rozszerzająco na naczynia krwionośne.</Polish>
<French>Un composé utilisé pour contrer les effets de l'adrénaline</French>
<Italian>Medicamento usato per contrastare l'effetto dell'epinefrina</Italian>
<Czech>Droga používaná k tlumení efektu Adrenalinu</Czech>
</Key>
<Key ID="STR_ACE_Medical_Atropine_Display">
<English>Atropine autoinjector</English>
@ -996,7 +1001,7 @@
<French>Auto-injecteur d'Atropine</French>
<Polish>Autostrzykawka AtroPen</Polish>
<German>Atropin-Autoinjektor</German>
<Czech>Autoinjektor atropin</Czech>
<Czech>Auto-atropine</Czech>
<Hungarian>Atropin autoinjektor</Hungarian>
<Italian>Autoiniettore di atropina</Italian>
<Portuguese>Auto-injetor de Atropina</Portuguese>
@ -1032,7 +1037,7 @@
<French>Auto-injecteur d'épinéphrine</French>
<Polish>Autostrzykawka EpiPen</Polish>
<German>Epiniphrin-Autoinjektor</German>
<Czech>Autoinjektor adrenalin</Czech>
<Czech>Auto-adrenalin</Czech>
<Hungarian>Epinefrin autoinjektor</Hungarian>
<Italian>Autoiniettore di adrenalina</Italian>
<Portuguese>Auto-injetor de epinefrina</Portuguese>
@ -1287,7 +1292,7 @@
<Hungarian>Elsősegélycsomag</Hungarian>
<Italian>Pronto soccorso personale</Italian>
<Portuguese>Kit De Primeiros Socorros Pessoal</Portuguese>
<Czech>Osobní lékárnička</Czech>
<Czech>Osobní lékárnička (PAK)</Czech>
</Key>
<Key ID="STR_ACE_Medical_Aid_Kit_Desc_Short">
<English>Includes various treatment kit needed for stitching or advanced treatment</English>
@ -1322,7 +1327,7 @@
<Spanish>Usar equipo de primeros auxilios</Spanish>
<Hungarian>Elsősegélycsomag használata</Hungarian>
<Portuguese>Usar o kit de primeiros socorros</Portuguese>
<Czech>Použít osobní lékárničku</Czech>
<Czech>Použít osobní lékárničku (PAK)</Czech>
<Italian>Usa il pronto soccorso personale</Italian>
</Key>
<Key ID="STR_ACE_Medical_SurgicalKit_Display">
@ -1431,7 +1436,7 @@
<Hungarian>Vérnyomás megmérése...</Hungarian>
<Italian>Controllando la pressione sanguigna..</Italian>
<Portuguese>Aferindo Pressão Arterial...</Portuguese>
<Czech>Kontroluji krevní tlak...</Czech>
<Czech>Měřím krevní tlak...</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Log">
<English>%1 checked Blood Pressure: %2</English>
@ -1442,7 +1447,7 @@
<Polish>%1 sprawdził ciśnienie krwi: %2</Polish>
<Spanish>%1 verificada la presión arterial: %2</Spanish>
<Hungarian>%1 ellenőrizte a vérnyomást: %2</Hungarian>
<Czech>%1 zkontrolován krevní tlak: %2</Czech>
<Czech>%1 zkontroloval krevní tlak: %2</Czech>
<Portuguese>%1 verificou pressão arterial: %2</Portuguese>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Checked_Medic">
@ -1467,7 +1472,7 @@
<Polish>Wyczuwasz ciśnienie krwi o wartości %2/%3</Polish>
<German>Der Blutdruck liegt bei %2/%3</German>
<Portuguese>A Pressão Arterial é de %2/%3</Portuguese>
<Czech>Našel jsi krevní tlak u %2/%3</Czech>
<Czech>Naměřil si krevní tlak u %2/%3</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Output_2">
<English>You find a low blood pressure</English>
@ -1479,7 +1484,7 @@
<Hungarian>A vérnyomás alacsony</Hungarian>
<Italian>La pressione sanguigna è bassa</Italian>
<Portuguese>Pressão Arterial baixa</Portuguese>
<Czech>Naměřil jsi nízký krevní tlak</Czech>
<Czech>Naměřil si nízký krevní tlak</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Output_3">
<English>You find a normal blood pressure</English>
@ -1491,7 +1496,7 @@
<Hungarian>A vérnyomás normális</Hungarian>
<Italian>La pressione sanguigna è normale</Italian>
<Portuguese>Pressão Arterial normal</Portuguese>
<Czech>Naměřil jsi normální krevní tlak</Czech>
<Czech>Naměřil si normální krevní tlak</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Output_4">
<English>You find a high blood pressure</English>
@ -1503,7 +1508,7 @@
<Hungarian>A vérnyomás magas</Hungarian>
<Italian>La pressione sanguigna è alta</Italian>
<Portuguese>Pressão Arterial Alta</Portuguese>
<Czech>Naměřil jsi vysoký krevní tlak</Czech>
<Czech>Naměřil si vysoký krevní tlak</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Output_5">
<English>You find no blood pressure</English>
@ -1515,7 +1520,7 @@
<Hungarian>Nem észlelhető vérnyomás</Hungarian>
<Italian>La pressione sanguigna è assente</Italian>
<Portuguese>Sem Pressão Arterial</Portuguese>
<Czech>Nenaměřil jsi žádný krevní tlak</Czech>
<Czech>Nenaměřil si žádný krevní tlak</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Output_6">
<English>You fail to find a blood pressure</English>
@ -1527,7 +1532,7 @@
<Hungarian>Nem sikerült a vérnyomás megmérése</Hungarian>
<Italian>Manca strumento per misurare pressione sanguigna</Italian>
<Portuguese>Você falhou em aferir a Pressão Arterial</Portuguese>
<Czech>Nedokázal jsi změřit krevní tlak</Czech>
<Czech>Nedokázal si změřit krevní tlak</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Bloodpressure_Low">
<English>Low</English>
@ -1587,7 +1592,7 @@
<Hungarian>Pulzus</Hungarian>
<Italian>Polso</Italian>
<Portuguese>Pulso</Portuguese>
<Czech>Tep</Czech>
<Czech>Puls</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Pulse_Content">
<English>Checking Heart Rate...</English>
@ -1611,7 +1616,7 @@
<Hungarian>A %1 ellenőrizve</Hungarian>
<Italian>Hai diagnosticato %1</Italian>
<Portuguese>Você aferiu o paciente %1</Portuguese>
<Czech>Zkontroloval jsi %1</Czech>
<Czech>Zkontroloval si %1</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Pulse_Log">
<English>%1 checked Heart Rate: %2</English>
@ -1695,7 +1700,7 @@
<Hungarian>A szívverés-szám alacsony</Hungarian>
<Italian>Hai riscontrato un debole battito cardiaco</Italian>
<Portuguese>Freqüência Cardíaca baixa</Portuguese>
<Czech>Nahmatal jsi slabý srdeční tep</Czech>
<Czech>Nahmatal si slabý srdeční puls</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Pulse_Output_3">
<English>You find a strong Heart Rate</English>
@ -1707,7 +1712,7 @@
<Hungarian>A szívverés-szám magas</Hungarian>
<Italian>Hai riscontrato un forte battito cardiaco</Italian>
<Portuguese>Freqüência Cardíaca normal</Portuguese>
<Czech>Nahmatal jsi silný srdeční tep</Czech>
<Czech>Nahmatal si silný srdeční puls</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Pulse_Output_4">
<English>You find a normal Heart Rate</English>
@ -1719,7 +1724,7 @@
<Hungarian>A szívverés-szám normális</Hungarian>
<Italian>Hai riscontrato un normale battito cardiaco</Italian>
<Portuguese>Freqüência Cardíaca alta</Portuguese>
<Czech>Nahmatal jsi normální srdeční tep</Czech>
<Czech>Nahmatal si normální srdeční puls</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Pulse_Output_5">
<English>You find no Heart Rate</English>
@ -1731,7 +1736,7 @@
<Hungarian>Nem észlelhető szívverés</Hungarian>
<Italian>Hai riscontrato una assenza di battito cardiaco</Italian>
<Portuguese>Sem Freqüência Cardíaca</Portuguese>
<Czech>Nenašel jsi </Czech>
<Czech>Žádný puls</Czech>
</Key>
<Key ID="STR_ACE_Medical_Check_Response">
<English>Response</English>
@ -2172,7 +2177,7 @@
<Spanish>Gravemente herido</Spanish>
<French>Lourdement blessé</French>
<Hungarian>Erősen sérült</Hungarian>
<Czech>Těžce zraněn</Czech>
<Czech>Těžce raněn</Czech>
<Portuguese>Gravemente ferido</Portuguese>
</Key>
<Key ID="STR_ACE_Medical_LightlyWounded">
@ -2184,7 +2189,7 @@
<Spanish>Levemente herido</Spanish>
<French>Légèrement blessé</French>
<Hungarian>Enyhén sérült</Hungarian>
<Czech>Lehce zraněn</Czech>
<Czech>Lehce raněn</Czech>
<Portuguese>Levemente ferido</Portuguese>
</Key>
<Key ID="STR_ACE_Medical_VeryLightlyWounded">
@ -2196,7 +2201,7 @@
<Spanish>Muy levemente herido</Spanish>
<French>Très légèrement blessé</French>
<Hungarian>Nagyon enyhén sérült</Hungarian>
<Czech>Velmi lehce zraněn</Czech>
<Czech>Velmi lehce raněn</Czech>
<Portuguese>Muito levemente ferido</Portuguese>
</Key>
<Key ID="STR_ACE_Medical_Head">
@ -3205,6 +3210,7 @@
<Spanish>Ajustes médicos básicos [ACE]</Spanish>
<French>Réglages du système médical basic [ACE]</French>
<Italian>Impostazioni Mediche Di Base [ACE]</Italian>
<Czech>Základní zdravotnické nastavení [ACE]</Czech>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_Module_DisplayName">
<English>Advanced Medical Settings [ACE]</English>
@ -3321,6 +3327,7 @@
<Polish>Ograniczenia adrenaliny</Polish>
<French>Autoriser l'adrénaline</French>
<Italian>Permette epinefrina</Italian>
<Czech>Povolit adrenalin</Czech>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_medicSetting_basicEpi_Description">
<English>Who can use Epinephrine for full heal? (Basic medical only)</English>
@ -3329,6 +3336,7 @@
<Polish>Kto może skorzystać z adrenaliny w celu pełnego uleczenia? (Tylko podstawowy system medyczny)</Polish>
<French>Qui peut utiliser l'adrénaline pour les soins complets ? (Médical basique seulement)</French>
<Italian>Chi può usare l'epinefrina per la cura completa? (solo per sistema medico di base)</Italian>
<Czech>Kdo může použít adrenalin k úplnému vyléčení? (Pouze základní zdravotní systém)</Czech>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_medicSetting_PAK_DisplayName">
<English>Allow PAK</English>
@ -3336,7 +3344,7 @@
<Polish>Ustawienie apteczek osobistych</Polish>
<Spanish>Permitir EPA</Spanish>
<German>Erlaube Erste-Hilfe-Set</German>
<Czech>Povolit osobní lékárničky</Czech>
<Czech>Povolit osobní lékárničky (PAK)</Czech>
<Portuguese>Permitir Kit de Primeiros Socorros</Portuguese>
<French>Permettre le kit de premier secours</French>
<Hungarian>Elsősegélycsomag engedélyezése</Hungarian>
@ -3421,6 +3429,7 @@
<Polish>Ograniczenia adrenaliny</Polish>
<French>Position des adrénalines</French>
<Italian>Ubicazione epinefrina</Italian>
<Czech>Oblast k použití adrenalinu</Czech>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_useLocation_basicEpi_Description">
<English>Where can the Epinephrine be used? (Basic Medical)</English>
@ -3429,6 +3438,7 @@
<Polish>Gdzie można korzystać z adrenaliny? (Podstawowy system medyczny)</Polish>
<French>Où peuvent être utilisées les adrénalines ? (Médical basique)</French>
<Italian>Dove si può usare l'epinefrina? (Sistema medico di base)</Italian>
<Czech>Kde může být použit adrenalin? (Pouze základní zdravotní systém)</Czech>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_useLocation_PAK_DisplayName">
<English>Locations PAK</English>
@ -3436,7 +3446,7 @@
<Polish>Ograniczenie apteczek osobistych</Polish>
<Spanish>Ubicaciones del EPA</Spanish>
<German>Orte für Erste-Hilfe-Set</German>
<Czech>Lokace osobní lékárničky</Czech>
<Czech>Oblast k použití PAK</Czech>
<Portuguese>Localizações do KPS</Portuguese>
<French>Lieu d'utilisation du KPS</French>
<Hungarian>Elsősegélycsomag helyek</Hungarian>
@ -3448,7 +3458,7 @@
<Polish>Gdzie można korzystać z apteczek osobistych?</Polish>
<Spanish>¿Dónde se puede utilizar el equipo de primeros auxilios?</Spanish>
<German>Wo kann das Erste-Hilfe-Set verwendet werden?</German>
<Czech>Kde může být použita osobní lékárnička?</Czech>
<Czech>Kde může být použita osobní lékárnička (PAK)?</Czech>
<Portuguese>Onde o kit de primeiros socorros pode ser utilizado?</Portuguese>
<French>Où le Kit de Premier Secour peut être utilisé</French>
<Hungarian>Hol lehet az elsősegélycsomagot használni?</Hungarian>
@ -3457,7 +3467,7 @@
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_useCondition_PAK_DisplayName">
<English>Condition PAK</English>
<German>Bedingungen für d. Erste-Hilfe-Set</German>
<Czech>Podmínka osobní lékárničky</Czech>
<Czech>Podmínky pro použití osobní lékárničky</Czech>
<Spanish>Condición EPA</Spanish>
<French>Condition d'utilisation du KPS</French>
<Polish>Warunek apteczek</Polish>
@ -3469,7 +3479,7 @@
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_useCondition_PAK_Description">
<English>When can the PAK be used?</English>
<German>Wann kann das Erste-Hilfe-Set verwendet werden?</German>
<Czech>Kde může být použita osobní lékárnička?</Czech>
<Czech>Kdy může být použita osobní lékárnička?</Czech>
<Spanish>¿Cuando se puede utilizar el Equipo de primeros auxilios?</Spanish>
<French>Quand peut être utilisé le Kit de Premier Secours</French>
<Polish>Po spełnieniu jakich warunków apteczka osobista może zostać zastosowana na pacjencie?</Polish>
@ -3484,7 +3494,7 @@
<Polish>Wszędzie</Polish>
<Spanish>Donde sea</Spanish>
<German>Überall</German>
<Czech>Kdekoli</Czech>
<Czech>Kdekoliv</Czech>
<Portuguese>Qualquer lugar</Portuguese>
<French>PArtout</French>
<Hungarian>Akárhol</Hungarian>
@ -4124,6 +4134,7 @@
<German>Sanitätsausbildung</German>
<Spanish>Entrenamiento médico</Spanish>
<French>Entraînement médical</French>
<Czech>Lékařský výcvik</Czech>
</Key>
<Key ID="STR_ACE_Medical_Attributes_isMedicalVehicle_Description">
<English>Whether or not the object will be a medical vehicle.</English>
@ -4137,6 +4148,7 @@
<English>Delay cease fire of AI while player is unconscious for medical reasons.</English>
<German>Verzögert das Ende des KI-Beschusses auf einen Spieler, wenn dieser aus medizinischen Gründen bewustlos wird.</German>
<Italian>Ritarda il cessate il fuoco dell'IA quando il giocatore è svenuto per motivi medici.</Italian>
<Czech>Prodleva zastavení palby pro AI, pokud je hráč v bezvědomí ze zdravotních důvodů.</Czech>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_delayUnconCaptive_DisplayName">
<English>Delay cease fire of AI for unconsciousness</English>
@ -4144,6 +4156,7 @@
<Spanish>Demora antes de volverse neutral al caer inconsciente</Spanish>
<Polish>Opóźnij status captive u nieprzytomnych osób</Polish>
<Italian>Ritarda il cessate il fuoco dell'IA quando si è svenuti</Italian>
<Czech>Prodleva zastavení palby AI na bezvědomé</Czech>
</Key>
</Package>
</Project>

View File

@ -295,7 +295,7 @@
<French>Selectioner Bras Gauche</French>
<Polish>Wybierz lewą rękę</Polish>
<Portuguese>Selecionar Braço Esquerdo</Portuguese>
<Czech>Vybrat Levou Ruku</Czech>
<Czech>Vybrat Levou ruku</Czech>
<Italian>Seleziona Braccio Sinistro</Italian>
</Key>
<Key ID="STR_ACE_Medical_Menu_SELECT_ARM_R">
@ -306,7 +306,7 @@
<French>Selectioner Bras Droit</French>
<Polish>Wybierz prawą rękę</Polish>
<Portuguese>Selecionar Braço Direito</Portuguese>
<Czech>Vybrat Pravou Ruku</Czech>
<Czech>Vybrat Pravou ruku</Czech>
<Italian>Seleziona Braccio Destro</Italian>
</Key>
<Key ID="STR_ACE_Medical_Menu_SELECT_LEG_L">
@ -317,7 +317,7 @@
<French>Selectioner Jambe Gauche</French>
<Polish>Wybierz lewą nogę</Polish>
<Portuguese>Selecionar Perna Esquerda</Portuguese>
<Czech>Vybrat Levou Nohu</Czech>
<Czech>Vybrat Levou nohu</Czech>
<Italian>Seleziona Gamba Sinistra</Italian>
</Key>
<Key ID="STR_ACE_Medical_Menu_SELECT_LEG_R">
@ -328,7 +328,7 @@
<French>Selectioner Jambe Droite</French>
<Polish>Wybierz prawą nogę</Polish>
<Portuguese>Selecionar Perna Direita</Portuguese>
<Czech>Vybrat Pravou Nohu</Czech>
<Czech>Vybrat Pravou nohu</Czech>
<Italian>Seleziona Gamba Destra</Italian>
</Key>
<Key ID="STR_ACE_Medical_Menu_HEAD">
@ -581,7 +581,7 @@
<French>A Perdu Bcp de Sang</French>
<Polish>Stracił dużo krwi</Polish>
<Portuguese>Perdeu muito sangue</Portuguese>
<Czech>Ztratil hodně Krve</Czech>
<Czech>Ztratil hodně krve</Czech>
<Italian>Perso molto Sangue</Italian>
</Key>
<Key ID="STR_ACE_Medical_Menu_STATUS_TOURNIQUET_APPLIED">

View File

@ -114,7 +114,7 @@
<Polish>Tylko gracz</Polish>
<Spanish>Solo jugador</Spanish>
<German>Nur Spieler</German>
<Czech>Pouze hráči</Czech>
<Czech>Pouze hráč</Czech>
<Portuguese>Somente jogador</Portuguese>
<French>Seulement les joueurs</French>
<Hungarian>Csak játékosok</Hungarian>
@ -126,7 +126,7 @@
<Polish>Gracz oraz AI</Polish>
<Spanish>Jugador e IA</Spanish>
<German>Spieler und KI</German>
<Czech>Hráči a AI</Czech>
<Czech>Hráč a AI</Czech>
<Portuguese>Jogador e IA</Portuguese>
<French>Joueurs et IA</French>
<Hungarian>Játékosok és AI</Hungarian>

View File

@ -167,6 +167,7 @@
<Polish>Wyładuj pocisk</Polish>
<French>Enlever l'obus</French>
<Italian>Togli proiettile</Italian>
<Czech>Odstranit náboj</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_loadMortar">
<English>Load Mortar</English>
@ -175,6 +176,7 @@
<Polish>Załaduj moździerz</Polish>
<French>Charger le mortier</French>
<Italian>Carica mortaio</Italian>
<Czech>Nabít minomet</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_unloadingMortar">
<English>Unloading Round</English>
@ -191,6 +193,7 @@
<Polish>Przygotowywanie pocisku</Polish>
<French>Praparation de l'obus</French>
<Italian>Prepara il proiettile</Italian>
<Czech>Připavuji náboj</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_loadMagazine_HE">
<English>Load HE</English>
@ -199,6 +202,7 @@
<Polish>Załaduj pocisk wybuchowy</Polish>
<French>Charger HE</French>
<Italian>Carica proiettile esplosivo ad alto potenziale (HE)</Italian>
<Czech>Nabít HE</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_loadMagazine_Smoke">
<English>Load Smoke</English>
@ -207,6 +211,7 @@
<Polish>Załaduj pocisk dymny</Polish>
<French>Charger Fumigène</French>
<Italian>Carica fumogeno</Italian>
<Czech>Nabít Dýmovnici</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_loadMagazine_Illum">
<English>Load Illumination</English>
@ -215,6 +220,7 @@
<Polish>Załaduj pocisk oświetlający</Polish>
<French>Charger Eclairante</French>
<Italian>Carica illuminante</Italian>
<Czech>Nabít Světlici</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_loadMagazine_HE_Guided">
<English>Load Guided HE</English>
@ -223,6 +229,7 @@
<Polish>Załaduj kierowany pocisk wybuchowy</Polish>
<French>Charger HE guidé</French>
<Italian>Carica HE guidata</Italian>
<Czech>Nabít HE (Naváděné)</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_loadMagazine_HE_LaserGuided">
<English>Load Laser Guided HE</English>
@ -231,6 +238,7 @@
<Polish>Załaduj laserowo napr. pocisk wybuchowy</Polish>
<French>Charger HE guidé au laser</French>
<Italian>Carica HE a guida laser</Italian>
<Czech>Nabít HE (Naváděné laserem)</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_magazine_HE_displayName">
<English>82mm HE Round</English>
@ -239,6 +247,7 @@
<Polish>Pocisk wybuchowy kal. 82mm</Polish>
<French>Obus de 82mm HE</French>
<Italian>Proiettile da 82mm HE</Italian>
<Czech>82mm HE náboj</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_magazine_Smoke_displayName">
<English>82mm Smoke Round</English>
@ -247,6 +256,7 @@
<Polish>Pocisk dymny kal. 82mm</Polish>
<French>Obus de 82mm fumigène</French>
<Italian>Proiettile Fumogeno da 82mm</Italian>
<Czech>82mm Kouřový náboj</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_magazine_Illum_displayName">
<English>82mm Illumination Round</English>
@ -255,6 +265,7 @@
<Polish>Pocisk oświetlający kal. 82mm</Polish>
<French>Obus de 82mm éclairant</French>
<Italian>Proiettile illuminante da 82mm</Italian>
<Czech>82mm Osvětlovací náboj</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_magazine_HE_Guided_displayName">
<English>82mm Guided HE Round</English>
@ -263,6 +274,7 @@
<Polish>Kierowany pocisk wybuchowy kal. 82mm</Polish>
<French>Obus de 82mm HE guidé</French>
<Italian>Proiettile HE guidato</Italian>
<Czech>82mm HE náboj (naváděný)</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_magazine_HE_LaserGuided_displayName">
<English>82mm Laser Guided HE Round</English>
@ -271,6 +283,7 @@
<Polish>Laserowo napr. pocisk wybuchowy kal. 82mm</Polish>
<French>Obus de 82mm HE guidé au laser</French>
<Italian>Proiettile HE a guida laser</Italian>
<Czech>82mm HE náboj (naváděný laserem)</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_magazine_descriptionShort">
<English>Used in Mk6 mortar</English>
@ -279,6 +292,7 @@
<Polish>Używany w moździerzu Mk6</Polish>
<French>Utilisé dans le mortier Mk6</French>
<Italian>Usato nel mortaio Mk6</Italian>
<Czech>Používá se u minometu Mk6</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_HEBox_DisplayName">
<English>[ACE] 82mm HE Rounds Box</English>
@ -287,6 +301,7 @@
<Polish>[ACE] Skrzynka amunicji wybuchowej 82mm</Polish>
<French>[ACE] Obus de 82mm HE</French>
<Italian>[ACE] Scatola proiettili espolisvi ad alto potenziale (HE) da 82mm</Italian>
<Czech>[ACE] Bedna s municí (82mm HE)</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_SmokeBox_DisplayName">
<English>[ACE] 82mm Smoke Rounds Box</English>
@ -295,6 +310,7 @@
<Polish>[ACE] Skrzynka amunicji dymnej 82mm</Polish>
<French>[ACE] Obus de 82mm fumigène</French>
<Italian>[ACE] Scatola fumogeni da 82mm</Italian>
<Czech>[ACE] Bedna s municí (82mm Dýmovnice)</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_IllumBox_DisplayName">
<English>[ACE] 82mm Illumination Rounds Box</English>
@ -303,6 +319,7 @@
<Polish>[ACE] Skrzynka amunicji oświetlającej 82mm</Polish>
<French>[ACE] Obus de 82mm éclairants</French>
<Italian>[ACE] Scatola illuminanti da 82mm</Italian>
<Czech>[ACE] Bedna s municí (82mm Světlice)</Czech>
</Key>
<Key ID="STR_ACE_Mk6Mortar_ComboBox_DisplayName">
<English>[ACE] 82mm Default Loadout Box</English>
@ -311,6 +328,7 @@
<Polish>[ACE] Skrzynka amunicji standardowej 82mm</Polish>
<French>[ACE] Obus de 82mm par défaut</French>
<Italian>[ACE] Scatola proiettili 82mm standard</Italian>
<Czech>[ACE] Bedna se standardní 82mm municí</Czech>
</Key>
</Package>
</Project>

View File

@ -1,5 +1,7 @@
PREP(addLoadToUnitContainer);
PREP(getWeight);
PREP(canClimb);
PREP(climb);
PREP(handleClimb);
PREP(handleVirtualMass);

View File

@ -3,6 +3,9 @@
if (!hasInterface) exitWith {};
["playerChanged", FUNC(handleVirtualMass)] call FUNC(addEventHandler);
["playerInventoryChanged", FUNC(handleVirtualMass)] call FUNC(addEventHandler);
["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb),
{
// Conditions: canInteract

View File

@ -0,0 +1,31 @@
/*
* Author: commy2
* Add (negative numbers to subtract) a virtual mass to a units container.
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: The Container <OBJECT>
* 2: The Virtual Load <NUMBER>
*
* Return Value:
* Success? <BOOLEAN>
*
* Public: No
*/
#include "script_component.hpp"
params [["_unit", objNull, [objNull]], ["_container", objNull, [objNull]], ["_virtualLoadToAdd", 0, [0]]];
if !(_container in [
uniformContainer _unit,
vestContainer _unit,
backpackContainer _unit
]) exitWith {false};
private _virtualLoad = (_container getVariable [QGVAR(vLoad), 0]) + _virtualLoadToAdd;
_container setVariable [QGVAR(vLoad), _virtualLoad, true];
// update
_unit call FUNC(handleVirtualMass);
true

View File

@ -0,0 +1,42 @@
/*
* Author: commy2
* Recalculate the units loadCoef to emulate a mass added to uniform, vest or backpack.
*
* Arguments:
* 0: The Unit (usually the player) <OBJECT>
*
* Return Value:
* Nothing
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
// add sum of virtual loads
private _virtualLoad = 0;
{
_virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]);
} forEach [
uniformContainer _unit,
vestContainer _unit,
backpackContainer _unit
];
// get absolute vanilla load
private _absLoad = loadAbs _unit / load _unit;
// try to preserve other changes to the "LoadCoef" unitTrait
private _loadCoef = _unit getVariable QGVAR(loadCoef);
if (isNil "_loadCoef") then {
_loadCoef = _unit getUnitTrait "loadCoef";
_unit setVariable [QGVAR(loadCoef), _loadCoef, true];
};
// calc. new "virtual" loadCoef
private _virtualLoadCoef = (1 + _virtualLoad / _absLoad) * _loadCoef;
_unit setUnitTrait ["loadCoef", _virtualLoadCoef];

View File

@ -43,6 +43,9 @@ if (_ammo > 0) then {
// only display the hint once, after you try to shoot an already jammed weapon
GVAR(knowAboutJam) = false;
["weaponJammed", [_unit,_weapon]] call EFUNC(common,localEvent);
if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
private _condition = {

View File

@ -32,6 +32,7 @@
<Italian>Effetti Particelle Surriscaldamento</Italian>
<Spanish>Efectos de partículas</Spanish>
<French>Effet de surchauffe</French>
<Czech>Částicové efekty přehřívání</Czech>
</Key>
<Key ID="STR_ACE_Overheating_showParticleEffects_description">
<English>Show particle effects when weapon overheats</English>
@ -48,6 +49,7 @@
<Italian>Effetti Particellari Surriscaldamento per tutti</Italian>
<Spanish>Efectos de partículas para todos</Spanish>
<French>Effets de surchauffe pour tout le monde.</French>
<Czech>Částicové efekty přehřívání pro všechny</Czech>
</Key>
<Key ID="STR_ACE_Overheating_showParticleEffectsForEveryone_description">
<English>Show particle effects when other players weapon overheats</English>
@ -80,6 +82,7 @@
<Polish>Usuń zacięcie przy przeładowaniu</Polish>
<French>Des-enrayer l'arme au rechargement.</French>
<Italian>Disinceppa l'arma quando si ricarica</Italian>
<Czech>Uvolnit zbraň při přebití</Czech>
</Key>
<Key ID="STR_ACE_Overheating_unJamOnreload_description">
<English>Reloading clears a weapon jam.</English>
@ -88,6 +91,7 @@
<Polish>Przeładowywanie usuwa zacięcie</Polish>
<French>Recharger vide la chambre de l'arme</French>
<Italian>L'arma si disinceppa quando si ricarica</Italian>
<Czech>Přebití uvolní zaseknutou zbraň.</Czech>
</Key>
<Key ID="STR_ACE_Overheating_unJamFailChance_displayName">
<English>Chance of unjam failing</English>
@ -96,6 +100,7 @@
<Polish>Szansa na porażkę usuw. zacięcia</Polish>
<French>Chance de rater le des-enrayement</French>
<Italian>Probabilità di sbagliare a disinceppare l'arma</Italian>
<Czech>Šance, že uvolnění zbraně selže</Czech>
</Key>
<Key ID="STR_ACE_Overheating_unJamFailChance_description">
<English>Probability that an unjam action might fail, requiring to be repeated.</English>
@ -172,6 +177,7 @@
<Polish>Porażka przy usuwaniu zacięcia</Polish>
<French>Toujours enrayé !</French>
<Italian>Non si è disinceppata!</Italian>
<Czech>Zbrań se nepodařilo uvolnit</Czech>
</Key>
<Key ID="STR_ACE_Overheating_SwapBarrel">
<English>Swap barrel</English>
@ -190,7 +196,7 @@
<German>Lauf wird gewechselt...</German>
<Spanish>Cambiando el cañón...</Spanish>
<Polish>Wymienianie lufy...</Polish>
<Czech>Vyměňuji hlaveň...</Czech>
<Czech>Měním hlaveň...</Czech>
<French>Changement du canon...</French>
<Russian>Смена ствола...</Russian>
<Hungarian>Cső kicserélése folyamatban...</Hungarian>
@ -216,7 +222,7 @@
<Polish>Sprawdź temperaturę broni</Polish>
<French>Vérifier la température de l'arme</French>
<Hungarian>Fegyver hőmérsékletének ellenőrzése</Hungarian>
<Czech>Zjistit teplotu zbraně</Czech>
<Czech>Zkontrolovat teplotu zbraně</Czech>
<Portuguese>Conferir temperatura da arma</Portuguese>
<Italian>Controlla la temperatura della canna</Italian>
<Russian>Проверить температуру оружия</Russian>

View File

@ -7,7 +7,7 @@
// Go through all modes that have a camshakefire defined and change it to ours.
class CfgMovesBasic {
class Default {
camShakeFire = ACE_CAMSHAKEFIRE_NORMAL;
camShakeFire = ACE_CAMSHAKEFIRE_BASE;
};
};
@ -69,7 +69,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
class AmovPknlMstpSrasWrflDnon;
class AmovPknlMwlkSrasWrflDf: AmovPknlMstpSrasWrflDnon {
camShakeFire = ACE_CAMSHAKEFIRE_NORMAL;
camShakeFire = ACE_CAMSHAKEFIRE_BASE;
};
class AmovPknlMrunSrasWrflDf;

View File

@ -1,24 +0,0 @@
class RscControlsGroup;
class RscText;
class RscInGameUI {
class RscUnitInfo {
// Soldiers
class WeaponInfoControlsGroupLeft: RscControlsGroup {
class controls {
class CA_AmmoCount: RscText {
sizeEx = 0;
};
};
};
// Vehicles
/*class WeaponInfoControlsGroupRight: RscControlsGroup {
class controls {
class CA_AmmoCount: RscText {
sizeEx = 0;
};
};
};*/
};
};

View File

@ -20,6 +20,4 @@ class CfgPatches {
#include "CfgActions.hpp"
#include "RscInGameUI.hpp"
#include "ACE_Settings.hpp"

View File

@ -77,4 +77,9 @@ class ACE_Settings {
values[] = {"None", "ToolKit"};
_values[] = {{}, {"ToolKit"}};
};
class GVAR(autoShutOffEngineWhenStartingRepair) {
typeName = "BOOL";
value = 0;
category = ECSTRING(OptionsMenu,CategoryLogistics);
};
};

View File

@ -35,7 +35,7 @@ class Extended_InitPost_EventHandlers {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
serverInit = QUOTE(_this call DFUNC(addSpareParts));
exclude[] = {QEGVAR(fastroping,helper)};
exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase"};
};
};
class Plane {

View File

@ -25,7 +25,8 @@ private ["_config", "_engineerRequired", "_items", "_return", "_condition", "_ve
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
if !(isClass _config) exitWith {false}; // or go for a default?
if(isEngineOn _target) exitWith {false};
// if(isEngineOn _target) exitWith {false}; // Ignore here so action shows, then exit and show warning when selected #3348
_engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
getNumber (_config >> "requiredEngineer");

View File

@ -36,7 +36,14 @@ _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
0;
};
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false};
if (isEngineOn _target) exitWith {false};
if ((isEngineOn _target) && {GVAR(autoShutOffEngineWhenStartingRepair)}) then {
["engineOn", _target, [_target, false]] call EFUNC(common,objectEvent);
};
if ((isEngineOn _target) && {!GVAR(autoShutOffEngineWhenStartingRepair)}) exitWith {
["displayTextStructured", [LSTRING(shutOffEngineWarning), 1.5, _caller]] call EFUNC(common,localEvent);
false
};
//Items can be an array of required items or a string to a ACE_Setting array
_items = if (isArray (_config >> "items")) then {

View File

@ -1316,5 +1316,11 @@
<Italian>Oggetti richiesti per riparare/rimuovere ruote</Italian>
<French>Items exigés pour enlever/remplacer les roues</French>
</Key>
<Key ID="STR_ACE_Repair_shutOffEngineWarning">
<English>Engine must be off to repair</English>
<German>Motor muss ausgeschaltet zu reparieren sein</German>
<Spanish>El motor necesita desactivado para la reparación</Spanish>
<Czech>Pro opravu je zapotřebí vypnout motor</Czech>
</Key>
</Package>
</Project>
</Project>

View File

@ -14,6 +14,7 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit));
};
};

View File

@ -0,0 +1,17 @@
#include "script_component.hpp"
["SettingsInitialized", {
if (GVAR(RemoveDeadBodiesDisconnected)) then {
addMissionEventHandler ["HandleDisconnect", {
[{
params ["_unit"];
if (!alive _unit) then {
deleteVehicle _unit;
};
},
_this, 4] call EFUNC(common,waitAndExecute);
false
}];
};
}] call EFUNC(common,addEventHandler);

View File

@ -19,25 +19,9 @@
params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {};
if (!_activated) exitWith {};
GVAR(Module) = true;
[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(RemoveDeadBodiesDisconnected), "RemoveDeadBodiesDisconnected"] call EFUNC(common,readSettingFromModule);
if (isServer && {GVAR(RemoveDeadBodiesDisconnected)}) then {
addMissionEventHandler ["HandleDisconnect", {
[{
params ["_unit"];
if (!alive _unit) then {
deleteVehicle _unit;
};
},
_this, 4] call EFUNC(common,waitAndExecute);
false
}];
};
ACE_LOGINFO("Respawn Module Initialized.");

View File

@ -321,7 +321,7 @@
<Polish>Noc</Polish>
<Portuguese>Visão Norturna</Portuguese>
<Russian>Ночное</Russian>
<Czech>Noc</Czech>
<Czech>Noční</Czech>
<Spanish>Nocturna</Spanish>
<Italian>Notturno</Italian>
<French>Nuit</French>
@ -332,7 +332,7 @@
<Polish>Termo</Polish>
<Portuguese>Térmica</Portuguese>
<Russian>Тепловизор</Russian>
<Czech>Termál</Czech>
<Czech>Termál</Czech>
<Spanish>Térmica</Spanish>
<Italian>Termico</Italian>
<French>Thermique</French>
@ -689,4 +689,4 @@
<French>RAZ vitesse</French>
</Key>
</Package>
</Project>
</Project>

View File

@ -3,58 +3,32 @@ class CfgVehicles {
class CAManBase: Man {
class ACE_SelfActions {
class ACE_Equipment {
class ACE_tagWallBlack {
displayName = CSTRING(tagWallBlack);
class ACE_TagBlack {
displayName = CSTRING(TagBlack);
condition = QUOTE(('ACE_SpraypaintBlack' in items ACE_player) && {[] call FUNC(checkTaggable)});
statement = QUOTE([ARR_2(ACE_player,'black')] call FUNC(tagWall));
statement = QUOTE([ARR_2(ACE_player,'black' call FUNC(getTexture))] call FUNC(tag));
showDisabled = 0;
priority = 3;
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlack.paa));
};
class ACE_tagWallRed: ACE_tagWallBlack {
displayName = CSTRING(tagWallRed);
class ACE_TagRed: ACE_TagBlack {
displayName = CSTRING(TagRed);
condition = QUOTE(('ACE_SpraypaintRed' in items ACE_player) && {[] call FUNC(checkTaggable)});
statement = QUOTE([ARR_2(ACE_player,'red')] call FUNC(tagWall));
statement = QUOTE([ARR_2(ACE_player,'red' call FUNC(getTexture))] call FUNC(tag));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingRed.paa));
};
class ACE_tagWallGreen: ACE_tagWallBlack {
displayName = CSTRING(tagWallGreen);
class ACE_TagGreen: ACE_TagBlack {
displayName = CSTRING(TagGreen);
condition = QUOTE(('ACE_SpraypaintGreen' in items ACE_player) && {[] call FUNC(checkTaggable)});
statement = QUOTE([ARR_2(ACE_player,'green')] call FUNC(tagWall));
statement = QUOTE([ARR_2(ACE_player,'green' call FUNC(getTexture))] call FUNC(tag));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingGreen.paa));
};
class ACE_tagWallBlue: ACE_tagWallBlack {
displayName = CSTRING(tagWallBlue);
class ACE_TagBlue: ACE_TagBlack {
displayName = CSTRING(TagBlue);
condition = QUOTE(('ACE_SpraypaintBlue' in items ACE_player) && {[] call FUNC(checkTaggable)});
statement = QUOTE([ARR_2(ACE_player,'blue')] call FUNC(tagWall));
statement = QUOTE([ARR_2(ACE_player,'blue' call FUNC(getTexture))] call FUNC(tag));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlue.paa));
};
/*class ACE_tagGroundBlack {
displayName = CSTRING(tagGroundBlack);
condition = QUOTE('ACE_SpraypaintBlack' in items ACE_player);
statement = QUOTE([ARR_2(ACE_player, 'black')] call FUNC(tagGround));
showDisabled = 0;
priority = 3;
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlack.paa));
};
class ACE_tagGroundRed: ACE_tagGroundBlack {
displayName = CSTRING(tagGroundRed);
condition = QUOTE('ACE_SpraypaintRed' in items ACE_player);
statement = QUOTE([ARR_2(ACE_player, 'red')] call FUNC(tagGround));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingRed.paa));
};
class ACE_tagGroundGreen: ACE_tagGroundBlack {
displayName = CSTRING(tagGroundGreen);
condition = QUOTE('ACE_SpraypaintGreen' in items ACE_player);
statement = QUOTE([ARR_2(ACE_player, 'green')] call FUNC(tagGround));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingGreen.paa));
};
class ACE_tagGroundBlue: ACE_tagGroundBlack {
displayName = CSTRING(tagGroundBlue);
condition = QUOTE('ACE_SpraypaintBlue' in items ACE_player);
statement = QUOTE([ARR_2(ACE_player, 'blue')] call FUNC(tagGround));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlue.paa));
};*/
};
};
};
@ -64,26 +38,26 @@ class CfgVehicles {
author = "jokoho48";
scope = 2;
scopeCurator = 2;
displayName = CSTRING(spraypaintBlack);
displayName = CSTRING(SpraypaintBlack);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_SpraypaintBlack,1);
};
};
class ACE_Item_SpraypaintRed: ACE_Item_SpraypaintBlack {
displayName = CSTRING(spraypaintRed);
displayName = CSTRING(SpraypaintRed);
class TransportItems {
MACRO_ADDITEM(ACE_SpraypaintRed,1);
};
};
class ACE_Item_SpraypaintGreen: ACE_Item_SpraypaintBlack {
displayName = CSTRING(spraypaintGreen);
displayName = CSTRING(SpraypaintGreen);
class TransportItems {
MACRO_ADDITEM(ACE_SpraypaintGreen,1);
};
};
class ACE_Item_SpraypaintBlue: ACE_Item_SpraypaintBlack {
displayName = CSTRING(spraypaintBlue);
displayName = CSTRING(SpraypaintBlue);
class TransportItems {
MACRO_ADDITEM(ACE_SpraypaintBlue,1);
};
@ -98,4 +72,4 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_SpraypaintGreen,5);
};
};
};
};

View File

@ -1,7 +1,5 @@
PREP(checkTaggable);
PREP(createTag);
PREP(tagDirection);
PREP(tagGround);
PREP(tagWall);
PREP(getTexture);
PREP(tag);
PREP(tagTestingThread);

View File

@ -1,5 +1,5 @@
/*
* Author: BaerMitUmlaut and esteldunedain
* Author: BaerMitUmlaut, esteldunedain
* Checks if there is a taggable surface within 2.5m in front of the player.
*
* Arguments:

View File

@ -1,41 +1,42 @@
/*
* Author: BaerMitUmlaut and esteldunedain
* Author: BaerMitUmlaut, esteldunedain
* Creates a tag and handle its destruction. Only execute on the server.
*
* Arguments:
* 0: Position ASL <ARRAY>
* 1: Vector dir and up <ARRAY>
* 2: Colour of the tag (valid colours are black, red, green and blue) <STRING>
* 3: Object it should be tied too <OBJECT>
* 2: Colour of the tag (valid colours are black, red, green and blue or full path to custom texture) <STRING>
* 3: Object it should be tied to <OBJECT>
* 4: Unit that created the tag <OBJECT>
*
* Return Value:
* None
* Tag created <BOOL>
*
* Example:
* [positionASL, vectorDirAndUp, "black", object] call ace_tagging_fnc_createTag
* [positionASL, vectorDirAndUp, "z\ace\addons\tagging\UI\tags\black\0.paa", object] call ace_tagging_fnc_createTag
*
* Public: No
*/
#include "script_component.hpp"
params ["_tagPosASL", "_vectorDirAndUp", "_color", "_object", "_unit"];
TRACE_5("createTag:", _tagPosASL, _vectorDirAndUp, _color, _object, _unit);
params ["_tagPosASL", "_vectorDirAndUp", "_texture", "_object", "_unit"];
TRACE_5("createTag:",_tagPosASL,_vectorDirAndUp,_texture,_object,_unit);
if !((toLower _color) in ["black", "red", "green", "blue"]) exitWith {
ACE_LOGERROR_1("%1 is not a valid tag color.", _color);
if (_texture == "") exitWith {
ACE_LOGERROR_1("%1 is not a valid tag texture.",_texture);
false
};
private _tag = "UserTexture1m_F" createVehicle [0,0,0];
_tag setObjectTextureGlobal [0, '\z\ace\addons\tagging\UI\tags\' + _color + '\' + str (floor (random 3)) + '.paa'];
_tag setObjectTextureGlobal [0, _texture];
_tag setPosASL _tagPosASL;
_tag setVectorDirAndUp _vectorDirAndUp;
// Throw a global event for mision makers
["tagCreated", [_tag, _color, _object, _unit]] call EFUNC(common,globalEvent);
["tagCreated", [_tag, _texture, _object, _unit]] call EFUNC(common,globalEvent);
if (isNull _object) exitWith {};
if (isNull _object) exitWith {true};
// If the tag is applied to an object, handle its destruction
_object setVariable [QGVAR(testVar), true];
@ -73,3 +74,5 @@ GVAR(tagsToTest) pushBack [_tag, _tagPosASL, _vectorDirAndUp];
if (!GVAR(testingThread)) then {
call FUNC(tagTestingThread);
};
true

View File

@ -0,0 +1,26 @@
/*
* Author: BaerMitUmlaut, esteldunedain, Jonpas
* Puts together a full path to the given tag color texture. Internal ACE3 textures only.
*
* Arguments:
* 0: The colour of the tag (valid colours are black, red, green and blue) <STRING>
*
* Return Value:
* Texture (full path), "" if not found <STRING>
*
* Example:
* texture = ["blue"] call ace_tagging_fnc_getTexture
*
* Public: No
*/
#include "script_component.hpp"
params ["_color"];
if !((toLower _color) in ["black", "red", "green", "blue"]) exitWith {
ACE_LOGERROR_1("%1 is not a valid tag colour.",_color);
""
};
QUOTE(PATHTOF(UI)) + "\tags\" + _color + "\" + str (floor (random 3)) + ".paa"

View File

@ -1,25 +1,35 @@
/*
* Author: BaerMitUmlaut and esteldunedain
* If possible, create a tag on the first surface between Start and End positions
* Author: BaerMitUmlaut, esteldunedain
* Creates a tag on a wall that is on the closest surface within 2m on front of the unit.
*
* Arguments:
* 0: Unit
* 1: Start position ASL <ARRAY>
* 2: End position ASL <ARRAY>
* 3: The colour of the tag (valid colours are black, red, green and blue) <STRING>
* 0: Unit <OBJECT>
* 1: The colour of the tag (valid colours are black, red, green and blue or full path to custom texture) <STRING>
*
* Return Value:
* Sucess <BOOLEAN>
* Sucess <BOOL>
*
* Example:
* [startPosASL, directiom "blue"] call ace_tagging_fnc_tagDirection
* success = [player, "z\ace\addons\tagging\UI\tags\black\0.paa"] call ace_tagging_fnc_tag
*
* Public: No
* Public: Yes
*/
#include "script_component.hpp"
params ["_unit", "_startPosASL", "_endPosASL", "_color"];
params [
["_unit", objNull, [objNull]],
["_texture", "", [""]]
];
if (isNull _unit || {_texture == ""}) exitWith {
ACE_LOGERROR_2("Tag parameters invalid. Unit: %1, Texture: %2",_unit,_texture);
};
private _startPosASL = eyePos _unit;
private _cameraPosASL = AGLToASL positionCameraToWorld [0, 0, 0];
private _cameraDir = (AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff _cameraPosASL;
private _endPosASL = _startPosASL vectorAdd (_cameraDir vectorMultiply 2.5);
// Check for intersections below the unit
private _intersections = lineIntersectsSurfaces [_startPosASL, _endPosASL, _unit, objNull, true, 1, "GEOM", "FIRE"];
@ -79,8 +89,6 @@ _fnc_isOk = {
true
};
#define TAG_SIZE 0.6
if ( !([ 0.5*TAG_SIZE, 0.5*TAG_SIZE] call _fnc_isOk) ||
{!([ 0.5*TAG_SIZE,-0.5*TAG_SIZE] call _fnc_isOk) ||
{!([-0.5*TAG_SIZE, 0.5*TAG_SIZE] call _fnc_isOk) ||
@ -102,6 +110,6 @@ _unit playActionNow "PutDown";
// Tell the server to create the tag and handle its destruction
["createTag", _this] call EFUNC(common,serverEvent);
}, [_touchingPoint vectorAdd (_surfaceNormal vectorMultiply 0.06), _vectorDirAndUp, _color, _object, _unit], 0.6] call EFUNC(common,waitAndExecute);
}, [_touchingPoint vectorAdd (_surfaceNormal vectorMultiply 0.06), _vectorDirAndUp, _texture, _object, _unit], 0.6] call EFUNC(common,waitAndExecute);
true

View File

@ -1,25 +0,0 @@
/*
* Author: BaerMitUmlaut and esteldunedain
* Creates a tag on the ground beneath the unit
*
* Arguments:
* 0: Unit <OBJECT>
* 1: The colour of the tag (valid colours are black, red, green and blue) <STRING>
*
* Return Value:
* None
*
* Example:
* [player, "blue"] call ace_tagging_fnc_tagGround
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_color"];
private _startPosASL = getPosASL _unit;
private _endPosASL = _startPosASL vectorAdd [0, 0, -2] vectorAdd eyeDirection _unit;
[_unit, _startPosASL, _endPosASL, _color] call FUNC(tagDirection);

View File

@ -1,27 +0,0 @@
/*
* Author: BaerMitUmlaut and esteldunedain
* Creates a tag on a wall that is on the closest surface within 2m on front of the unit.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: The colour of the tag (valid colours are black, red, green and blue) <STRING>
*
* Return Value:
* None
*
* Example:
* [player, "blue"] call ace_tagging_fnc_tagWall
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_color"];
private _startPosASL = eyePos _unit;
private _cameraPosASL = AGLToASL positionCameraToWorld [0, 0, 0];
private _cameraDir = (AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff _cameraPosASL;
private _endPosASL = _startPosASL vectorAdd (_cameraDir vectorMultiply 2.5);
[_unit, _startPosASL, _endPosASL, _color] call FUNC(tagDirection);

View File

@ -15,3 +15,6 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define TAG_SIZE 0.6

View File

@ -1,109 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Tagging">
<Key ID="STR_ACE_tagging_tagWallBlack">
<Key ID="STR_ACE_Tagging_TagBlack">
<English>Tag black</English>
<German>Schwarz markieren</German>
<Spanish>Marcar en negro</Spanish>
<Polish>Oznakuj na czarno</Polish>
<French>Tag noir</French>
<Italian>Marca nero</Italian>
<Czech>Označit černě</Czech>
</Key>
<Key ID="STR_ACE_tagging_tagWallRed">
<Key ID="STR_ACE_Tagging_TagRed">
<English>Tag red</English>
<German>Rot markieren</German>
<Spanish>Marcar en rojo</Spanish>
<Polish>Oznakuj na czerwono</Polish>
<French>Tag rouge</French>
<Italian>Marca rosso</Italian>
<Czech>Označit červeně</Czech>
</Key>
<Key ID="STR_ACE_tagging_tagWallGreen">
<Key ID="STR_ACE_Tagging_TagGreen">
<English>Tag green</English>
<German>Grün markieren</German>
<Spanish>Marcar en verde</Spanish>
<Polish>Oznakuj na zielono</Polish>
<French>Tag vert</French>
<Italian>Marca verde</Italian>
<Czech>Označit zeleně</Czech>
</Key>
<Key ID="STR_ACE_tagging_tagWallBLue">
<Key ID="STR_ACE_Tagging_TagBlue">
<English>Tag blue</English>
<German>Blau markieren</German>
<Spanish>Marcar en azul</Spanish>
<Polish>Oznakuj na niebiesko</Polish>
<French>Tag bleu</French>
<Italian>Marca blu</Italian>
<Czech>Označit modře</Czech>
</Key>
<Key ID="STR_ACE_tagging_tagGroundBlack">
<English>Tag ground black</English>
<German>Boden schwarz markieren</German>
<Polish>Oznakuj ziemię na czarno</Polish>
<Spanish>Marcar suelo en negro</Spanish>
<French>Tag fond noir</French>
<Italian>Segna nero a terra</Italian>
</Key>
<Key ID="STR_ACE_tagging_tagGroundRed">
<English>Tag ground red</English>
<German>Boden rot markieren</German>
<Polish>Oznakuj ziemię na czerwono</Polish>
<Spanish>Marcar suelo en rojo</Spanish>
<French>Tag fond rouge</French>
<Italian>Segna rosso a terra</Italian>
</Key>
<Key ID="STR_ACE_tagging_tagGroundGreen">
<English>Tag ground green</English>
<German>Boden grün markieren</German>
<Polish>Oznakuj ziemię na zielono</Polish>
<Spanish>Marcar suelo en verde</Spanish>
<French>Tag fond vert</French>
<Italian>Segna verde a terra</Italian>
</Key>
<Key ID="STR_ACE_tagging_tagGroundBlue">
<English>Tag ground blue</English>
<German>Boden blau markieren</German>
<Polish>Oznakuj ziemię na niebiesko</Polish>
<Spanish>Marcar suelo en azul</Spanish>
<French>Tag font bleu</French>
<Italian>Segna blu a terra</Italian>
</Key>
<Key ID="STR_ACE_tagging_spraypaintBlack">
<Key ID="STR_ACE_Tagging_SpraypaintBlack">
<English>Black spray paint</English>
<German>Schwarze Sprühfarbe</German>
<Spanish>Pintura negra</Spanish>
<Polish>Czarna farba w sprayu</Polish>
<French>Peinture pulvérisée noire</French>
<Italian>Bomboletta spray nera</Italian>
<Czech>Černý sprej</Czech>
</Key>
<Key ID="STR_ACE_tagging_spraypaintRed">
<Key ID="STR_ACE_Tagging_SpraypaintRed">
<English>Red spray paint</English>
<German>Rote Sprühfarbe</German>
<Spanish>Pintura roja</Spanish>
<Polish>Czerwona farba w sprayu</Polish>
<French>Peinture pulvérisée rouge</French>
<Italian>Bomboletta spray rossa</Italian>
<Czech>Červený sprej</Czech>
</Key>
<Key ID="STR_ACE_tagging_spraypaintGreen">
<Key ID="STR_ACE_Tagging_SpraypaintGreen">
<English>Green spray paint</English>
<German>Grüne Sprühfarbe</German>
<Spanish>Pintura verde</Spanish>
<Polish>Zielona farba w sprayu</Polish>
<French>Peinture pulvérisée verte</French>
<Italian>Bomboletta spray verde</Italian>
<Czech>Zelený sprej</Czech>
</Key>
<Key ID="STR_ACE_tagging_spraypaintBlue">
<Key ID="STR_ACE_Tagging_SpraypaintBlue">
<English>Blue spray paint</English>
<German>Blaue Sprühfarbe</German>
<Spanish>Pintura azul</Spanish>
<Polish>Niebieska farba w sprayu</Polish>
<French>Peinture pulvérisée bleue</French>
<Italian>Bomboletta spray blu</Italian>
<Czech>Modrý sprej</Czech>
</Key>
<Key ID="STR_ACE_tagging_descSpraypaint">
<Key ID="STR_ACE_Tagging_descSpraypaint">
<English>A can of spray paint for tagging walls.</English>
<German>Eine Farbsprühdose um Wände zu markieren.</German>
<Spanish>Lata de pintura en aerosol para marcar.</Spanish>
<Polish>Farba w sprayu, służy do oznakowywania terenu.</Polish>
<French>Un spray de peinture pour taguer les murs.</French>
<Italian>Una bomboletta di spay per contrassegnare i muri.</Italian>
<Czech>Plechovka se sprejem k vytváření značek.</Czech>
</Key>
</Package>
</Project>

View File

@ -8,6 +8,7 @@
<Italian>Pala</Italian>
<Spanish>Pala para trincheras</Spanish>
<French>Outil de tranchée</French>
<Czech>Polní lopatka</Czech>
</Key>
<Key ID="STR_ACE_Trenches_EntrenchingToolDescription">
<English>Entrenching Tool</English>
@ -16,6 +17,7 @@
<Italian>Pala</Italian>
<Spanish>Pala para trincheras</Spanish>
<French>Outil de tranchée</French>
<Czech>Polní lopatky se používají k zákopovým a jiným pracem.</Czech>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeSmallName">
<English>Envelope - Small</English>
@ -32,6 +34,7 @@
<Italian>Piccola Trincea Personale</Italian>
<Spanish>Trinchera personal pequeña</Spanish>
<French>Petite tranchée personelle</French>
<Czech>Malý zákop pro jednoho</Czech>
</Key>
<Key ID="STR_ACE_Trenches_DigEnvelopeSmall">
<English>Dig Small Trench</English>
@ -40,6 +43,7 @@
<Italian>Scava Trincea Piccola</Italian>
<Spanish>Cavar trinchera pequeña</Spanish>
<French>Creuser une petite tranchée</French>
<Czech>Vykopat malý zákop</Czech>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeBigName">
<English>Envelope - Big</English>
@ -56,6 +60,7 @@
<Italian>Grande Trincea Personale</Italian>
<Spanish>Trinchera personal grande</Spanish>
<French>Grande tranchée personelle</French>
<Czech>Velký zákop pro jednoho</Czech>
</Key>
<Key ID="STR_ACE_Trenches_DigEnvelopeBig">
<English>Dig Big Trench</English>
@ -64,6 +69,7 @@
<Italian>Scava Trincea Grande</Italian>
<Spanish>Cavar trinchera grande</Spanish>
<French>Creuser une grande tranchée</French>
<Czech>Vykopat velký zákop</Czech>
</Key>
<Key ID="STR_ACE_Trenches_ConfirmDig">
<English>Confirm Dig</English>
@ -72,6 +78,7 @@
<Italian>Conferma Scava</Italian>
<Spanish>Confirmar cavado</Spanish>
<French>Confirmer la creusée</French>
<Czech>Potvrdit kopání</Czech>
</Key>
<Key ID="STR_ACE_Trenches_CancelDig">
<English>Cancel Dig</English>
@ -80,6 +87,7 @@
<Italian>Cancella Scava</Italian>
<Spanish>Cancelar cavado</Spanish>
<French>Annuler la creusée</French>
<Czech>Zrušit kopání</Czech>
</Key>
<Key ID="STR_ACE_Trenches_ScrollAction">
<English>Rotate</English>
@ -100,6 +108,7 @@
<Italian>Sto Scavando la Trincea</Italian>
<Spanish>Cavando trinchera</Spanish>
<French>Creuse la tranchée</French>
<Czech>Vykopat zákop</Czech>
</Key>
</Package>
</Project>
</Project>

217
addons/ui/ACE_Settings.hpp Normal file
View File

@ -0,0 +1,217 @@
class ACE_Settings {
class GVAR(allowSelectiveUI) {
category = CSTRING(Category);
displayName = CSTRING(AllowSelectiveUI);
description = CSTRING(AllowSelectiveUI_Description);
typeName = "BOOL";
value = 1;
};
// BASIC
class GVAR(soldierVehicleWeaponInfo) {
category = CSTRING(Category);
displayName = CSTRING(SoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleRadar) {
category = CSTRING(Category);
displayName = CSTRING(VehicleRadar);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleCompass) {
category = CSTRING(Category);
displayName = CSTRING(VehicleCompass);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(commandMenu) {
category = CSTRING(Category);
displayName = CSTRING(CommandMenu);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(groupBar) {
category = CSTRING(Category);
displayName = CSTRING(GroupBar);
typeName = "BOOL";
value = 0;
isClientSettable = 1;
};
// ADVANCED
// Upper Weapon Info
class GVAR(weaponName) {
category = CSTRING(Category);
displayName = CSTRING(WeaponName);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(weaponNameBackground) {
category = CSTRING(Category);
displayName = CSTRING(WeaponNameBackground);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(firingMode) {
category = CSTRING(Category);
displayName = CSTRING(FiringMode);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
// Lower Weapon Info
class GVAR(ammoType) {
category = CSTRING(Category);
displayName = CSTRING(AmmoType);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(ammoCount) {
category = CSTRING(Category);
displayName = CSTRING(AmmoCount);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 0;
isClientSettable = 1;
};
class GVAR(magCount) {
category = CSTRING(Category);
displayName = CSTRING(MagCount);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(throwableName) {
category = CSTRING(Category);
displayName = CSTRING(throwableName);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(throwableCount) {
category = CSTRING(Category);
displayName = CSTRING(throwableCount);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(zeroing) {
category = CSTRING(Category);
displayName = CSTRING(Zeroing);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(weaponLowerInfoBackground) {
category = CSTRING(Category);
displayName = CSTRING(WeaponLowerInfoBackground); //todo
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
// Stance
class GVAR(stance) {
category = CSTRING(Category);
displayName = CSTRING(Stance);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
// Stamina Bar
class GVAR(staminaBar) {
category = CSTRING(Category);
displayName = CSTRING(StaminaBar);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
// Vehicle
class GVAR(vehicleName) {
category = CSTRING(Category);
displayName = CSTRING(VehicleName);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleNameBackground) {
category = CSTRING(Category);
displayName = CSTRING(VehicleNameBackground);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleFuelBar) {
category = CSTRING(Category);
displayName = CSTRING(VehicleFuelBar);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleSpeed) {
category = CSTRING(Category);
displayName = CSTRING(VehicleSpeed);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleAltitude) {
category = CSTRING(Category);
displayName = CSTRING(VehicleAltitude);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleDamage) {
category = CSTRING(Category);
displayName = CSTRING(VehicleDamage);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleInfoBackground) {
category = CSTRING(Category);
displayName = CSTRING(VehicleInfoBackground);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(vehicleGunnerWeapon) {
category = CSTRING(Category);
displayName = CSTRING(VehicleGunnerWeapon);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
};

View File

@ -0,0 +1,17 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
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_clientInit));
};
};

181
addons/ui/CfgVehicles.hpp Normal file
View File

@ -0,0 +1,181 @@
class CfgVehicles {
class ACE_Module;
class GVAR(Module): ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(ModuleName);
function = QFUNC(moduleInit);
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(UI\Icon_Module_UI_ca.paa));
class Arguments {
class allowSelectiveUI {
displayName = CSTRING(AllowSelectiveUI);
description = CSTRING(AllowSelectiveUI_Description);
typeName = "BOOL";
defaultValue = 1;
};
// BASIC
class soldierVehicleWeaponInfo {
displayName = CSTRING(SoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleRadar {
displayName = CSTRING(VehicleRadar);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleCompass {
displayName = CSTRING(VehicleCompass);
typeName = "BOOL";
defaultValue = 1;
};
class commandMenu {
displayName = CSTRING(CommandMenu);
typeName = "BOOL";
defaultValue = 1;
};
class groupBar {
displayName = CSTRING(GroupBar);
typeName = "BOOL";
defaultValue = 0;
};
// ADVANCED
// Upper Weapon Info
class weaponName {
displayName = CSTRING(WeaponName);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class weaponNameBackground {
displayName = CSTRING(WeaponNameBackground);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class firingMode {
displayName = CSTRING(FiringMode);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
// Lower Weapon Info
class ammoType {
displayName = CSTRING(AmmoType);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class ammoCount {
displayName = CSTRING(AmmoCount);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 0;
};
class magCount {
displayName = CSTRING(MagCount);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class throwableName {
displayName = CSTRING(throwableName);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class throwableCount {
displayName = CSTRING(throwableCount);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class zeroing {
displayName = CSTRING(Zeroing);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class weaponLowerInfoBackground {
displayName = CSTRING(WeaponLowerInfoBackground);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
// Stance
class stance {
displayName = CSTRING(Stance);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
// Stamina Bar
class staminaBar {
displayName = CSTRING(StaminaBar);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
// Vehicle
class vehicleName {
displayName = CSTRING(VehicleName);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleNameBackground {
displayName = CSTRING(VehicleNameBackground);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleFuelBar {
displayName = CSTRING(VehicleFuelBar);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleSpeed {
displayName = CSTRING(VehicleSpeed);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleAltitude {
displayName = CSTRING(VehicleAltitude);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleDamage {
displayName = CSTRING(VehicleDamage);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleInfoBackground {
displayName = CSTRING(VehicleInfoBackground);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
class vehicleGunnerWeapon {
displayName = CSTRING(VehicleGunnerWeapon);
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(ModuleDescription);
};
};
};

View File

@ -1,7 +1,7 @@
ace_ui
=======
Removes vignette and changes the chat contrast on the map to allow easier reading.
Removes vignette, changes the chat contrast on the map to allow easier reading and provides settings to hide or show different UI elements.
## Maintainers
@ -9,3 +9,4 @@ Removes vignette and changes the chat contrast on the map to allow easier readin
The people responsible for merging changes to this component or answering potential questions.
- [VKing](https://github.com/VKing6)
- [Jonpas](https://github.com/jonpas)

Binary file not shown.

4
addons/ui/XEH_PREP.hpp Normal file
View File

@ -0,0 +1,4 @@
PREP(moduleInit);
PREP(setAdvancedElement);
PREP(setElements);
PREP(setElementVisibility);

View File

@ -0,0 +1,40 @@
#include "script_component.hpp"
// Exit on Headless
if (!hasInterface) exitWith {};
["SettingsInitialized", {
// Initial settings
[true] call FUNC(setElements);
// On load and entering/exiting a vehicle
["infoDisplayChanged", {
// Selective UI Advanced
// Defaults must be set in this EH to make sure controls are activated and advanced settings can be modified
private _force = [true, false] select (GVAR(allowSelectiveUI));
{
[_x select 0, _x select 1, _x select 2, _force] call FUNC(setAdvancedElement);
} forEach ELEMENTS_ADVANCED;
}] call EFUNC(common,addEventHandler);
// On changing settings
["SettingChanged", {
params ["_name"];
// Selective UI Basic
if (_name in ELEMENTS_BASIC) then {
[false] call FUNC(setElements);
};
// Selective UI Advanced
{
_x params ["_idd", "_elements", "_elementName"];
if (_name == _elementName) then {
[_idd, _elements, _elementName] call FUNC(setAdvancedElement);
TRACE_2("Setting Changed",_name,_elementName);
};
} forEach ELEMENTS_ADVANCED;
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);

View File

@ -0,0 +1,9 @@
#include "script_component.hpp"
ADDON = false;
#include "XEH_PREP.hpp"
GVAR(elementsSet) = [];
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -12,5 +12,9 @@ class CfgPatches {
};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "ACE_Settings.hpp"
#include "RscChat.hpp"
#include "RscVignette.hpp"

View File

@ -0,0 +1,56 @@
/*
* Author: Jonpas
* Initializes the UI module.
*
* Arguments:
* 0: Module Logic <LOGIC>
* 1: Units <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* None
*/
#include "script_component.hpp"
if (!isServer) exitWith {};
params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {};
// Basic
if (isArray (missionConfigFile >> "showHUD")) then {
// HUD visibility is hardcoded in mission config and showHUD command is overriden
ACE_LOGINFO("User Interface Module Failed to Initialize Basic settings - showHUD overriden in mission config!");
} else {
[_logic, QGVAR(allowSelectiveUI), "allowSelectiveUI"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(soldierVehicleWeaponInfo), "soldierVehicleWeaponInfo"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleRadar), "vehicleRadar"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleCompass), "vehicleCompass"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(commandMenu), "commandMenu"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(groupBar), "groupBar"] call EFUNC(common,readSettingFromModule);
};
// Advanced
[_logic, QGVAR(weaponName), "weaponName"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(weaponNameBackground), "weaponNameBackground"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(firingMode), "firingMode"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(ammoType), "ammoType"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(ammoCount), "ammoCount"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(magCount), "magCount"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(throwableName), "throwableName"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(throwableCount), "throwableCount"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(zeroing), "zeroing"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(weaponLowerInfoBackground), "weaponLowerInfoBackground"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(stance), "stance"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(staminaBar), "staminaBar"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleName), "vehicleName"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleNameBackground), "vehicleNameBackground"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleFuelBar), "vehicleFuelBar"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleSpeed), "vehicleSpeed"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleAltitude), "vehicleAltitude"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleDamage), "vehicleDamage"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleInfoBackground), "vehicleInfoBackground"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleGunnerWeapon), "vehicleGunnerWeapon"] call EFUNC(common,readSettingFromModule);
ACE_LOGINFO_1("User Interface Module Initialized. Allow client modifications: %1",GVAR(allowSelectiveUI));

View File

@ -0,0 +1,53 @@
/*
* Author: Jonpas
* Sets advanced visible element of the UI using displays and controls.
*
* Arguments:
* 0: Element IDD <NUMBER>
* 1: Element IDCs <ARRAY>
* 2: Show/Hide Element OR Element ACE Settings Variable <BOOL/STRING>
* 3: Force change even when disallowed <BOOL> (default: false)
*
* Return Value:
* Successfully Set <BOOL>
*
* Example:
* [303, [188], true, false] call ace_ui_fnc_setAdvancedElement
*
* Public: No
*/
#include "script_component.hpp"
params ["_idd", "_elements", "_show", ["_force", false, [true]] ];
if (_elementInfo in GVAR(elementsSet)) exitWith {};
if (!_force && {!GVAR(allowSelectiveUI)}) exitWith {
[LSTRING(Disallowed), 2] call EFUNC(common,displayTextStructured)
};
// Get show/hide boolean from mission namespace if it's a string
if (typeName _show == "STRING") then {
_show = missionNamespace getVariable _show;
};
_show = [1, 0] select _show;
// Disable/Enable elements
private _success = false;
{
private _idc = _x;
// Loop through IGUI displays as they can be present several times for some reason
{
if (_idd == ctrlIDD _x) then {
TRACE_3("Setting Element Visibility",_show,_idd,_idc);
(_x displayCtrl _idc) ctrlSetFade _show;
(_x displayCtrl _idc) ctrlCommit 0;
_success = true;
};
} forEach (uiNamespace getVariable "IGUI_displays");
} forEach _elements;
_success

View File

@ -0,0 +1,52 @@
/*
* Author: Jonpas
* Setter for toggling advanced element visibility.
*
* Arguments:
* 0: Set/Unset <BOOL> (default: true)
* 1: Element IDD <NUMBER> (default: 0)
* 2: Element IDCs <ARRAY> (default: [])
* 3: Show/Hide Element OR Element ACE Settings Variable <BOOL/STRING> (default: false)
*
* Return Value:
* None
*
* Example:
* [true, 300, [188], false] call ace_ui_fnc_setElementVisibility
*
* Public: Yes
*/
#include "script_component.hpp"
params [
["_set", true, [true]],
["_idd", 0, [0]],
["_elements", [], [[]]],
["_show", false, [true, ""]]
];
private _return = false;
if (_set) then {
if ([_idd, _elements] in GVAR(elementsSet)) exitWith { TRACE_3("Element already set",_idd,_elements,GVAR(elementsSet)); };
TRACE_4("Setting element",_idd,_elements,_show,GVAR(elementsSet));
private _success = [_idd, _elements, _show] call FUNC(setAdvancedElement);
if (_success) then {
GVAR(elementsSet) pushBack [_idd, _elements];
_return = true;
};
} else {
if ([_idd, _elements] in GVAR(elementsSet)) then {
TRACE_4("Setting element",_idd,_elements,_show,GVAR(elementsSet));
[_idd, _elements, _show] call FUNC(setAdvancedElement);
private _index = GVAR(elementsSet) find [_idd, _elements];
GVAR(elementsSet) deleteAt _index;
_return = true;
};
};
TRACE_2("Visibility set",_return,GVAR(elementsSet));
_return

View File

@ -0,0 +1,37 @@
/*
* Author: Jonpas
* Sets basic visible elements of the UI using showHUD setter.
*
* Arguments:
* 0: Force change even when disallowed <BOOL> (default: false)
*
* Return Value:
* None
*
* Example:
* [false] call ace_ui_fnc_setElements
*
* Public: No
*/
#include "script_component.hpp"
if (isArray (missionConfigFile >> "showHUD")) exitWith {};
params [ ["_force", false, [true]] ];
if (!_force && {!GVAR(allowSelectiveUI)}) exitWith {
[LSTRING(Disallowed), 2] call EFUNC(common,displayTextStructured);
};
private _shownHUD = shownHUD; // [hud, info, radar, compass, direction, menu, group, cursors]
["ui", [
_shownHUD select 0,
GVAR(soldierVehicleWeaponInfo),
GVAR(vehicleRadar),
GVAR(vehicleCompass),
_shownHUD select 4,
GVAR(commandMenu),
GVAR(groupBar),
_shownHUD select 7
]] call EFUNC(common,showHud);

View File

@ -0,0 +1 @@
#include "\z\ace\addons\ui\script_component.hpp"

View File

@ -15,3 +15,81 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
// Elements
#define ELEMENTS_BASIC [QGVAR(soldierVehicleWeaponInfo), QGVAR(vehicleRadar), QGVAR(vehicleCompass), QGVAR(commandMenu), QGVAR(groupBar)]
// IDD, IDC, Element (must be string to compare to changed setting name)
#define ELEMENTS_ADVANCED [ \
[300, [118], QGVAR(weaponName)], \
[300, [1001, 1008], QGVAR(weaponNameBackground)], \
[300, [187, 1203], QGVAR(firingMode)], \
[300, [155], QGVAR(ammoType)], \
[300, [184], QGVAR(ammoCount)], \
[300, [185], QGVAR(magCount)], \
[300, [152], QGVAR(throwableName)], \
[300, [151], QGVAR(throwableCount)], \
[300, [1202], QGVAR(weaponLowerInfoBackground)], \
[300, [168], QGVAR(zeroing)], \
[305, [193], QGVAR(staminaBar)], \
[303, [188, 1201], QGVAR(stance)], \
[300, [120], QGVAR(vehicleName)], \
[300, [1000, 1013], QGVAR(vehicleNameBackground)], \
[300, [113, 1202], QGVAR(vehicleFuelBar)], \
[300, [121, 1004, 1006], QGVAR(vehicleSpeed)], \
[300, [122, 1005, 1014], QGVAR(vehicleAltitude)], \
[300, [111], QGVAR(vehicleDamage)], \
[300, [1200], QGVAR(vehicleInfoBackground)], \
[300, [150], QGVAR(vehicleGunnerWeapon)] \
]
/*
RscUnitInfo = 300
--------------------
118 (Weapon Name)
+ 1001 (Weapon Name Background 1/2)
+ 1008 (Weapon Name Background 2/2)
187 (Firing Mode)
+ 1203 (Firing Mode Background)
155 (Ammo Type)
184 (Ammo Count) - disabled in config by ace_reload
185 (Magazine Count)
152 (Grenade/Flare Type)
151 (Grenade/Flare Count)
1202 (Lower Weapon Info Background)
168 (Zeroing)
120 (Vehicle Name)
1000 (Vehicle Name Background 1/2)
+ 1013 (Vehicle Name Background 2/2)
113 (Vehicle Fuel Bar)
+ 1202 (Vehicle Fuel Bar Background)
121 (Vehicle Speed Number)
+ 1004 (Vehicle Speed Unit)
+ 1006 (Vehicle Speed Background)
122 (Vehicle Altitude Number)
+ 1005 (Vehicle Altitude Units)
+ 1014 (Vehicle Altitude Background)
111 (Vehicle Damage)
1200 (Vehicle Info Background)
150 (Vehicle Gunner Weapon)
RscStanceInfo = 303
--------------------
188 (Stance)
+ 1201 (Stance Background)
RscStaminaBar = 305
--------------------
193 (Stamina Bar)
*/

131
addons/ui/stringtable.xml Normal file
View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="UI">
<Key ID="STR_ACE_UI_Category">
<English>User Interface</English>
<Czech>Uživatelské rozhraní</Czech>
</Key>
<Key ID="STR_ACE_UI_ModuleName">
<English>User Interface</English>
<Czech>Uživatelské rozhraní</Czech>
</Key>
<Key ID="STR_ACE_UI_ModuleDescription">
<English>This module allows toggling visible user interface parts.</English>
</Key>
<Key ID="STR_ACE_UI_AllowSelectiveUI">
<English>Allow Selective UI</English>
<Czech>Povolit selektivní UI</Czech>
</Key>
<Key ID="STR_ACE_UI_AllowSelectiveUI_Description">
<English>Allow client to modify their UI.</English>
<Czech>Povolit klientovi měnit jeho UI</Czech>
</Key>
<Key ID="STR_ACE_UI_SoldierVehicleWeaponInfo">
<English>Soldier/Vehicle/Weapon Information</English>
<Czech>Informace o Vojákovi/Vozidlu/Zbrani</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleRadar">
<English>Vehicle Radar</English>
<Czech>Radar vozidla</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleCompass">
<English>Vehicle Compass</English>
<Czech>Kompas vozidla</Czech>
</Key>
<Key ID="STR_ACE_UI_CommandMenu">
<English>Command Menu</English>
<Czech>Menu rozkazů</Czech>
</Key>
<Key ID="STR_ACE_UI_GroupBar">
<English>Group Bar</English>
<Czech>Panel skupiny</Czech>
</Key>
<Key ID="STR_ACE_UI_WeaponName">
<English>Weapon Name</English>
<Czech>Název zbraně</Czech>
</Key>
<Key ID="STR_ACE_UI_WeaponNameBackground">
<English>Weapon Name Background</English>
<Czech>Název zbraně v pozadí</Czech>
</Key>
<Key ID="STR_ACE_UI_FiringMode">
<English>Firing Mode</English>
<Czech>Režim palby</Czech>
</Key>
<Key ID="STR_ACE_UI_AmmoType">
<English>Ammo Type</English>
<Czech>Typ munice</Czech>
</Key>
<Key ID="STR_ACE_UI_AmmoCount">
<English>Ammo Count</English>
<Czech>Počet munice</Czech>
</Key>
<Key ID="STR_ACE_UI_MagCount">
<English>Magazine Count</English>
<Czech>Počet zásobníků</Czech>
</Key>
<Key ID="STR_ACE_UI_ThrowableName">
<English>Throwable Type</English>
<Czech>Typ granátů apod.</Czech>
</Key>
<Key ID="STR_ACE_UI_ThrowableCount">
<English>Throwable Count</English>
<Czech>Počet granátů apod.</Czech>
</Key>
<Key ID="STR_ACE_UI_Zeroing">
<English>Zeroing</English>
<Czech>Náměr</Czech>
</Key>
<Key ID="STR_ACE_UI_WeaponLowerInfoBackground">
<English>Weapon Lower Info Background</English>
</Key>
<Key ID="STR_ACE_UI_Stance">
<English>Stance</English>
<Czech>Postoj</Czech>
</Key>
<Key ID="STR_ACE_UI_StaminaBar">
<English>Stamina Bar</English>
<Czech>Panel výdrže</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleName">
<English>Vehicle Name</English>
<Czech>Název vozidla</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleNameBackground">
<English>Vehicle Name Background</English>
<Czech>Název vozidla v pozadí</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleFuelBar">
<English>Vehicle Fuel Bar</English>
<Czech>Ukazatel paliva</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleSpeed">
<English>Vehicle Speed</English>
<Czech>Rychlost vozidla</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleAltitude">
<English>Vehicle Altitude</English>
<Czech>Výška vozidla</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleDamage">
<English>Vehicle Damage</English>
<Czech>Poškození vozidla</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleInfoBackground">
<English>Vehicle Info Background</English>
<Czech>Info o vozidle v pozadí</Czech>
</Key>
<Key ID="STR_ACE_UI_VehicleGunnerWeapon">
<English>Vehicle Gunner Weapon</English>
<Czech>Střelcova zbraň ve vozidle</Czech>
</Key>
<Key ID="STR_ACE_UI_RequiresSoldierVehicleWeaponInfo">
<English>Requires Soldier/Vehicle/Weapons Information.</English>
<Czech>Vyžaduje informace o Vojákovi/Vozidlu/Zbrani</Czech>
</Key>
<Key ID="STR_ACE_UI_Disallowed">
<English>Modifying User Interface is disabled.</English>
<Czech>Změna uživatelského rozhraní je zakázána.</Czech>
</Key>
</Package>
</Project>

View File

@ -13,4 +13,9 @@ class CfgWeapons {
opticsZoomMin = 0.06621;
weaponInfoType = "ACE_RscOptics_vector";
};
class ACE_VectorDay: ACE_Vector {
author = ECSTRING(common,ACETeam);
displayName = CSTRING(VectorDayName);
visionMode[] = {"Normal"};
};
};

View File

@ -3,7 +3,7 @@
class CfgPatches {
class ADDON {
units[] = {"ACE_Item_Vector"};
weapons[] = {"ACE_Vector"};
weapons[] = {"ACE_Vector", "ACE_VectorDay"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Ghost","Hamburger SV","commy2","bux578"};

View File

@ -7,7 +7,7 @@ PFH executed while holding a vector key down.
*/
#include "script_component.hpp"
if (currentWeapon ACE_player != "ACE_Vector") exitWith {
if (!((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"])) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
GVAR(currentMode) = "";

View File

@ -5,7 +5,7 @@
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false};
if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false};
// prevent holding down
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
@ -34,7 +34,7 @@
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false};
if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false};
// prevent holding down
if (GETGVAR(isDownStateKey2,false)) exitWith {false};

View File

@ -2,6 +2,18 @@
<Project name="ACE">
<Package name="Vector">
<Key ID="STR_ACE_Vector_VectorName">
<English>Vector 21 Nite</English>
<German>Vector 21 Nite</German>
<Spanish>Vector 21 Nite</Spanish>
<French>Vector 21 Nite</French>
<Polish>Vector 21 Nite</Polish>
<Czech>Vector 21 Nite</Czech>
<Italian>Vector 21 Nite</Italian>
<Hungarian>Vector 21 Nite</Hungarian>
<Portuguese>Vector 21 Nite</Portuguese>
<Russian>Vector 21 Nite</Russian>
</Key>
<Key ID="STR_ACE_Vector_VectorDayName">
<English>Vector 21</English>
<German>Vector 21</German>
<Spanish>Vector 21</Spanish>

View File

@ -17,14 +17,6 @@ class Extended_PostInit_EventHandlers {
};
};
class Extended_InventoryOpened_EventHandlers {
class CAManBase {
class ADDON {
clientInventoryOpened = QUOTE(_this call FUNC(onOpenInventory););
};
};
};
class Extended_InitPost_EventHandlers {
class Car {
class ADDON {

View File

@ -3,3 +3,13 @@
//Add Event Handlers
["VehicleLock_SetupCustomKey", {_this call FUNC(serverSetupCustomKeyEH)}] call EFUNC(common,addEventHandler);
["VehicleLock_SetVehicleLock", {_this call FUNC(setVehicleLockEH)}] call EFUNC(common,addEventHandler);
if (!hasInterface) exitwith {};
["SettingsInitialized", {
TRACE_1("SettingsInitialized eh",GVAR(LockVehicleInventory));
if (GVAR(LockVehicleInventory)) then {
["CAManBase", "InventoryOpened", {_this call FUNC(onOpenInventory);}] call CBA_fnc_addClassEventHandler;
};
}] call EFUNC(common,addEventHandler);

View File

@ -7,7 +7,7 @@
* 1: Container <OBJECT>
*
* Return Value:
* Handeled <BOOL>
* None
*
* Example:
* [player, car] call ACE_VehicleLock_fnc_onOpenInventory;
@ -20,10 +20,7 @@ params ["_unit", "_container"];
TRACE_2("params",_unit,_container);
//Only check for player:
if (_unit != ace_player) exitWith {false};
private "_handeled";
_handeled = false;
if (_unit != ace_player) exitWith {};
if (GVAR(LockVehicleInventory) && //if setting not enabled
{(vehicle ace_player) == ace_player} && //Player dismounted
@ -33,15 +30,19 @@ if (GVAR(LockVehicleInventory) && //if setting not enabled
) then {
//Give feedback that vehicle is locked
playSound "ACE_Sound_Click";
//don't open the vehicles inventory
_handeled = true;
// As of 1.54 the action needs to be delayed a frame to work, which used not to be the case
//For compatibiltiy with ACRE, wait until the display is open, close it and then reopen the player's own inventory
//ref: http://gitlab.idi-systems.com/idi-systems/acre2-public/issues/70
[{
TRACE_1("delaying a frame", ace_player);
//Just opens a dummy groundContainer (so the player can still see their own inventory)
ACE_player action ["Gear", objNull];
}, []] call EFUNC(common,execNextFrame);
!isNull (findDisplay 602)
},
{
TRACE_1("car display open: closing", _this);
(findDisplay 602) closeDisplay 0;
[{
TRACE_1("Opening Player Inventory", _this);
ACE_player action ["Gear", objNull]
}, []] call EFUNC(common,execNextFrame);
},
[]] call EFUNC(common,waitUntilAndExecute);
};
_handeled

View File

@ -1,6 +1,6 @@
class CfgVehicles {
class ACE_Module;
class GVAR(ModuleSettings) : ACE_Module {
class GVAR(ModuleSettings): ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
function = QUOTE(DFUNC(initModule));
@ -28,4 +28,4 @@ class CfgVehicles {
sync[] = {};
};
};
};
};

View File

@ -1,4 +1,3 @@
PREP(adaptViewDistance);
PREP(changeViewDistance);
PREP(initModule);

View File

@ -24,6 +24,6 @@ if (!hasInterface) exitWith {};
// Set the EH which waits for a vehicle change to automatically swap between On Foot/In Land Vehicle/In Air Vehicle
// Also run when SettingsInitialized runs (not guaranteed)
["playerVehicleChanged",{
[false] call FUNC(adaptViewDistance)
[false] call FUNC(adaptViewDistance);
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);

View File

@ -2,7 +2,6 @@
* Author: Winter
* Sets the player's current view distance according to whether s/he is on foot, in a land vehicle or in an air vehicle.
*
*
* Arguments:
* 0: Show Prompt <BOOL>
*
@ -17,23 +16,23 @@
#include "script_component.hpp"
private["_land_vehicle","_air_vehicle"];
params ["_show_prompt"];
params ["_showPrompt"];
if (!GVAR(enabled) || isNull ACE_player) exitWith {};
_land_vehicle = (vehicle ACE_player) isKindOf "LandVehicle";
_air_vehicle = (vehicle ACE_player) isKindOf "Air";
private _vehicle = vehicle ACE_player;
if (!_land_vehicle && !_air_vehicle) exitWith {
[GVAR(viewDistanceOnFoot),_show_prompt] call FUNC(changeViewDistance);
private _landVehicle = _vehicle isKindOf "LandVehicle" || {_vehicle isKindOf "Ship_F"};
private _airVehicle = _vehicle isKindOf "Air";
if (!_landVehicle && !_airVehicle) exitWith {
[GVAR(viewDistanceOnFoot), _showPrompt] call FUNC(changeViewDistance);
};
if (_land_vehicle) exitWith {
[GVAR(viewDistanceLandVehicle),_show_prompt] call FUNC(changeViewDistance);
if (_landVehicle) exitWith {
[GVAR(viewDistanceLandVehicle), _showPrompt] call FUNC(changeViewDistance);
};
if (_air_vehicle) exitWith {
[GVAR(viewDistanceAirVehicle),_show_prompt] call FUNC(changeViewDistance);
if (_airVehicle) exitWith {
[GVAR(viewDistanceAirVehicle), _showPrompt] call FUNC(changeViewDistance);
};

View File

@ -16,20 +16,18 @@
*/
#include "script_component.hpp"
private ["_text", "_new_view_distance", "_view_distance_limit", "_object_view_distance_coeff"];
params ["_indexRequested", "_showPrompt"];
params ["_index_requested", "_show_prompt"];
private _newViewDistance = [_indexRequested] call FUNC(returnValue); // changes the setting index into an actual view distance value
private _objectViewDistanceCoeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient.
private _viewDistanceLimit = GVAR(limitViewDistance); // Grab the limit
_new_view_distance = [_index_requested] call FUNC(returnValue); // changes the setting index into an actual view distance value
_object_view_distance_coeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient.
_view_distance_limit = GVAR(limitViewDistance); // Grab the limit
TRACE_3("Limit",_newViewDistance,_viewDistanceLimit,_showPrompt);
setViewDistance (_newViewDistance min _viewDistanceLimit);
TRACE_2("Limit",_new_view_distance,_view_distance_limit);
setViewDistance (_new_view_distance min _view_distance_limit);
if (typeName _object_view_distance_coeff == "SCALAR") then {
if (_object_view_distance_coeff > 0) then {
setObjectViewDistance (_object_view_distance_coeff * viewDistance);
if (_objectViewDistanceCoeff isEqualType 0) then {
if (_objectViewDistanceCoeff > 0) then {
setObjectViewDistance (_objectViewDistanceCoeff * viewDistance);
} else {
// Restore correct view distance when changing from FoV Based to Off
// Restoring directly inside PFH's self-exit resulted in the need of selecting another option to take effect
@ -42,18 +40,18 @@ if (typeName _object_view_distance_coeff == "SCALAR") then {
};
};
if (_show_prompt) then {
if (_showPrompt) then {
if (GVAR(objectViewDistanceCoeff) > 0) then {
private _text = "";
// FoV Based or %
if (GVAR(objectViewDistanceCoeff) == 6) then {
_text = format ["<t align='center'>%1 %2<br/>Min. %3<br/>Max. %4</t>", localize LSTRING(objectinfotext), localize LSTRING(object_fovBased), GVAR(fovBasedPFHminimalViewDistance), viewDistance];
} else {
_text = if (_new_view_distance <= _view_distance_limit) then {
format ["<t align='center'>%1 %2m", localize LSTRING(infotext), viewDistance];
} else {
format ["<t align='center'>%1 %2m", localize LSTRING(invalid), viewDistance];
};
_text = _text + format ["<br/><t align='center'>%1 %2%3</t>", localize LSTRING(objectinfotext), _object_view_distance_coeff * 100, "%"];
_text = [
format ["<t align='center'>%1 %2m", localize LSTRING(invalid), viewDistance],
format ["<t align='center'>%1 %2m", localize LSTRING(infotext), viewDistance]
] select (_newViewDistance <= _viewDistanceLimit);
_text = _text + format ["<br/><t align='center'>%1 %2%3</t>", localize LSTRING(objectinfotext), _objectViewDistanceCoeff * 100, "%"];
};
[parseText _text, 2] call EFUNC(common,displayTextStructured);
};

View File

@ -16,11 +16,9 @@
#include "script_component.hpp"
private ["_return"];
params ["_index"];
_return = switch (_index) do {
switch (_index) do {
case 0: {0.00}; // Off
case 1: {0.20}; // Very Low
case 2: {0.40}; // Low
@ -30,5 +28,3 @@ _return = switch (_index) do {
case 6: {"fov"}; // FoV Based
default {0.50}; // something broke if this returns
};
_return;

View File

@ -16,28 +16,23 @@
#include "script_component.hpp"
private ["_return"];
params ["_index"];
_return = switch (_index) do {
case 0: {viewDistance}; // Video Settings option
case 1: {500};
case 2: {1000};
case 3: {1500};
case 4: {2000};
case 5: {2500};
case 6: {3000};
case 7: {3500};
case 8: {4000};
case 9: {5000};
case 10: {6000};
case 11: {7000};
case 12: {8000};
case 13: {9000};
case 14: {10000};
default {1000};
switch (_index) do {
case 0: {viewDistance}; // Video Settings option
case 1: {500};
case 2: {1000};
case 3: {1500};
case 4: {2000};
case 5: {2500};
case 6: {3000};
case 7: {3500};
case 8: {4000};
case 9: {5000};
case 10: {6000};
case 11: {7000};
case 12: {8000};
case 13: {9000};
case 14: {10000};
default {1000};
};
TRACE_1("VD Index Return",_return);
_return

View File

@ -17,10 +17,6 @@
#include "script_component.hpp"
#define VD_ZOOM_NORMAL 1.00041
#define VD_ZOOM_DIVISION 35
#define VD_ZOOM_DIVISION_AIR 10
params ["", "_idPFH"];
// Remove PFH and set Object View Distance back to what it was before
@ -29,25 +25,20 @@ if (GVAR(objectViewDistanceCoeff) < 6) exitWith {
GVAR(fovBasedPFHminimalViewDistance) = nil;
};
private ["_zoom"];
_zoom = (call CBA_fnc_getFov) select 1;
private _zoom = (call CBA_fnc_getFov) select 1;
// Air
if ((vehicle ACE_player) isKindOf "Air") exitWith {
if (_zoom > VD_ZOOM_NORMAL) then {
// Dynamically set Object View Distance based on player's Zoom Level and View Distance
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
} else {
setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10);
};
TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);
};
// Land
if (_zoom > VD_ZOOM_NORMAL) then {
// Dynamically set Object View Distance based on player's Zoom Level and View Distance
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
if ((vehicle ACE_player) isKindOf "Air") then {
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
} else {
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
};
} else {
setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
if ((vehicle ACE_player) isKindOf "Air") then {
setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10);
} else {
setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
};
};
TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);

Some files were not shown because too many files have changed in this diff Show More