diff --git a/ace_fcs.dll b/ace_fcs.dll index 7c222dc1d7..189c3c0826 100644 Binary files a/ace_fcs.dll and b/ace_fcs.dll differ diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp index 177753223f..393b9666e6 100644 --- a/addons/aircraft/CfgAmmo.hpp +++ b/addons/aircraft/CfgAmmo.hpp @@ -1,5 +1,19 @@ class CfgAmmo { + class BulletBase; + class B_20mm; + + class ACE_20mm_HEDP : B_20mm { + hit = 80; + indirectHit = 12; + indirectHitRange = 2; //2; + caliber = 1.4; + tracerStartTime = 0.02; + timeToLive = 40; + explosive = 1.8; + }; + + // adjust minigun caliber and deflection to other ammo class SubmunitionBullet; class B_65x39_Minigun_Caseless: SubmunitionBullet { @@ -13,7 +27,6 @@ class CfgAmmo { }; // also adjust tracer, "muh lightshow"; also adjust splash damage radius - class BulletBase; class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase { hit = 80; indirectHit = 12; @@ -22,6 +35,7 @@ class CfgAmmo { deflecting = 3; fuseDistance = 3; tracerStartTime = 0.02; + timeToLive = 40; }; // helper projectiles to simulate a rof > fps diff --git a/addons/aircraft/CfgMagazines.hpp b/addons/aircraft/CfgMagazines.hpp index 0c306f8f04..2445182163 100644 --- a/addons/aircraft/CfgMagazines.hpp +++ b/addons/aircraft/CfgMagazines.hpp @@ -10,6 +10,7 @@ class CfgMagazines { // an extended magazine for the comanche class 300Rnd_20mm_shells; class ACE_500Rnd_20mm_shells_Comanche: 300Rnd_20mm_shells { + ammo = "ACE_20mm_HEDP"; count = 500; }; }; diff --git a/addons/aircraft/CfgWeapons.hpp b/addons/aircraft/CfgWeapons.hpp index 917ba1c174..dc84c9f04a 100644 --- a/addons/aircraft/CfgWeapons.hpp +++ b/addons/aircraft/CfgWeapons.hpp @@ -54,24 +54,24 @@ class CfgWeapons { class manual: manual { reloadTime = 0.04; - dispersion = 0.0022; + dispersion = 0.006; displayName = "$STR_ACE_Aircraft_gatling_20mm_Name"; }; class close: close { reloadTime = 0.04; - dispersion = 0.0022; + dispersion = 0.006; }; class short: short { reloadTime = 0.04; - dispersion = 0.0022; + dispersion = 0.006; }; class medium: medium { reloadTime = 0.04; - dispersion = 0.0022; + dispersion = 0.006; }; class far: far { reloadTime = 0.04; - dispersion = 0.0022; + dispersion = 0.006; }; }; diff --git a/addons/aircraft/Heli_Attack_01_base_F.hpp b/addons/aircraft/Heli_Attack_01_base_F.hpp index ee271f826a..817b1dacaa 100644 --- a/addons/aircraft/Heli_Attack_01_base_F.hpp +++ b/addons/aircraft/Heli_Attack_01_base_F.hpp @@ -863,12 +863,21 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { class Turrets: Turrets { class MainTurret: MainTurret { - directionStabilized = 1; - horizontallyStabilized = 1; - weapons[] = {"ACE_gatling_20mm_Comanche","missiles_DAGR","missiles_ASRAAM", "ACE_AIR_SAFETY"}; magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"}; + outGunnerMayFire = 1; + commanding = -1; + primaryGunner = 1; + gunnerOpticsModel = ""; + gunnerOpticsEffect[] = {"TankCommanderOptics1"}; + gunnerForceOptics = 0; + turretInfoType = "Rsc_ACE_Helo_UI_Turret"; + showAllTargets = 2; + discretedistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000}; + discretedistanceinitindex = 3; + copilotHasFlares = 1; + directionStabilized = 1; isCopilot = 1; showHMD = 1; CanEject = 1; @@ -882,25 +891,6 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { class OpticsIn { - class WideNGS - { - opticsDisplayName = "W"; - initAngleX = 0; - minAngleX = -35; - maxAngleX = 10; - initAngleY = 0; - minAngleY = -100; - maxAngleY = 100; - initFov = 0.466; - minFov = 0.466; - maxFov = 0.466; - visionMode[] = {"Normal","Ti"}; - thermalMode[] = {0,1}; - gunnerOpticsColor[] = {0.15,1,0.15,1}; - gunnerOpticsModel = "A3\Weapons_F\Reticle\Optics_Gunner_MBT_03_w_F.p3d"; - directionStabilized = 0; - opticsPPEffects[] = {"OpticsCHAbera2","OpticsBlur2"}; - }; class Wide { opticsDisplayName = "W"; @@ -913,54 +903,47 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { initFov = 0.466; minFov = 0.466; maxFov = 0.466; - visionMode[] = {"Normal","Ti"}; + visionMode[] = {"Normal","NVG","Ti"}; thermalMode[] = {0,1}; - gunnerOpticsColor[] = {0.15,1,0.15,1}; - gunnerOpticsModel = "A3\Weapons_F\Reticle\Optics_Gunner_MBT_02_w_F.p3d"; - directionStabilized = 1; - opticsPPEffects[] = {"OpticsCHAbera2","OpticsBlur2"}; - gunnerOpticsEffect[] = {"TankCommanderOptics1"}; - }; - class WideL: Wide - { - opticsDisplayName = "WL"; - initFov = 0.2; - minFov = 0.2; - maxFov = 0.2; - gunnerOpticsModel = "A3\Weapons_F\Reticle\Optics_Gunner_MBT_02_m_F.p3d"; gunnerOpticsColor[] = {0,0,0,1}; directionStabilized = 1; - opticsPPEffects[] = {"OpticsCHAbera2","OpticsBlur2"}; + horizontallyStabilized = 1; + gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F"; }; class Medium: Wide { opticsDisplayName = "M"; - initFov = 0.1; - minFov = 0.1; - maxFov = 0.1; - directionStabilized = 1; + initFov = 0.093; + minFov = 0.093; + maxFov = 0.093; gunnerOpticsColor[] = {0,0,0,1}; - gunnerOpticsModel = "A3\Weapons_F\Reticle\Optics_Gunner_MBT_02_m_F.p3d"; + directionStabilized = 1; + horizontallyStabilized = 1; + gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F"; }; class Narrow: Wide { opticsDisplayName = "N"; + initFov = 0.029; + minFov = 0.029; + maxFov = 0.029; gunnerOpticsColor[] = {0,0,0,1}; - gunnerOpticsModel = "A3\Weapons_F\Reticle\Optics_Gunner_MBT_02_n_F.p3d"; directionStabilized = 1; - initFov = 0.02; - minFov = 0.02; - maxFov = 0.02; + horizontallyStabilized = 1; + gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F"; + }; class Narrower: Wide { - opticsDisplayName = "N"; - gunnerOpticsColor[] = {0,0,0,1}; - gunnerOpticsModel = "A3\Weapons_F\Reticle\Optics_Gunner_MBT_02_n_F.p3d"; - directionStabilized = 1; + opticsDisplayName = "Z"; initFov = 0.01; minFov = 0.01; maxFov = 0.01; + gunnerOpticsColor[] = {0,0,0,1}; + directionStabilized = 1; + horizontallyStabilized = 1; + gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F"; + }; }; class OpticsOut @@ -976,8 +959,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { initFov = 1.1; minFov = 0.133; maxFov = 1.1; - visionMode[] = {"Normal","NVG","Ti"}; - thermalMode[] = {2,3}; + visionMode[] = {"Normal","NVG"}; gunnerOpticsModel = ""; gunnerOpticsEffect[] = {}; hideUnitInfo = 1; diff --git a/addons/aircraft/README.md b/addons/aircraft/README.md index 76c721bd0c..1049493f45 100644 --- a/addons/aircraft/README.md +++ b/addons/aircraft/README.md @@ -3,7 +3,7 @@ ace_aircraft Changes to air weaponry, flightmodels and HUDs. -* Contributations by Kimi for HUD updates +* Contributations by Kimi (geraldbolso1899) for HUD updates ## Maintainers diff --git a/addons/aircraft/RscInGameUI.hpp b/addons/aircraft/RscInGameUI.hpp index 8255de35a6..620d895d9e 100644 --- a/addons/aircraft/RscInGameUI.hpp +++ b/addons/aircraft/RscInGameUI.hpp @@ -8,13 +8,16 @@ class RscOpticsValue; class VScrollbar; class HScrollbar; class RscLadderPicture; +class RscControlsGroupNoScrollbars; + + class RscInGameUI { class RscUnitInfo; class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { idd = 300; - controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"}; + controls[] = {"CA_IGUI_elements_group","CA_VehicleToggles"}; class VScrollbar; class HScrollbar; class CA_IGUI_elements_group: RscControlsGroup diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index fe9c8a4c77..95a639b943 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -73,6 +73,7 @@ PREP(getStringFromMissionSQM); PREP(getTargetAzimuthAndInclination); PREP(getTargetDistance); PREP(getTargetObject); +PREP(getTurnedOnLights); PREP(getTurretCommander); PREP(getTurretConfigPath); PREP(getTurretCopilot); @@ -111,6 +112,7 @@ PREP(isModLoaded); PREP(isPlayer); PREP(isTurnedOut); PREP(letterToCode); +PREP(lightIntensityFromObject); PREP(loadPerson); PREP(loadPersonLocal); PREP(loadSettingsFromProfile); @@ -122,6 +124,7 @@ PREP(moveToTempGroup); PREP(muteUnit); PREP(numberToDigits); PREP(numberToDigitsString); +PREP(numberToString); PREP(onAnswerRequest); PREP(onLoadRscDisplayChannel); PREP(owned); @@ -188,6 +191,8 @@ PREP(getConfigGunner); PREP(getConfigCommander); PREP(getHitPoints); PREP(getHitPointsWithSelections); +PREP(getReflectorsWithSelections); +PREP(getLightProperties); PREP(getVehicleCrew); // turrets diff --git a/addons/common/functions/fnc_ambientBrightness.sqf b/addons/common/functions/fnc_ambientBrightness.sqf index f29ff9e8e5..172739247f 100644 --- a/addons/common/functions/fnc_ambientBrightness.sqf +++ b/addons/common/functions/fnc_ambientBrightness.sqf @@ -11,4 +11,4 @@ */ #include "script_component.hpp" -sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5 min 1) * (1 - overcast) +(sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5) * (1 - overcast)) min 1 diff --git a/addons/common/functions/fnc_changeProjectileDirection.sqf b/addons/common/functions/fnc_changeProjectileDirection.sqf index 04154da9c1..2cb37650b8 100644 --- a/addons/common/functions/fnc_changeProjectileDirection.sqf +++ b/addons/common/functions/fnc_changeProjectileDirection.sqf @@ -19,40 +19,35 @@ private ["_projectile", "_adjustDir", "_adjustUp", "_adjustSpeed", "_vdir", "_di _projectile = _this select 0; _adjustDir = _this select 1; _adjustUp = _this select 2; -_adjustSpeed = _this select 3; -if (isNil "_adjustSpeed") then { - _adjustSpeed = 0; +_adjustSpeed = if (count _this > 3) then { + _this select 3 +} else { + 0 }; ["CPD", [_fnc_scriptNameParent, _adjustDir, _adjustUp, _adjustSpeed], nil, false] call FUNC(log); // get old direction vector -_vdir = vectorDir _projectile; +_vdir = vectorNormalized velocity _projectile; // get azimuth and inclination and apply corrections _dir = (_vdir select 0) atan2 (_vdir select 1) + _adjustDir; -_up = sqrt ((_vdir select 1) ^ 2 + (_vdir select 0) ^ 2) atan2 - (_vdir select 2) + _adjustUp; +_up = asin (_vdir select 2) + _adjustUp; // get new direction vector (this is a unit vector) _vdir = [ - sin _dir * sin _up, - cos _dir * sin _up, - - cos _up + sin _dir * cos _up, + cos _dir * cos _up, + sin _up ]; // get best up vector -_l = sqrt ((_vdir select 0) ^ 2 + (_vdir select 1) ^ 2); if (_l == 0) then {diag_log text format ["[ACE] ERROR: %1, %2, %3, %4, %5, %6, %7", _projectile, _adjustDir, _adjustUp, vectorDir _projectile, _vdir, _dir, _up]}; -_r = -(_vdir select 2) / _l; - -_vup = [ - (_vdir select 0) * _r, - (_vdir select 1) * _r, - _l -]; +_vlat = vectorNormalized (_vdir vectorCrossProduct [0,0,1]); +_vup = _vlat vectorCrossProduct _vdir; // get new speed vector. Keep total speed, but change to new direction. Yay for vector commands. -_vel = _vdir vectorMultiply _adjustSpeed + vectorMagnitude velocity _projectile; +_vel = _vdir vectorMultiply (_adjustSpeed + vectorMagnitude velocity _projectile); // set projectile direction dir and up. Projectiles are long objects, especially with tracers, so it would look dumb otherwise. _projectile setVectorDirAndUp [_vdir, _vup]; diff --git a/addons/common/functions/fnc_getLightProperties.sqf b/addons/common/functions/fnc_getLightProperties.sqf new file mode 100644 index 0000000000..ee1884ac1b --- /dev/null +++ b/addons/common/functions/fnc_getLightProperties.sqf @@ -0,0 +1,63 @@ +/* + * Author: commy2 + * Read properties of given vehicles light. + * + * Arguments: + * 0: Object with lights (Object) + * 1: Light classname (String) + * + * Return Value: + * Stuff from config (Array) + * + */ +#include "script_component.hpp" + +private ["_vehicle", "_light"]; + +_vehicle = _this select 0; +_light = _this select 1; + +private "_config"; +_config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light; + +private ["_intensity", "_position", "_direction", "_innerAngle", "_outerAngle"]; + +_intensity = getNumber (_config >> "intensity"); +_position = getText (_config >> "position"); +_direction = getText (_config >> "direction"); +_innerAngle = getNumber (_config >> "innerAngle"); +_outerAngle = getNumber (_config >> "outerAngle"); + +[_intensity, _position, _direction, _innerAngle, _outerAngle] + +/* +class Reflectors +{ + class Light_1 + { + color[] = {1000,1000,1100}; + ambient[] = {10,10,11}; + intensity = 5; + size = 1; + innerAngle = 90; + outerAngle = 130; + coneFadeCoef = 2; + position = "Light_1_pos"; + direction = "Light_1_dir"; + hitpoint = "Light_1_hitpoint"; + selection = "Light_1_hide"; + useFlare = 1; + flareSize = 0.9; + flareMaxDistance = 85; + class Attenuation + { + start = 0; + constant = 0; + linear = 0; + quadratic = 0.9; + hardLimitStart = 40; + hardLimitEnd = 60; + }; + }; +}; +*/ diff --git a/addons/common/functions/fnc_getReflectorsWithSelections.sqf b/addons/common/functions/fnc_getReflectorsWithSelections.sqf new file mode 100644 index 0000000000..6d47943155 --- /dev/null +++ b/addons/common/functions/fnc_getReflectorsWithSelections.sqf @@ -0,0 +1,45 @@ +/* + * Author: commy2 + * + * Returns all lighting hitpoints of any vehicle. + * Note: These are actual selections that are affected by setHit and getHit, not getHitPointDamage or setHitpointDamage. + * They behave like having an armor value of 0. + * + * Arguments: + * 0: A vehicle, not the classname (Object) + * + * Return Value: + * The light names and selections (Array) + */ +#include "script_component.hpp" + +private ["_vehicle", "_config", "_hitpoints", "_selections"]; + +_vehicle = _this select 0; + +_config = configFile >> "CfgVehicles" >> typeOf _vehicle; + +_hitpoints = []; +_selections = []; + +// iterate through all parents +while {isClass _config} do { + private "_class"; + _class = _config >> "Reflectors"; + + for "_i" from 0 to (count _class - 1) do { + private ["_entry", "_selection"]; + + _entry = _class select _i; + _selection = getText (_entry >> "hitpoint"); + + if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then { + _hitpoints pushBack configName _entry; + _selections pushBack _selection; + }; + }; + + _config = inheritsFrom _config; +}; + +[_hitPoints, _selections] diff --git a/addons/common/functions/fnc_getTurnedOnLights.sqf b/addons/common/functions/fnc_getTurnedOnLights.sqf new file mode 100644 index 0000000000..6f0dc5a9bb --- /dev/null +++ b/addons/common/functions/fnc_getTurnedOnLights.sqf @@ -0,0 +1,36 @@ +/* + * Author: commy2 + * + * Returns all turned on lights of any vehicle or streetlamp. + * + * Arguments: + * 0: A vehicle, not the classname (Object) + * + * Return Value: + * All burning lights (Array) + */ +#include "script_component.hpp" + +private "_vehicle"; + +_vehicle = _this select 0; + +if (!isLightOn _vehicle) exitWith {[]}; + +private ["_reflectorsWithSelections", "_lights", "_hitpoints"]; + +_reflectorsWithSelections = [_vehicle] call FUNC(getReflectorsWithSelections); + +_lights = _reflectorsWithSelections select 0; +_hitpoints = _reflectorsWithSelections select 1; + +private "_turnedOnLights"; +_turnedOnLights = []; +{ + if (_vehicle getHit _x <= 0.9) then { + _turnedOnLights pushBack (_lights select _forEachIndex); + }; + +} forEach _hitpoints; + +_turnedOnLights diff --git a/addons/common/functions/fnc_lightIntensityFromObject.sqf b/addons/common/functions/fnc_lightIntensityFromObject.sqf new file mode 100644 index 0000000000..cf9e215403 --- /dev/null +++ b/addons/common/functions/fnc_lightIntensityFromObject.sqf @@ -0,0 +1,56 @@ +/* + * Author: commy2 + * Calculate light intensity object 1 recieves from object 2 + * + * Arguments: + * 0: Object that recieves light (Object) + * 1: Object that emits light (Object) + * + * Return Value: + * Brightest light level + * + */ +#include "script_component.hpp" + +private ["_unit", "_lightSource"]; + +_unit = _this select 0; +_lightSource = _this select 1; + +private "_unitPos"; +_unitPos = _unit modelToWorld (_unit selectionPosition "spine3"); + +private ["_lights", "_lightLevel"]; + +_lights = [_lightSource] call FUNC(getTurnedOnLights); + +_lightLevel = 0; + +{ + private ["_properties", "_intensity", "_innerAngle", "_outerAngle", "_position", "_direction", "_directionToUnit", "_distance", "_angle"]; + + _properties = [_lightSource, _x] call FUNC(getLightProperties); + + // @todo intensity affects range? + //_intensity = _properties select 0; + + _innerAngle = (_properties select 3) / 2; + _outerAngle = (_properties select 4) / 2; + + // get world position and direction + _position = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 1)); + _direction = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 2)); + + _direction = _position vectorFromTo _direction; + _directionToUnit = _position vectorFromTo _unitPos; + + _distance = _unitPos distance _position; + _angle = acos (_direction vectorDotProduct _directionToUnit); + + _lightLevel = _lightLevel max ((linearConversion [0, 30, _distance, 1, 0, true]) * (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true])); + +//systemChat format ["%1 %2", (linearConversion [0, 30, _distance, 1, 0, true]), (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true])]; + +} forEach _lights; + +_lightLevel diff --git a/addons/common/functions/fnc_numberToString.sqf b/addons/common/functions/fnc_numberToString.sqf new file mode 100644 index 0000000000..e0ebf1d77f --- /dev/null +++ b/addons/common/functions/fnc_numberToString.sqf @@ -0,0 +1,25 @@ +/* + * Author: commy2 + * + * Converts a number to a string without losing as much precission as str or format. + * + * Argument: + * 0: A number (Number) + * + * Return value: + * The number as string (String) + */ +#include "script_component.hpp" + +private ["_number", "_decimals"]; + +_number = _this select 0; + +_decimals = str (abs(_number) mod 1); +_decimals = toArray _decimals; +_decimals deleteAt 0; + +if (_number < 0) exitWith { + format ["-%1%2", floor abs(_number), toString _decimals]; +}; +format ["%1%2", floor _number, toString _decimals]; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 71d7bcd5a0..bcd2b149aa 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1,351 +1,349 @@  - + - - - ACE-Team - ACE-Team - ACE-Team - ACE-Team - ACE-Team - ACE-Team - Команда ACE - ACE-Team - ACE-Team - ACE-Team - - - Save - Speichern - Guardar - Zapisz - Uložit - Sauvegarder - Сохранить - Salvar - Mentés - Salva - - - Cancel - Abbrechen - Cancelar - Anuluj - Zrušit - Annuler - Отмена - Cancelar - Mégse - Annulla - - - ACE Options - ACE Optionen - Opciones ACE - Opcje ACE - ACE Nastavení - ACE Options - ACE Настройки - Opções do ACE - ACE Opciók - Opzioni ACE - - - - N - N - N - N - S - N - С - N - É - N - - - NNE - NNO - NNE - NNE - SSV - NNE - ССВ - NNE - ÉÉK - NNE - - - NE - NO - NE - NE - SV - NE - СВ - NE - ÉK - NE - - - ENE - ONO - ENE - ENE - VSV - ENE - ВСВ - LNE - KÉK - ENE - - - E - O - E - E - V - E - В - L - K - E - - - ESE - OSO - ESE - ESE - VJV - ESE - ВЮВ - LSE - KDK - ESE - - - SE - SO - SE - SE - JV - SE - ЮВ - SE - DK - SE - - - SSE - SSO - SSE - SSE - JJV - SSE - ЮЮВ - SSE - DDK - SSE - - - S - S - S - S - J - S - Ю - S - D - S - - - SSW - SSW - SSO - SSW - JJZ - SSO - ЮЮЗ - SSO - DDNy - SSO - - - SW - SW - SO - SW - JZ - SO - ЮЗ - SO - DNy - SO - - - WSW - WSW - OSO - WSW - ZJZ - OSO - ЗЮЗ - OSO - NyDNy - OSO - - - W - W - O - W - Z - O - З - O - Ny - O - - - WNW - WNW - ONO - WNW - ZSZ - ONO - ЗСЗ - ONO - NyÉNy - ONO - - - NW - NW - NO - NW - SZ - NO - СЗ - NO - ÉNy - NO - - - NNW - NNW - NNO - NNW - SSZ - NNO - ССЗ - NNO - ÉÉNy - NNO - - - Action cancelled. - Aktion abgebrochen. - Acción cancelada. - Przerwano czynność - Akce přerušena - Action annulée. - Действие отменено. - Ação cancelada. - Művelet megszakítva. - Azione cancellata. - - - [ACE] Miscellaneous Items - [ACE] Verschiedenes - [ACE] Objetos varios - [ACE] Różne przedmioty - [ACE] Ostatní předměty - [ACE] Objets divers - [ACE] Различные предметы - [ACE] Itens diversos - [ACE] Egyéb tárgyak - [ACE] Oggetti vari - - - Disable Command Menu - Befehlsmenü ausschalten - Desactivar menú de mando - Wyłącz menu dowodzenia - Vypnout velící menu - Désactiver Menu Commande - Выключить командное меню - Parancsnoki menü kikapcsolása - - - Unknown - Unbekannt - Desconocido - Nieznany - Neznámý - Неизвестно - Ismeretlen - - - No Voice - Keine Stimme - Sin voz - Brak głosu - Žádný hlas - Без голоса - Nincs hang - - - Accept Requests - Akceptuj prośby - Aceptar Peticiones - - - Decline Requests - Ignoruj prośby - Rechazar Peticiones - - - Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions. - Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności. - Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones. - - - Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions. - Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności. - Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones. - - - Feedback icons - - - Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed. - - - Progress bar location - - - Set the desired location of the progress bar on your screen. - - - Hint Background color - - - The color of the background from the ACE hints. - - - Hint text font color - - - The color of the text font from the ACE hints. This color is the default color for all text displayed through the ACE Hint system, if the hint text has no other color specified. - - - - Banana - - - A banana is an edible fruit, botanically a berry, produced by several kinds of large herbaceous flowering plants in the genus Musa. - - - + + + ACE-Team + ACE-Team + ACE-Team + ACE-Team + ACE-Team + ACE-Team + Команда ACE + ACE-Team + ACE-Team + ACE-Team + + + Save + Speichern + Guardar + Zapisz + Uložit + Sauvegarder + Сохранить + Salvar + Mentés + Salva + + + Cancel + Abbrechen + Cancelar + Anuluj + Zrušit + Annuler + Отмена + Cancelar + Mégse + Annulla + + + ACE Options + ACE Optionen + Opciones ACE + Opcje ACE + ACE Nastavení + ACE Options + ACE Настройки + Opções do ACE + ACE Opciók + Opzioni ACE + + + + N + N + N + N + S + N + С + N + É + N + + + NNE + NNO + NNE + NNE + SSV + NNE + ССВ + NNE + ÉÉK + NNE + + + NE + NO + NE + NE + SV + NE + СВ + NE + ÉK + NE + + + ENE + ONO + ENE + ENE + VSV + ENE + ВСВ + LNE + KÉK + ENE + + + E + O + E + E + V + E + В + L + K + E + + + ESE + OSO + ESE + ESE + VJV + ESE + ВЮВ + LSE + KDK + ESE + + + SE + SO + SE + SE + JV + SE + ЮВ + SE + DK + SE + + + SSE + SSO + SSE + SSE + JJV + SSE + ЮЮВ + SSE + DDK + SSE + + + S + S + S + S + J + S + Ю + S + D + S + + + SSW + SSW + SSO + SSW + JJZ + SSO + ЮЮЗ + SSO + DDNy + SSO + + + SW + SW + SO + SW + JZ + SO + ЮЗ + SO + DNy + SO + + + WSW + WSW + OSO + WSW + ZJZ + OSO + ЗЮЗ + OSO + NyDNy + OSO + + + W + W + O + W + Z + O + З + O + Ny + O + + + WNW + WNW + ONO + WNW + ZSZ + ONO + ЗСЗ + ONO + NyÉNy + ONO + + + NW + NW + NO + NW + SZ + NO + СЗ + NO + ÉNy + NO + + + NNW + NNW + NNO + NNW + SSZ + NNO + ССЗ + NNO + ÉÉNy + NNO + + + Action cancelled. + Aktion abgebrochen. + Acción cancelada. + Przerwano czynność + Akce přerušena + Action annulée. + Действие отменено. + Ação cancelada. + Művelet megszakítva. + Azione cancellata. + + + [ACE] Miscellaneous Items + [ACE] Verschiedenes + [ACE] Objetos varios + [ACE] Różne przedmioty + [ACE] Ostatní předměty + [ACE] Objets divers + [ACE] Различные предметы + [ACE] Itens diversos + [ACE] Egyéb tárgyak + [ACE] Oggetti vari + + + Disable Command Menu + Befehlsmenü ausschalten + Desactivar menú de mando + Wyłącz menu dowodzenia + Vypnout velící menu + Désactiver Menu Commande + Выключить командное меню + Parancsnoki menü kikapcsolása + + + Unknown + Unbekannt + Desconocido + Nieznany + Neznámý + Неизвестно + Ismeretlen + + + No Voice + Keine Stimme + Sin voz + Brak głosu + Žádný hlas + Без голоса + Nincs hang + + + Akceptuj prośby + Aceptar Peticiones + Accept Requests + + + Ignoruj prośby + Rechazar Peticiones + Decline Requests + + + Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności. + Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones. + Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions. + + + Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności. + Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones. + Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions. + + + Feedback icons + + + Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed. + + + Progress bar location + + + Set the desired location of the progress bar on your screen. + + + Hint Background color + + + The color of the background from the ACE hints. + + + Hint text font color + + + The color of the text font from the ACE hints. This color is the default color for all text displayed through the ACE Hint system, if the hint text has no other color specified. + + + Banana + + + A banana is an edible fruit, botanically a berry, produced by several kinds of large herbaceous flowering plants in the genus Musa. + + \ No newline at end of file diff --git a/addons/explosives/CfgACE_Triggers.hpp b/addons/explosives/CfgACE_Triggers.hpp index 789786bb4f..6319444cb2 100644 --- a/addons/explosives/CfgACE_Triggers.hpp +++ b/addons/explosives/CfgACE_Triggers.hpp @@ -1,54 +1,54 @@ class CfgACE_Triggers { - /* onPlace parameters: - 0: OBJECT - unit placing - 1: OBJECT - Placed explosive - 2: STRING - Magazine classname - 3: ARRAY - vars - Last Index: CfgACE_Triggers config of trigger type. - onSetup parameters: - 0: STRING - Magazine Classname - */ - class Command { - displayName = $STR_ACE_Explosives_clacker_displayName; - picture = PATHTOF(Data\UI\Clacker.paa); - onPlace = QUOTE(_this call FUNC(AddClacker);false); - requires[] = {"ACE_Clacker"}; - }; - class MK16_Transmitter:Command { - displayName = $STR_ACE_Explosives_MK16_displayName; - picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa); - requires[] = {"ACE_M26_Clacker"}; - }; - class DeadManSwitch:Command { - displayName = $STR_ACE_Explosives_DeadManSwitch_displayName; - picture = PATHTOF(Data\UI\DeadmanSwitch.paa); - requires[] = {"ACE_DeadManSwitch"}; - }; - class Cellphone:Command { - displayName = $STR_ACE_Explosives_cellphone_displayName; - picture = PATHTOF(Data\UI\Cellphone_UI.paa); - onPlace = QUOTE(_this call FUNC(addCellphoneIED);false); - requires[] = {"ACE_Cellphone"}; - }; - class PressurePlate { - displayName = $STR_ACE_Explosives_PressurePlate; - picture = PATHTOF(Data\UI\PressurePlate.paa); - onPlace = "_dist=GetNumber(ConfigFile >> 'CfgMagazines' >> (_this select 2) >> 'ACE_Triggers' >> 'PressurePlate' >> 'digDistance');_ex=_this select 1;_ex setPosATL ((getPosATL _ex) vectorDiff ((VectorUp _ex) vectorCrossProduct [0,0,_dist]));false"; - }; - class IRSensor { - displayName = $STR_ACE_Explosives_IRSensor; - picture = PATHTOF(Data\UI\PressurePlate.paa); - onPlace = "false"; - }; - class Timer { - displayName = $STR_ACE_Explosives_timerName; - picture = PATHTOF(data\UI\Timer.paa); - onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false); - onSetup = QUOTE(_this call FUNC(openTimerSetUI);true); - }; - class Tripwire { - displayName = $STR_ACE_Explosives_TripWire; - picture = PATHTOF(Data\UI\Tripwire.paa); - onPlace = "false"; - }; +/* onPlace parameters: +0: OBJECT - unit placing +1: OBJECT - Placed explosive +2: STRING - Magazine classname +3: ARRAY - vars +Last Index: CfgACE_Triggers config of trigger type. +onSetup parameters: +0: STRING - Magazine Classname +*/ + class Command { + displayName = $STR_ACE_Explosives_clacker_displayName; + picture = PATHTOF(Data\UI\Clacker.paa); + onPlace = QUOTE(_this call FUNC(AddClacker);false); + requires[] = {"ACE_Clacker"}; + }; + class MK16_Transmitter:Command { + displayName = $STR_ACE_Explosives_MK16_displayName; + picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa); + requires[] = {"ACE_M26_Clacker"}; + }; + class DeadManSwitch:Command { + displayName = $STR_ACE_Explosives_DeadManSwitch_displayName; + picture = PATHTOF(Data\UI\DeadmanSwitch.paa); + requires[] = {"ACE_DeadManSwitch"}; + }; + class Cellphone:Command { + displayName = $STR_ACE_Explosives_cellphone_displayName; + picture = PATHTOF(Data\UI\Cellphone_UI.paa); + onPlace = QUOTE(_this call FUNC(addCellphoneIED);false); + requires[] = {"ACE_Cellphone"}; + }; + class PressurePlate { + displayName = $STR_ACE_Explosives_PressurePlate; + picture = PATHTOF(Data\UI\PressurePlate.paa); + onPlace = "_dist=GetNumber(ConfigFile >> 'CfgMagazines' >> (_this select 2) >> 'ACE_Triggers' >> 'PressurePlate' >> 'digDistance');_ex=_this select 1;_ex setPosATL ((getPosATL _ex) vectorDiff ((VectorUp _ex) vectorCrossProduct [0,0,_dist]));false"; + }; + class IRSensor { + displayName = $STR_ACE_Explosives_IRSensor; + picture = PATHTOF(Data\UI\PressurePlate.paa); + onPlace = "false"; + }; + class Timer { + displayName = $STR_ACE_Explosives_timerName; + picture = PATHTOF(data\UI\Timer.paa); + onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false); + onSetup = QUOTE(_this call FUNC(openTimerSetUI);true); + }; + class Tripwire { + displayName = $STR_ACE_Explosives_TripWire; + picture = PATHTOF(Data\UI\Tripwire.paa); + onPlace = "false"; + }; }; diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 4a6e898886..fc9e4712dc 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -1,78 +1,78 @@ class CfgAmmo { - // All explosive based Ammo classes. These are all listed in case they become required. - class Default; + // All explosive based Ammo classes. These are all listed in case they become required. + class Default; - class TimeBombCore:Default { - ACE_DefuseTime = 5; - }; - /* - class BoundingMineCore:TimeBombCore; - class BoundingMineBase:BoundingMineCore; - class APERSBoundingMine_Range_Ammo:BoundingMineBase; + class TimeBombCore:Default { + ACE_DefuseTime = 5; + }; + /* + class BoundingMineCore:TimeBombCore; + class BoundingMineBase:BoundingMineCore; + class APERSBoundingMine_Range_Ammo:BoundingMineBase; - class MineCore: TimeBombCore; - class MineBase:MineCore; - class APERSMine_Range_Ammo:MineBase; - class ATMine_Range_Ammo:MineBase; + class MineCore: TimeBombCore; + class MineBase:MineCore; + class APERSMine_Range_Ammo:MineBase; + class ATMine_Range_Ammo:MineBase; - class UnderwaterMine_Range_Ammo:MineBase; - class UnderwaterMineAB_Range_Ammo:UnderwaterMine_Range_Ammo; - class UnderwaterMinePDM_Range_Ammo:UnderwaterMine_Range_Ammo; + class UnderwaterMine_Range_Ammo:MineBase; + class UnderwaterMineAB_Range_Ammo:UnderwaterMine_Range_Ammo; + class UnderwaterMinePDM_Range_Ammo:UnderwaterMine_Range_Ammo; - class DirectionalBombCore:TimeBombCore; - class DirectionalBombBase:DirectionalBombCore; - class APERSTripMine_Wire_Ammo:DirectionalBombBase; + class DirectionalBombCore:TimeBombCore; + class DirectionalBombBase:DirectionalBombCore; + class APERSTripMine_Wire_Ammo:DirectionalBombBase; - class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase; + class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase; - class PipeBombCore: TimeBombCore; - class PipeBombBase:PipeBombCore; - */ - class DirectionalBombBase; - class ClaymoreDirectionalMine_Remote_Ammo:DirectionalBombBase{ - ACE_Explosive = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; - soundActivation[] = {"",0,0,0}; - soundDeactivation[] = {"",0,0,0}; - }; - //class ClaymoreDirectionalMine_Remote_Ammo_Scripted:ClaymoreDirectionalMine_Remote_Ammo; + class PipeBombCore: TimeBombCore; + class PipeBombBase:PipeBombCore; + */ + class DirectionalBombBase; + class ClaymoreDirectionalMine_Remote_Ammo:DirectionalBombBase{ + ACE_Explosive = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; + soundActivation[] = {"",0,0,0}; + soundDeactivation[] = {"",0,0,0}; + }; + //class ClaymoreDirectionalMine_Remote_Ammo_Scripted:ClaymoreDirectionalMine_Remote_Ammo; - class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase{ - indirectHitRange = 20; - ACE_explodeOnDefuse = 1; - }; - class SLAMDirectionalMine_Command_Ammo:SLAMDirectionalMine_Wire_Ammo { - mineTrigger = "RemoteTrigger"; - ACE_explodeOnDefuse = 0; - }; - class SLAMDirectionalMine_Timer_Ammo:SLAMDirectionalMine_Wire_Ammo { - mineTrigger = "TimeTrigger"; - ACE_explodeOnDefuse = 0; - }; - class SLAMDirectionalMine_Magnetic_Ammo:SLAMDirectionalMine_Wire_Ammo { - mineTrigger = "MagneticTrigger"; - }; + class SLAMDirectionalMine_Wire_Ammo:DirectionalBombBase{ + indirectHitRange = 20; + ACE_explodeOnDefuse = 1; + }; + class SLAMDirectionalMine_Command_Ammo:SLAMDirectionalMine_Wire_Ammo { + mineTrigger = "RemoteTrigger"; + ACE_explodeOnDefuse = 0; + }; + class SLAMDirectionalMine_Timer_Ammo:SLAMDirectionalMine_Wire_Ammo { + mineTrigger = "TimeTrigger"; + ACE_explodeOnDefuse = 0; + }; + class SLAMDirectionalMine_Magnetic_Ammo:SLAMDirectionalMine_Wire_Ammo { + mineTrigger = "MagneticTrigger"; + }; - class PipeBombBase; - class DemoCharge_Remote_Ammo:PipeBombBase{ - ACE_Explosive = "DemoCharge_Remote_Ammo_Scripted"; - soundActivation[] = {"",0,0,0}; - soundDeactivation[] = {"",0,0,0}; - hit = 500; - indirectHit = 500; - indirectHitRange = 7; - }; - class SatchelCharge_Remote_Ammo:PipeBombBase{ - ACE_Explosive = "SatchelCharge_Remote_Ammo_Scripted"; - soundActivation[] = {"",0,0,0}; - soundDeactivation[] = {"",0,0,0}; - }; - /* - class DemoCharge_Remote_Ammo_Scripted:DemoCharge_Remote_Ammo; - class SatchelCharge_Remote_Ammo_Scripted:SatchelCharge_Remote_Ammo; + class PipeBombBase; + class DemoCharge_Remote_Ammo:PipeBombBase{ + ACE_Explosive = "DemoCharge_Remote_Ammo_Scripted"; + soundActivation[] = {"",0,0,0}; + soundDeactivation[] = {"",0,0,0}; + hit = 500; + indirectHit = 500; + indirectHitRange = 7; + }; + class SatchelCharge_Remote_Ammo:PipeBombBase{ + ACE_Explosive = "SatchelCharge_Remote_Ammo_Scripted"; + soundActivation[] = {"",0,0,0}; + soundDeactivation[] = {"",0,0,0}; + }; + /* + class DemoCharge_Remote_Ammo_Scripted:DemoCharge_Remote_Ammo; + class SatchelCharge_Remote_Ammo_Scripted:SatchelCharge_Remote_Ammo; TODO: Configure IEDs to use the system. - class IEDLandBig_Remote_Ammo:PipeBombBase{ - triggerWhenDestroyed = 1; + class IEDLandBig_Remote_Ammo:PipeBombBase{ + triggerWhenDestroyed = 1; }; class IEDLandSmall_Remote_Ammo:PipeBombBase{ triggerWhenDestroyed = 1; diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index cefc2fe389..8d0b110935 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -1,20 +1,20 @@ class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; }; class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - }; + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; }; /* TODO: Move the addEventHandlers out of PostInit into here or separate eventHandlers, - to enable them on all units, so unit switching works for explosives properly. +to enable them on all units, so unit switching works for explosives properly. class Extended_Init_EventHandlers { - class CAManBase { - init = ""; - } +class CAManBase { +init = ""; +} } */ diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 51c85e607f..b89a207992 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -1,127 +1,127 @@ class CfgMagazines { - class CA_Magazine; - class ATMine_Range_Mag:CA_Magazine{ - ACE_Placeable = 1; - useAction = 0; - ACE_SetupObject = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object. - ACE_DelayTime = 2.5; - class ACE_Triggers { - SupportedTriggers[] = {"PressurePlate"}; - class PressurePlate { - digDistance = 0.1; - }; + class CA_Magazine; + class ATMine_Range_Mag:CA_Magazine{ + ACE_Placeable = 1; + useAction = 0; + ACE_SetupObject = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object. + ACE_DelayTime = 2.5; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.1; + }; + }; }; - }; - class APERSBoundingMine_Range_Mag:ATMine_Range_Mag{ - ACE_SetupObject = "ACE_Explosives_Place_APERSBoundingMine"; - class ACE_Triggers { - SupportedTriggers[] = {"PressurePlate"}; - class PressurePlate { - digDistance = 0.075; - }; + class APERSBoundingMine_Range_Mag:ATMine_Range_Mag{ + ACE_SetupObject = "ACE_Explosives_Place_APERSBoundingMine"; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.075; + }; + }; }; - }; - class APERSMine_Range_Mag:ATMine_Range_Mag{ - ACE_SetupObject = "ACE_Explosives_Place_APERSMine"; - class ACE_Triggers { - SupportedTriggers[] = {"PressurePlate"}; - class PressurePlate { - digDistance = 0.05; - }; + class APERSMine_Range_Mag:ATMine_Range_Mag{ + ACE_SetupObject = "ACE_Explosives_Place_APERSMine"; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.05; + }; + }; }; - }; - class APERSTripMine_Wire_Mag:ATMine_Range_Mag{ - ACE_SetupObject = "ACE_Explosives_Place_APERSTripwireMine"; - class ACE_Triggers { - SupportedTriggers[] = {"Tripwire"}; - class Tripwire; + class APERSTripMine_Wire_Mag:ATMine_Range_Mag{ + ACE_SetupObject = "ACE_Explosives_Place_APERSTripwireMine"; + class ACE_Triggers { + SupportedTriggers[] = {"Tripwire"}; + class Tripwire; + }; }; - }; - class ClaymoreDirectionalMine_Remote_Mag:CA_Magazine{ - ACE_Placeable = 1; - useAction = 0; - ACE_SetupObject = "ACE_Explosives_Place_Claymore"; - ACE_DelayTime = 1.5; - class ACE_Triggers { - SupportedTriggers[] = {"Command"}; - class Command { - FuseTime = 0.5; - }; + class ClaymoreDirectionalMine_Remote_Mag:CA_Magazine{ + ACE_Placeable = 1; + useAction = 0; + ACE_SetupObject = "ACE_Explosives_Place_Claymore"; + ACE_DelayTime = 1.5; + class ACE_Triggers { + SupportedTriggers[] = {"Command"}; + class Command { + FuseTime = 0.5; + }; + }; }; - }; - class SatchelCharge_Remote_Mag:CA_Magazine{ - ACE_Placeable = 1; - useAction = 0; - ACE_SetupObject = "ACE_Explosives_Place_SatchelCharge"; - ACE_DelayTime = 1; - class ACE_Triggers { - SupportedTriggers[] = {"Timer","Command", "MK16_Transmitter", "DeadmanSwitch"}; - class Timer { - FuseTime = 0.5; - }; - class Command { - FuseTime = 0.5; - }; - class MK16_Transmitter:Command{}; - class DeadmanSwitch:Command{}; + class SatchelCharge_Remote_Mag:CA_Magazine{ + ACE_Placeable = 1; + useAction = 0; + ACE_SetupObject = "ACE_Explosives_Place_SatchelCharge"; + ACE_DelayTime = 1; + class ACE_Triggers { + SupportedTriggers[] = {"Timer","Command", "MK16_Transmitter", "DeadmanSwitch"}; + class Timer { + FuseTime = 0.5; + }; + class Command { + FuseTime = 0.5; + }; + class MK16_Transmitter:Command{}; + class DeadmanSwitch:Command{}; + }; + }; + class DemoCharge_Remote_Mag:SatchelCharge_Remote_Mag{ + ACE_SetupObject = "ACE_Explosives_Place_DemoCharge"; + model = "\A3\Weapons_F\explosives\c4_charge_small_d"; }; - }; - class DemoCharge_Remote_Mag:SatchelCharge_Remote_Mag{ - ACE_SetupObject = "ACE_Explosives_Place_DemoCharge"; - model = "\A3\Weapons_F\explosives\c4_charge_small_d"; - }; - class SLAMDirectionalMine_Wire_Mag: ATMine_Range_Mag{ - ACE_SetupObject = "ACE_Explosives_Place_SLAM"; - class ACE_Triggers { - SupportedTriggers[] = {"IRSensor","PressurePlate","Timer","Command"}; - class PressurePlate{ - displayName = $STR_ACE_Explosives_SLAME_Magnetic; - digDistance = 0; - ammo = "SLAMDirectionalMine_Magnetic_Ammo"; - pitch = 90; - }; - class IRSensor{ - displayName = $STR_ACE_Explosives_SLAME_IRSensor; - }; - class Timer { - ammo = "SLAMDirectionalMine_Timer_Ammo"; - }; - class Command { - ammo = "SLAMDirectionalMine_Command_Ammo"; - fuseTime = 0.5; - }; + class SLAMDirectionalMine_Wire_Mag: ATMine_Range_Mag{ + ACE_SetupObject = "ACE_Explosives_Place_SLAM"; + class ACE_Triggers { + SupportedTriggers[] = {"IRSensor","PressurePlate","Timer","Command"}; + class PressurePlate{ + displayName = $STR_ACE_Explosives_SLAME_Magnetic; + digDistance = 0; + ammo = "SLAMDirectionalMine_Magnetic_Ammo"; + pitch = 90; + }; + class IRSensor{ + displayName = $STR_ACE_Explosives_SLAME_IRSensor; + }; + class Timer { + ammo = "SLAMDirectionalMine_Timer_Ammo"; + }; + class Command { + ammo = "SLAMDirectionalMine_Command_Ammo"; + fuseTime = 0.5; + }; + }; }; - }; - class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig"; - class ACE_Triggers { - SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"}; - class Command { - FuseTime = 0.5; - }; - class DeadmanSwitch:Command{}; - class Cellphone:Command{}; + class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag { + ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig"; + class ACE_Triggers { + SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"}; + class Command { + FuseTime = 0.5; + }; + class DeadmanSwitch:Command{}; + class Cellphone:Command{}; + }; }; - }; - class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag{ - ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig"; - }; - class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall"; - class ACE_Triggers { - SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"}; - class Command { - FuseTime = 0.5; - }; - class DeadmanSwitch:Command{}; - class Cellphone:Command{}; + class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag{ + ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig"; + }; + class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { + ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall"; + class ACE_Triggers { + SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"}; + class Command { + FuseTime = 0.5; + }; + class DeadmanSwitch:Command{}; + class Cellphone:Command{}; + }; + }; + class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag { + ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall"; }; - }; - class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag { - ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall"; - }; }; diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index fe467cbb53..b4f7b65a83 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -1,44 +1,44 @@ class Module_F; class ACE_ModuleExplosive: Module_F { - author = "$STR_ACE_Common_ACETeam"; - category = "ACE"; - displayName = "Explosive System"; - function = QUOTE(FUNC(module)); - scope = 2; - isGlobal = 1; - icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa); - class Arguments { - class RequireSpecialist { - displayName = "Require specialists?"; - description = "Require explosive specialists to disable explosives? Default: No"; - typeName = "BOOL"; - class values { - class Yes { - name = "Yes"; - value = 1; + author = "$STR_ACE_Common_ACETeam"; + category = "ACE"; + displayName = "Explosive System"; + function = QUOTE(FUNC(module)); + scope = 2; + isGlobal = 1; + icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa); + class Arguments { + class RequireSpecialist { + displayName = "Require specialists?"; + description = "Require explosive specialists to disable explosives? Default: No"; + typeName = "BOOL"; + class values { + class Yes { + name = "Yes"; + value = 1; + }; + class No { + default = 1; + name = "No"; + value = 0; + }; + }; }; - class No { - default = 1; - name = "No"; - value = 0; + class PunishNonSpecialists { + displayName = "Punish non-specialists?"; + description = "Increase the time it takes to complete actions for non-specialists? Default: Yes"; + typeName = "BOOL"; + class values { + class Yes { + default = 1; + name = "Yes"; + value = 1; + }; + class No { + name = "No"; + value = 0; + }; + }; }; - }; }; - class PunishNonSpecialists { - displayName = "Punish non-specialists?"; - description = "Increase the time it takes to complete actions for non-specialists? Default: Yes"; - typeName = "BOOL"; - class values { - class Yes { - default = 1; - name = "Yes"; - value = 1; - }; - class No { - name = "No"; - value = 0; - }; - }; - }; - }; }; diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index af2ed90cb6..30e1ff151d 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -1,275 +1,327 @@ class CfgVehicles { - class Man; - - class CAManBase: Man { - class ACE_SelfActions { - class ACE_Explosives { - displayName = $STR_ACE_Explosives_Menu; - condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)])); - statement = ""; - exceptions[] = {"isNotSwimming"}; - showDisabled = 1; - priority = 4; - icon = PATHTOF(UI\Explosives_Menu_ca.paa); - hotkey = "X"; - //Sub-menu items - class ACE_Detonate { - displayName = $STR_ACE_Explosives_Detonate; - condition = QUOTE([_player] call FUNC(canDetonate)); - statement = QUOTE([_player] call FUNC(openTransmitterUI);); - exceptions[] = {"isNotSwimming"}; - showDisabled = 1; - icon = PATHTOF(UI\Explosives_Menu_ca.paa); - priority = 2; - hotkey = "T"; + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Explosives { + displayName = $STR_ACE_Explosives_Menu; + condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)])); + statement = ""; + exceptions[] = {"isNotSwimming", "isNotInside"}; + showDisabled = 1; + priority = 4; + icon = PATHTOF(UI\Explosives_Menu_ca.paa); + hotkey = "X"; + //Sub-menu items + class ACE_Detonate { + displayName = $STR_ACE_Explosives_Detonate; + condition = QUOTE([_player] call FUNC(canDetonate)); + statement = ""; + insertChildren = QUOTE([_player] call FUNC(addTransmitterActions);); + exceptions[] = {"isNotSwimming", "isNotInside"}; + showDisabled = 1; + icon = PATHTOF(UI\Explosives_Menu_ca.paa); + priority = 2; + hotkey = "T"; + }; + class ACE_Place { + displayName = $STR_ACE_Explosives_Place; + condition = QUOTE((vehicle _player == _player) and {[_player] call FUNC(hasExplosives)}); + statement = ""; + insertChildren = QUOTE([_player] call FUNC(addExplosiveActions);); + exceptions[] = {"isNotSwimming"}; + showDisabled = 1; + icon = PATHTOF(UI\Place_Explosive_ca.paa); + priority = 1; + hotkey = "P"; + }; + class ACE_Cellphone { + displayName = $STR_ACE_Explosives_cellphone_displayName; + condition = "('ACE_Cellphone' in (items ace_player))"; + statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';"; + exceptions[] = {"isNotSwimming", "isNotInside"}; + showDisabled = 0; + icon = PATHTOF(Data\UI\Cellphone_UI.paa); + priority = 0.8; + }; + }; }; - class ACE_Place { - displayName = $STR_ACE_Explosives_Place; - condition = QUOTE((vehicle _player == _player) and {[_player] call FUNC(hasExplosives)}); - statement = QUOTE([_player] call FUNC(openPlaceUI);); - exceptions[] = {"isNotSwimming"}; - showDisabled = 1; - icon = PATHTOF(UI\Place_Explosive_ca.paa); - priority = 1; - hotkey = "P"; + }; + + class Items_base_F; + class ACE_DefuseObject: Items_base_F { + XEH_ENABLED; + author = "ACE"; + _generalMacro = "ACE_DefuseObject"; + displayName = "ACE Defuse Helper"; + mapSize = 0.2; + icon = "iconObject_1x2"; + model = "\A3\Weapons_f\dummyweapon.p3d"; + scope = 2; + scopeCurator = 1; + vehicleClass = "Cargo"; + class ACE_Actions { + class ACE_MainActions { + selection = ""; + distance = 5; + condition = "true"; + class ACE_Defuse { + displayName = $STR_ACE_Explosives_Defuse; + condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDefuse)); + statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse);); + exceptions[] = {"isNotSwimming"}; + showDisabled = 0; + icon = PATHTOF(UI\Defuse_ca.paa); + priority = 0.8; + hotkey = "F"; + distance = 5; + }; + }; }; - class ACE_Defuse { - displayName = $STR_ACE_Explosives_Defuse; - condition = QUOTE([_player] call FUNC(canDefuse)); - statement = QUOTE([ARR_2(_player,EGVAR(Interaction,Target))] call FUNC(startDefuse);); - exceptions[] = {"isNotSwimming"}; - showDisabled = 0; - icon = PATHTOF(UI\Defuse_ca.paa); - priority = 0.8; - hotkey = "F"; + }; + class ACE_Explosives_Place: Items_base_F { + XEH_ENABLED; + author = "ACE"; + _generalMacro = "ACE_Explosives_Place"; + displayName = "Multi-meter"; + mapSize = 0.2; + icon = "iconObject_1x2"; + model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d"; + scope = 2; + scopeCurator = 1; + vehicleClass = "Cargo"; + ACE_offset[] = {0,0,0}; + class ACE_Actions { + class ACE_MainActions { + selection = ""; + distance = 5; + condition = "true"; + class ACE_SetTrigger { + selection = ""; + displayName = "$STR_ACE_Explosives_TriggerMenu"; + distance = 4; + condition = "true"; + statement = ""; + insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions);); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = QUOTE(PATHTOF(UI\Explosives_Menu_ca.paa)); + }; + class ACE_PickUp { + selection = ""; + displayName = "$STR_ACE_Explosives_Pickup"; + distance = 4; + condition = "true"; + statement = QUOTE([ARR_2(_player,_target getVariable QUOTE(QGVAR(class)))] call EFUNC(common,addToInventory);deleteVehicle _target;); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_takemine_ca.paa"; + }; + }; }; - class ACE_Cellphone { - displayName = $STR_ACE_Explosives_cellphone_displayName; - condition = "('ACE_Cellphone' in (items ace_player))"; - statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';"; - exceptions[] = {"isNotSwimming"}; - showDisabled = 0; - icon = PATHTOF(Data\UI\Cellphone_UI.paa); - priority = 0.8; + }; + + class ACE_Explosives_Place_DemoCharge:ACE_Explosives_Place { + displayName = "Demo Charge"; + model = "\A3\Weapons_F\explosives\c4_charge_small_d"; + }; + class ACE_Explosives_Place_APERSBoundingMine:ACE_Explosives_Place { + displayName = "APERS Bounding Mine"; + model = "\A3\Weapons_F\explosives\mine_AP_bouncing"; + }; + class ACE_Explosives_Place_APERSMine:ACE_Explosives_Place { + displayName = "APERS Mine"; + model = "\A3\Weapons_F\explosives\mine_ap"; + }; + class ACE_Explosives_Place_APERSTripwireMine:ACE_Explosives_Place { + displayName = "APERS Tripwire Mine"; + model = "\A3\Weapons_F\explosives\mine_AP_tripwire"; + ACE_offset[] = {1,0,0}; + }; + + class ACE_Explosives_Place_ATMine:ACE_Explosives_Place { + displayName = "AT Mine"; + model = "\A3\Weapons_f\Explosives\mine_at"; + }; + + class ACE_Explosives_Place_Claymore:ACE_Explosives_Place { + displayName = "Claymore"; + model = "\A3\Weapons_F\explosives\mine_AP_miniclaymore"; + }; + + class ACE_Explosives_Place_SatchelCharge:ACE_Explosives_Place { + displayName = "Satchel Charge"; + model = "\A3\Weapons_F\Explosives\satchel"; + }; + + class ACE_Explosives_Place_SLAM:ACE_Explosives_Place { + displayName = "SLAM"; + model = "\A3\Weapons_F\Explosives\mine_SLAM_directional"; + }; + + // IEDs + class ACE_Explosives_Place_IEDUrbanBig:ACE_Explosives_Place { + displayName = "IED Urban Big"; + model = "\A3\Weapons_F\Explosives\IED_urban_big"; + }; + + class ACE_Explosives_Place_IEDLandBig:ACE_Explosives_Place { + displayName = "IED Land Big"; + model = "\A3\Weapons_F\Explosives\IED_land_big"; + }; + + class ACE_Explosives_Place_IEDUrbanSmall:ACE_Explosives_Place { + displayName = "IED Urban Small"; + model = "\A3\Weapons_F\Explosives\IED_urban_small"; + }; + + class ACE_Explosives_Place_IEDLandSmall:ACE_Explosives_Place { + displayName = "IED Land Small"; + model = "\A3\Weapons_F\Explosives\IED_land_small"; + }; + + class NATO_Box_Base; + class EAST_Box_Base; + class IND_Box_Base; + class FIA_Box_Base_F; + class Box_NATO_Support_F; + + class Box_NATO_AmmoOrd_F: NATO_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Clacker,12); + MACRO_ADDITEM(ACE_M26_Clacker,6); + MACRO_ADDITEM(ACE_DefusalKit,12); }; - }; }; - }; - class Items_base_F; - class ACE_Explosives_Place: Items_base_F { - author = "ACE"; - _generalMacro = "ACE_Explosives_Place"; - displayName = "Multi-meter"; - mapSize = 0.2; - icon = "iconObject_1x2"; - model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d"; - scope = 2; - scopeCurator = 1; - vehicleClass = "Cargo"; - ACE_offset[] = {0,0,0}; - }; - - class ACE_Explosives_Place_DemoCharge:ACE_Explosives_Place { - displayName = "Demo Charge"; - model = "\A3\Weapons_F\explosives\c4_charge_small_d"; - }; - class ACE_Explosives_Place_APERSBoundingMine:ACE_Explosives_Place { - displayName = "APERS Bounding Mine"; - model = "\A3\Weapons_F\explosives\mine_AP_bouncing"; - }; - class ACE_Explosives_Place_APERSMine:ACE_Explosives_Place { - displayName = "APERS Mine"; - model = "\A3\Weapons_F\explosives\mine_ap"; - }; - class ACE_Explosives_Place_APERSTripwireMine:ACE_Explosives_Place { - displayName = "APERS Tripwire Mine"; - model = "\A3\Weapons_F\explosives\mine_AP_tripwire"; - ACE_offset[] = {1,0,0}; - }; - - class ACE_Explosives_Place_ATMine:ACE_Explosives_Place { - displayName = "AT Mine"; - model = "\A3\Weapons_f\Explosives\mine_at"; - }; - - class ACE_Explosives_Place_Claymore:ACE_Explosives_Place { - displayName = "Claymore"; - model = "\A3\Weapons_F\explosives\mine_AP_miniclaymore"; - }; - - class ACE_Explosives_Place_SatchelCharge:ACE_Explosives_Place { - displayName = "Satchel Charge"; - model = "\A3\Weapons_F\Explosives\satchel"; - }; - - class ACE_Explosives_Place_SLAM:ACE_Explosives_Place { - displayName = "SLAM"; - model = "\A3\Weapons_F\Explosives\mine_SLAM_directional"; - }; - - // IEDs - class ACE_Explosives_Place_IEDUrbanBig:ACE_Explosives_Place { - displayName = "IED Urban Big"; - model = "\A3\Weapons_F\Explosives\IED_urban_big"; - }; - - class ACE_Explosives_Place_IEDLandBig:ACE_Explosives_Place { - displayName = "IED Land Big"; - model = "\A3\Weapons_F\Explosives\IED_land_big"; - }; - - class ACE_Explosives_Place_IEDUrbanSmall:ACE_Explosives_Place { - displayName = "IED Urban Small"; - model = "\A3\Weapons_F\Explosives\IED_urban_small"; - }; - - class ACE_Explosives_Place_IEDLandSmall:ACE_Explosives_Place { - displayName = "IED Land Small"; - model = "\A3\Weapons_F\Explosives\IED_land_small"; - }; - - class NATO_Box_Base; - class EAST_Box_Base; - class IND_Box_Base; - class FIA_Box_Base_F; - class Box_NATO_Support_F; - - class Box_NATO_AmmoOrd_F: NATO_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_Clacker,12); - MACRO_ADDITEM(ACE_M26_Clacker,6); - MACRO_ADDITEM(ACE_DefusalKit,12); + class Box_East_AmmoOrd_F: EAST_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Clacker,12); + MACRO_ADDITEM(ACE_M26_Clacker,6); + MACRO_ADDITEM(ACE_DefusalKit,12); + }; }; - }; - class Box_East_AmmoOrd_F: EAST_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_Clacker,12); - MACRO_ADDITEM(ACE_M26_Clacker,6); - MACRO_ADDITEM(ACE_DefusalKit,12); + class Box_IND_AmmoOrd_F: IND_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Clacker,12); + MACRO_ADDITEM(ACE_M26_Clacker,6); + MACRO_ADDITEM(ACE_DefusalKit,12); + MACRO_ADDITEM(ACE_Deadmanswitch,2); + MACRO_ADDITEM(ACE_Cellphone,3); + }; }; - }; - class Box_IND_AmmoOrd_F: IND_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_Clacker,12); - MACRO_ADDITEM(ACE_M26_Clacker,6); - MACRO_ADDITEM(ACE_DefusalKit,12); - MACRO_ADDITEM(ACE_Deadmanswitch,2); - MACRO_ADDITEM(ACE_Cellphone,3); + class Box_FIA_Ammo_F: FIA_Box_Base_F { + class TransportItems { + MACRO_ADDITEM(ACE_Clacker,2); + MACRO_ADDITEM(ACE_M26_Clacker,2); + MACRO_ADDITEM(ACE_DefusalKit,2); + MACRO_ADDITEM(ACE_Deadmanswitch,1); + MACRO_ADDITEM(ACE_Cellphone,2); + }; }; - }; - class Box_FIA_Ammo_F: FIA_Box_Base_F { - class TransportItems { - MACRO_ADDITEM(ACE_Clacker,2); - MACRO_ADDITEM(ACE_M26_Clacker,2); - MACRO_ADDITEM(ACE_DefusalKit,2); - MACRO_ADDITEM(ACE_Deadmanswitch,1); - MACRO_ADDITEM(ACE_Cellphone,2); + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_Clacker,12); + MACRO_ADDITEM(ACE_M26_Clacker,6); + MACRO_ADDITEM(ACE_DefusalKit,12); + MACRO_ADDITEM(ACE_Deadmanswitch,6); + MACRO_ADDITEM(ACE_Cellphone,10); + }; }; - }; - class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_Clacker,12); - MACRO_ADDITEM(ACE_M26_Clacker,6); - MACRO_ADDITEM(ACE_DefusalKit,12); - MACRO_ADDITEM(ACE_Deadmanswitch,6); - MACRO_ADDITEM(ACE_Cellphone,10); + class B_Kitbag_rgr; + class B_Kitbag_rgr_Exp: B_Kitbag_rgr { + class TransportItems { + class _xx_ToolKit { // xXToOlKiT420mLgXx + count = 0; + }; + }; }; - }; - - class B_Kitbag_rgr; - class B_Kitbag_rgr_Exp: B_Kitbag_rgr { - class TransportItems { - class _xx_ToolKit { // xXToOlKiT420mLgXx - count = 0; - }; + class B_Carryall_ocamo; + class B_Carryall_ocamo_Exp: B_Carryall_ocamo { + class TransportItems { + class _xx_ToolKit { + count = 0; + }; + }; }; - }; - class B_Carryall_ocamo; - class B_Carryall_ocamo_Exp: B_Carryall_ocamo { - class TransportItems { - class _xx_ToolKit { - count = 0; - }; + class B_Carryall_oucamo; + class B_Carryall_oucamo_Exp: B_Carryall_oucamo { + class TransportItems { + class _xx_ToolKit { + count = 0; + }; + }; }; - }; - class B_Carryall_oucamo; - class B_Carryall_oucamo_Exp: B_Carryall_oucamo { - class TransportItems { - class _xx_ToolKit { - count = 0; - }; + class B_Carryall_oli; + class G_Carryall_Exp: B_Carryall_oli { + class TransportItems { + class _xx_ToolKit { + count = 0; + }; + }; }; - }; - class B_Carryall_oli; - class G_Carryall_Exp: B_Carryall_oli { - class TransportItems { - class _xx_ToolKit { - count = 0; - }; + class I_Carryall_oli_Exp: B_Carryall_oli { + class TransportItems { + class _xx_ToolKit { + count = 0; + }; + }; }; - }; - class I_Carryall_oli_Exp: B_Carryall_oli { - class TransportItems { - class _xx_ToolKit { - count = 0; - }; - }; - }; - #include "CfgModule.hpp" + #include "CfgModule.hpp" - // Add ACE_Clacker and ACE_DefusalKit to every explosive unit. - #define MACRO_ADDMINEKIT \ - items[] = {"FirstAidKit", "ACE_Clacker", "ACE_DefusalKit"}; \ - respawnitems[] = {"FirstAidKit", "ACE_Clacker", "ACE_DefusalKit"}; + // Add ACE_Clacker and ACE_DefusalKit to every explosive unit. + #define MACRO_ADDMINEKIT \ + items[] = {"FirstAidKit", "ACE_Clacker", "ACE_DefusalKit"}; \ + respawnitems[] = {"FirstAidKit", "ACE_Clacker", "ACE_DefusalKit"}; - class B_Soldier_base_F; class B_soldier_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT}; - class B_Soldier_03_f; class B_engineer_F:B_Soldier_03_f {MACRO_ADDMINEKIT}; - class B_Soldier_diver_base_F; class B_diver_exp_F:B_Soldier_diver_base_F {MACRO_ADDMINEKIT}; - class B_Soldier_recon_base; class B_recon_exp_F:B_Soldier_recon_base {MACRO_ADDMINEKIT}; - class B_CTRG_soldier_engineer_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT}; - class I_G_Soldier_base_F; class I_G_engineer_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT}; - class I_G_Soldier_exp_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT}; - class B_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT}; - class O_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT}; - class B_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT}; - class O_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT}; - class I_Soldier_02_F; class I_Soldier_exp_F:I_Soldier_02_F {MACRO_ADDMINEKIT}; - class I_Soldier_base_F; class I_engineer_F:I_Soldier_base_F {MACRO_ADDMINEKIT}; - class I_Soldier_diver_base_F; class I_diver_exp_F:I_Soldier_diver_base_F {MACRO_ADDMINEKIT}; - class O_Soldier_base_F; class O_soldier_exp_F:O_Soldier_base_F {MACRO_ADDMINEKIT}; - class O_engineer_F:O_Soldier_base_F {MACRO_ADDMINEKIT}; - class O_Soldier_diver_base_F; class O_diver_exp_F:O_Soldier_diver_base_F {MACRO_ADDMINEKIT}; - class O_Soldier_recon_base; class O_recon_exp_F:O_Soldier_recon_base {MACRO_ADDMINEKIT}; - class O_Soldier_Urban_base; class O_soldierU_exp_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT}; - class O_engineer_U_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT}; - class B_Protagonist_VR_F:B_Soldier_base_F {MACRO_ADDMINEKIT}; - class O_Protagonist_VR_F:O_Soldier_base_F {MACRO_ADDMINEKIT}; - class I_Protagonist_VR_F:I_Soldier_base_F {MACRO_ADDMINEKIT}; - class B_Soldier_F; class b_soldier_universal_f:B_Soldier_F {MACRO_ADDMINEKIT}; - class B_G_Soldier_F; class b_g_soldier_universal_f:B_G_Soldier_F {MACRO_ADDMINEKIT}; - class O_Soldier_F; class o_soldier_universal_f:O_Soldier_F {MACRO_ADDMINEKIT}; - class O_G_Soldier_F; class o_g_soldier_universal_f:O_G_Soldier_F {MACRO_ADDMINEKIT}; - class I_soldier_F; class i_soldier_universal_f:I_soldier_F {MACRO_ADDMINEKIT}; - class I_G_Soldier_F; class i_g_soldier_universal_f:I_G_Soldier_F {MACRO_ADDMINEKIT}; + class B_Soldier_base_F; class B_soldier_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT}; + class B_Soldier_03_f; class B_engineer_F:B_Soldier_03_f {MACRO_ADDMINEKIT}; + class B_Soldier_diver_base_F; class B_diver_exp_F:B_Soldier_diver_base_F {MACRO_ADDMINEKIT}; + class B_Soldier_recon_base; class B_recon_exp_F:B_Soldier_recon_base {MACRO_ADDMINEKIT}; + class B_CTRG_soldier_engineer_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT}; + class I_G_Soldier_base_F; class I_G_engineer_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT}; + class I_G_Soldier_exp_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT}; + class B_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT}; + class O_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT}; + class B_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT}; + class O_G_Soldier_exp_F:I_G_Soldier_exp_F {MACRO_ADDMINEKIT}; + class I_Soldier_02_F; class I_Soldier_exp_F:I_Soldier_02_F {MACRO_ADDMINEKIT}; + class I_Soldier_base_F; class I_engineer_F:I_Soldier_base_F {MACRO_ADDMINEKIT}; + class I_Soldier_diver_base_F; class I_diver_exp_F:I_Soldier_diver_base_F {MACRO_ADDMINEKIT}; + class O_Soldier_base_F; class O_soldier_exp_F:O_Soldier_base_F {MACRO_ADDMINEKIT}; + class O_engineer_F:O_Soldier_base_F {MACRO_ADDMINEKIT}; + class O_Soldier_diver_base_F; class O_diver_exp_F:O_Soldier_diver_base_F {MACRO_ADDMINEKIT}; + class O_Soldier_recon_base; class O_recon_exp_F:O_Soldier_recon_base {MACRO_ADDMINEKIT}; + class O_Soldier_Urban_base; class O_soldierU_exp_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT}; + class O_engineer_U_F:O_Soldier_Urban_base {MACRO_ADDMINEKIT}; + class B_Protagonist_VR_F:B_Soldier_base_F {MACRO_ADDMINEKIT}; + class O_Protagonist_VR_F:O_Soldier_base_F {MACRO_ADDMINEKIT}; + class I_Protagonist_VR_F:I_Soldier_base_F {MACRO_ADDMINEKIT}; + class B_Soldier_F; class b_soldier_universal_f:B_Soldier_F {MACRO_ADDMINEKIT}; + class B_G_Soldier_F; class b_g_soldier_universal_f:B_G_Soldier_F {MACRO_ADDMINEKIT}; + class O_Soldier_F; class o_soldier_universal_f:O_Soldier_F {MACRO_ADDMINEKIT}; + class O_G_Soldier_F; class o_g_soldier_universal_f:O_G_Soldier_F {MACRO_ADDMINEKIT}; + class I_soldier_F; class i_soldier_universal_f:I_soldier_F {MACRO_ADDMINEKIT}; + class I_G_Soldier_F; class i_g_soldier_universal_f:I_G_Soldier_F {MACRO_ADDMINEKIT}; - // Add ACE_Clacker to snipers and spotters for setting off Claymores - #define MACRO_ADDCLAYMOREKIT \ - items[] = {"FirstAidKit","ACE_Clacker"}; \ - respawnitems[] = {"FirstAidKit","ACE_Clacker"}; + // Add ACE_Clacker to snipers and spotters for setting off Claymores + #define MACRO_ADDCLAYMOREKIT \ + items[] = {"FirstAidKit","ACE_Clacker"}; \ + respawnitems[] = {"FirstAidKit","ACE_Clacker"}; - class B_Soldier_sniper_base_F; - class B_sniper_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; - class B_spotter_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; - class I_Soldier_sniper_base_F; - class I_Sniper_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; - class I_Spotter_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; - class O_Soldier_sniper_base_F; - class O_sniper_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; - class O_spotter_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + class B_Soldier_sniper_base_F; + class B_sniper_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + class B_spotter_F: B_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + class I_Soldier_sniper_base_F; + class I_Sniper_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + class I_Spotter_F: I_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + class O_Soldier_sniper_base_F; + class O_sniper_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; + class O_spotter_F: O_Soldier_sniper_base_F {MACRO_ADDCLAYMOREKIT}; }; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index fd142019e8..a90b4d515f 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -1,69 +1,69 @@ class CfgWeapons { - class ACE_ItemCore; - class InventoryItem_Base_f; + class ACE_ItemCore; + class InventoryItem_Base_f; - class ACE_ExplosiveItem: InventoryItem_Base_f { - allowedSlots[] = {801,701,901}; - //type = 201; - }; - - class ACE_Clacker: ACE_ItemCore { - scope = 2; - displayName = $STR_ACE_Explosives_clacker_displayName; - descriptionShort = $STR_ACE_Explosives_clacker_description; - picture = PATHTOF(Data\UI\Clacker.paa); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; - ACE_Range = 250; - ACE_Detonator = 1; - - class ItemInfo: ACE_ExplosiveItem { - mass = 3; - uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d"; + class ACE_ExplosiveItem: InventoryItem_Base_f { + allowedSlots[] = {801,701,901}; + //type = 201; }; - }; - class ACE_M26_Clacker: ACE_Clacker { - displayName = $STR_ACE_Explosives_M26_displayName; - picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); - ACE_Range = 5000; - }; - class ACE_DefusalKit: ACE_ItemCore { - scope = 2; - displayName = $STR_ACE_Explosives_DefusalKit_displayName; - descriptionShort = $STR_ACE_Explosives_DefusalKit_description; - picture = PATHTOF(Data\UI\Pliers.paa); - model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d"; - class ItemInfo: ACE_ExplosiveItem { - mass = 5; - uniformModel = "\A3\Structures_F\Items\Tools\Pliers_F.p3d"; - }; - }; - class ACE_DeadManSwitch: ACE_ItemCore { - scope = 2; - displayName = $STR_ACE_Explosives_DeadManSwitch_displayName; - descriptionShort = $STR_ACE_Explosives_DeadManSwitch_description; - picture = PATHTOF(Data\UI\DeadmanSwitch.paa); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; - ACE_Range = 100; - ACE_Detonator = 1; + class ACE_Clacker: ACE_ItemCore { + scope = 2; + displayName = $STR_ACE_Explosives_clacker_displayName; + descriptionShort = $STR_ACE_Explosives_clacker_description; + picture = PATHTOF(Data\UI\Clacker.paa); + model = "\A3\weapons_F\ammo\mag_univ.p3d"; + ACE_Range = 250; + ACE_Detonator = 1; - class ItemInfo: ACE_ExplosiveItem { - mass = 2; - uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d"; + class ItemInfo: ACE_ExplosiveItem { + mass = 3; + uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d"; + }; }; - }; - class ACE_Cellphone: ACE_ItemCore { - scope = 2; - displayName = $STR_ACE_Explosives_cellphone_displayName; - descriptionShort = $STR_ACE_Explosives_cellphone_description; - picture = PATHTOF(Data\UI\Cellphone_UI.paa); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; - ACE_Range = 15000; - ACE_Detonator = 1; + class ACE_M26_Clacker: ACE_Clacker { + displayName = $STR_ACE_Explosives_M26_displayName; + picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); + ACE_Range = 5000; + }; + class ACE_DefusalKit: ACE_ItemCore { + scope = 2; + displayName = $STR_ACE_Explosives_DefusalKit_displayName; + descriptionShort = $STR_ACE_Explosives_DefusalKit_description; + picture = PATHTOF(Data\UI\Pliers.paa); + model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d"; - class ItemInfo: ACE_ExplosiveItem { - mass = 2; - uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d"; + class ItemInfo: ACE_ExplosiveItem { + mass = 5; + uniformModel = "\A3\Structures_F\Items\Tools\Pliers_F.p3d"; + }; + }; + class ACE_DeadManSwitch: ACE_ItemCore { + scope = 2; + displayName = $STR_ACE_Explosives_DeadManSwitch_displayName; + descriptionShort = $STR_ACE_Explosives_DeadManSwitch_description; + picture = PATHTOF(Data\UI\DeadmanSwitch.paa); + model = "\A3\weapons_F\ammo\mag_univ.p3d"; + ACE_Range = 100; + ACE_Detonator = 1; + + class ItemInfo: ACE_ExplosiveItem { + mass = 2; + uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d"; + }; + }; + class ACE_Cellphone: ACE_ItemCore { + scope = 2; + displayName = $STR_ACE_Explosives_cellphone_displayName; + descriptionShort = $STR_ACE_Explosives_cellphone_description; + picture = PATHTOF(Data\UI\Cellphone_UI.paa); + model = "\A3\weapons_F\ammo\mag_univ.p3d"; + ACE_Range = 15000; + ACE_Detonator = 1; + + class ItemInfo: ACE_ExplosiveItem { + mass = 2; + uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d"; + }; }; - }; }; diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index 769b3dc167..6871f95f92 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -14,275 +14,275 @@ class RscPicture; class RscEdit; class Rsc_ACE_CallScreen_Edit:RscEdit { - canModify = 1; - colorBackground[] = {0,0,0,1}; - colorText[] = {0,0,0,1}; - colorDisabled[] = {1,1,1,0.25}; - colorSelection[] = { - "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])", - "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])", - "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", - 1 - }; - text = ""; - style = "0x00 + 0x40 + 0x200"; - shadow = 1; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) * 1)"; - x = 0.288594 * safezoneW + safezoneX; - w = 0.0825 * safezoneW; - h = 0.044 * safezoneH; + canModify = 1; + colorBackground[] = {0,0,0,1}; + colorText[] = {0,0,0,1}; + colorDisabled[] = {1,1,1,0.25}; + colorSelection[] = { + "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])", + "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])", + "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", + 1 + }; + text = ""; + style = "0x00 + 0x40 + 0x200"; + shadow = 1; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) * 1)"; + x = 0.288594 * safezoneW + safezoneX; + w = 0.0825 * safezoneW; + h = 0.044 * safezoneH; }; class Rsc_ACE_HiddenButton:RscButton { - colorText[] = {0, 0, 0, 0}; - colorDisabled[] = {0, 0, 0, 0}; - colorBackground[] = {0, 0, 0, 0}; - colorBackgroundDisabled[] = {0, 0, 0, 0}; - colorBackgroundActive[] = {0, 0, 0, 0}; - colorFocused[] = {0, 0, 0, 0}; - colorShadow[] = {0, 0, 0, 0}; - colorBorder[] = {0, 0, 0, 0}; - w = 0.095589; - h = 0.039216; - shadow = 0; + colorText[] = {0, 0, 0, 0}; + colorDisabled[] = {0, 0, 0, 0}; + colorBackground[] = {0, 0, 0, 0}; + colorBackgroundDisabled[] = {0, 0, 0, 0}; + colorBackgroundActive[] = {0, 0, 0, 0}; + colorFocused[] = {0, 0, 0, 0}; + colorShadow[] = {0, 0, 0, 0}; + colorBorder[] = {0, 0, 0, 0}; + w = 0.095589; + h = 0.039216; + shadow = 0; }; class Rsc_ACE_Timer_Slider:RscXSliderH { - x = 0.4; - y = 0.2; - w = 0.3; - h = "1*((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0,0,0,0.5}; + x = 0.4; + y = 0.2; + w = 0.3; + h = "1*((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0,0,0,0.5}; }; class RscACE_SelectTimeUI { - idd = 8854; - movingEnable = 0; - class controls { - class back:IGUIBack { - x = X_OFFSET; - y = 0; - w = 0.5; - h = 0.2; - colorBackground[] = {0, 0, 0, 0.5}; + idd = 8854; + movingEnable = 0; + class controls { + class back:IGUIBack { + x = X_OFFSET; + y = 0; + w = 0.5; + h = 0.2; + colorBackground[] = {0, 0, 0, 0.5}; + }; + class header: RscText{ + idc = 8870; + x = X_OFFSET + 0.005; + y = 0.005; + w = 0.49; + h = 0.05; + style = ST_CENTER; + text = ""; + }; + class slider: Rsc_ACE_Timer_Slider { + idc = 8845; + x = X_OFFSET + 0.005; + y = 0.06; + w = 0.49; + h = 0.025; + onSliderPosChanged = "private ['_mins', '_secs'];_mins = floor((_this select 1)/60);_secs=floor((_this select 1) - (_mins*60));ctrlSetText [8870, format[localize 'STR_ACE_Explosives_TimerMenu',_mins, _secs]];"; + }; + class cancelBtn: RscButton { + idc = 8855; + x = X_OFFSET + 0.005; + w = 0.15; + h = 0.1; + y = 0.09; + style = ST_CENTER; + text = $STR_ACE_Explosives_Cancel; + action = "closeDialog 0;"; + }; + class approveBtn: RscButton { + idc = 8860; + x = X_OFFSET + 0.345; + y = 0.09; + h = 0.1; + w = 0.15; + style = ST_CENTER; + text = $STR_ACE_Explosives_SetTime; + action = "closeDialog 0;"; + }; }; - class header: RscText{ - idc = 8870; - x = X_OFFSET + 0.005; - y = 0.005; - w = 0.49; - h = 0.05; - style = ST_CENTER; - text = ""; - }; - class slider: Rsc_ACE_Timer_Slider { - idc = 8845; - x = X_OFFSET + 0.005; - y = 0.06; - w = 0.49; - h = 0.025; - onSliderPosChanged = "private ['_mins', '_secs'];_mins = floor((_this select 1)/60);_secs=floor((_this select 1) - (_mins*60));ctrlSetText [8870, format[localize 'STR_ACE_Explosives_TimerMenu',_mins, _secs]];"; - }; - class cancelBtn: RscButton { - idc = 8855; - x = X_OFFSET + 0.005; - w = 0.15; - h = 0.1; - y = 0.09; - style = ST_CENTER; - text = $STR_ACE_Explosives_Cancel; - action = "closeDialog 0;"; - }; - class approveBtn: RscButton { - idc = 8860; - x = X_OFFSET + 0.345; - y = 0.09; - h = 0.1; - w = 0.15; - style = ST_CENTER; - text = $STR_ACE_Explosives_SetTime; - action = "closeDialog 0;"; - }; - }; }; class Rsc_ACE_NumKeyButton: Rsc_ACE_HiddenButton{}; class Rsc_ACE_PhoneInterface { - idd = 8855; - movingEnable = 1; - onLoad = QUOTE(GVAR(IED_CurrentSpeedDial) = -1); - class controls { - class RscPicture_1200: RscPicture { - idc = 1200; - text = PATHTOF(Data\UI\Cellphone_Background.paa); - x = 0.231875 * safezoneW + safezoneX; - y = 0.104 * safezoneH + safezoneY; - w = 0.195937 * safezoneW; - h = 0.704 * safezoneH; + idd = 8855; + movingEnable = 1; + onLoad = QUOTE(GVAR(IED_CurrentSpeedDial) = -1); + class controls { + class RscPicture_1200: RscPicture { + idc = 1200; + text = PATHTOF(Data\UI\Cellphone_Background.paa); + x = 0.231875 * safezoneW + safezoneX; + y = 0.104 * safezoneH + safezoneY; + w = 0.195937 * safezoneW; + h = 0.704 * safezoneH; + }; + class numkey_1: Rsc_ACE_NumKeyButton { + idc = 1600; + x = 0.278281 * safezoneW + safezoneX; + y = 0.533 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "1"; + action = "ctrlSetText [1400,((ctrlText 1400) + '1')];"; + }; + class numkey_2: Rsc_ACE_NumKeyButton { + idc = 1601; + x = 0.314375 * safezoneW + safezoneX; + y = 0.533 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "2"; + action = "ctrlSetText [1400,((ctrlText 1400) + '2')];"; + }; + class numkey_3: Rsc_ACE_NumKeyButton { + idc = 1602; + x = 0.350469 * safezoneW + safezoneX; + y = 0.533 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "3"; + action = "ctrlSetText [1400,((ctrlText 1400) + '3')];"; + }; + class numkey_4: Rsc_ACE_NumKeyButton { + idc = 1603; + x = 0.278281 * safezoneW + safezoneX; + y = 0.577 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "4"; + action = "ctrlSetText [1400,((ctrlText 1400) + '4')];"; + }; + class numkey_5: Rsc_ACE_NumKeyButton { + idc = 1604; + x = 0.314375 * safezoneW + safezoneX; + y = 0.577 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "5"; + action = "ctrlSetText [1400,((ctrlText 1400) + '5')];"; + }; + class numkey_6: Rsc_ACE_NumKeyButton { + idc = 1605; + x = 0.350469 * safezoneW + safezoneX; + y = 0.577 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "6"; + action = "ctrlSetText [1400,((ctrlText 1400) + '6')];"; + }; + class numkey_7: Rsc_ACE_NumKeyButton { + idc = 1606; + x = 0.278281 * safezoneW + safezoneX; + y = 0.621 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "7"; + action = "ctrlSetText [1400,((ctrlText 1400) + '7')];"; + }; + class numkey_8: Rsc_ACE_NumKeyButton { + idc = 1607; + x = 0.314375 * safezoneW + safezoneX; + y = 0.621 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "8"; + action = "ctrlSetText [1400,((ctrlText 1400) + '8')];"; + }; + class numkey_9: Rsc_ACE_NumKeyButton { + idc = 1608; + x = 0.350469 * safezoneW + safezoneX; + y = 0.621 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "9"; + action = "ctrlSetText [1400,((ctrlText 1400) + '9')];"; + }; + class numkey_0: Rsc_ACE_NumKeyButton { + idc = 1609; + x = 0.314375 * safezoneW + safezoneX; + y = 0.676 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "0"; + action = "ctrlSetText [1400,((ctrlText 1400) + '0')];"; + }; + class speedDialAdd: Rsc_ACE_NumKeyButton { + idc = 1610; + x = 0.278281 * safezoneW + safezoneX; + y = 0.676 * safezoneH + safezoneY; + w = 0.0309375 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "$STR_ACE_Explosives_Phone_AddToSpeedDial"; + action = QUOTE([ARR_2(ctrlText 1401,ctrlText 1400)] call FUNC(addToSpeedDial);); + }; + class clear: Rsc_ACE_HiddenButton { + idc = 1610; + x = 0.278281 * safezoneW + safezoneX; + y = 0.445 * safezoneH + safezoneY; + w = 0.020625 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "$STR_ACE_Explosives_Clear"; + action = QUOTE(ctrlSetText [ARR_2(1400,'')];[ctrlText 1401] call FUNC(removeFromSpeedDial);ctrlSetText [ARR_2(1401,'')];); + }; + class dial: Rsc_ACE_HiddenButton { + idc = 1611; + x = 0.309219 * safezoneW + safezoneX; + y = 0.445 * safezoneH + safezoneY; + w = 0.04125 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "$STR_ACE_Explosives_Phone_Dial"; + action = QUOTE([ARR_2(ace_player,ctrlText 1400)] call FUNC(dialPhone);); + }; + class up: Rsc_ACE_HiddenButton { + idc = 1612; + x = 0.360781 * safezoneW + safezoneX; + y = 0.445 * safezoneH + safezoneY; + w = 0.020625 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "$STR_ACE_Explosives_Phone_Up"; + action = QUOTE([true] call FUNC(setSpeedDial)); + }; + class down: Rsc_ACE_HiddenButton { + idc = 1613; + x = 0.345312 * safezoneW + safezoneX; + y = 0.485 * safezoneH + safezoneY; + w = 0.020625 * safezoneW; + h = 0.033 * safezoneH; + tooltip = "$STR_ACE_Explosives_Phone_Down"; + action = QUOTE([false] call FUNC(setSpeedDial)); + }; + class speedDial_Text: RscText { + idc = 1405; + y = 0.302 * safezoneH + safezoneY; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; + x = 0.288594 * safezoneW + safezoneX; + w = 0.0825 * safezoneW; + h = 0.044 * safezoneH; + text = "Name"; + }; + class speedDial_edit: Rsc_ACE_CallScreen_Edit { + idc = 1401; + y = 0.302 * safezoneH + safezoneY; + x = 0.318 * safezoneW + safezoneX; + w = 0.1; + }; + class numberEdit_Text: RscText { + idc = 1406; + y = 0.348 * safezoneH + safezoneY; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; + x = 0.288594 * safezoneW + safezoneX; + w = 0.0825 * safezoneW; + h = 0.044 * safezoneH; + text = "#"; + }; + class number_edit: Rsc_ACE_CallScreen_Edit { + canModify = 0; + idc = 1400; + y = 0.348 * safezoneH + safezoneY; + x = 0.3 * safezoneW + safezoneX; + }; }; - class numkey_1: Rsc_ACE_NumKeyButton { - idc = 1600; - x = 0.278281 * safezoneW + safezoneX; - y = 0.533 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "1"; - action = "ctrlSetText [1400,((ctrlText 1400) + '1')];"; - }; - class numkey_2: Rsc_ACE_NumKeyButton { - idc = 1601; - x = 0.314375 * safezoneW + safezoneX; - y = 0.533 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "2"; - action = "ctrlSetText [1400,((ctrlText 1400) + '2')];"; - }; - class numkey_3: Rsc_ACE_NumKeyButton { - idc = 1602; - x = 0.350469 * safezoneW + safezoneX; - y = 0.533 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "3"; - action = "ctrlSetText [1400,((ctrlText 1400) + '3')];"; - }; - class numkey_4: Rsc_ACE_NumKeyButton { - idc = 1603; - x = 0.278281 * safezoneW + safezoneX; - y = 0.577 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "4"; - action = "ctrlSetText [1400,((ctrlText 1400) + '4')];"; - }; - class numkey_5: Rsc_ACE_NumKeyButton { - idc = 1604; - x = 0.314375 * safezoneW + safezoneX; - y = 0.577 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "5"; - action = "ctrlSetText [1400,((ctrlText 1400) + '5')];"; - }; - class numkey_6: Rsc_ACE_NumKeyButton { - idc = 1605; - x = 0.350469 * safezoneW + safezoneX; - y = 0.577 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "6"; - action = "ctrlSetText [1400,((ctrlText 1400) + '6')];"; - }; - class numkey_7: Rsc_ACE_NumKeyButton { - idc = 1606; - x = 0.278281 * safezoneW + safezoneX; - y = 0.621 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "7"; - action = "ctrlSetText [1400,((ctrlText 1400) + '7')];"; - }; - class numkey_8: Rsc_ACE_NumKeyButton { - idc = 1607; - x = 0.314375 * safezoneW + safezoneX; - y = 0.621 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "8"; - action = "ctrlSetText [1400,((ctrlText 1400) + '8')];"; - }; - class numkey_9: Rsc_ACE_NumKeyButton { - idc = 1608; - x = 0.350469 * safezoneW + safezoneX; - y = 0.621 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "9"; - action = "ctrlSetText [1400,((ctrlText 1400) + '9')];"; - }; - class numkey_0: Rsc_ACE_NumKeyButton { - idc = 1609; - x = 0.314375 * safezoneW + safezoneX; - y = 0.676 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "0"; - action = "ctrlSetText [1400,((ctrlText 1400) + '0')];"; - }; - class speedDialAdd: Rsc_ACE_NumKeyButton { - idc = 1610; - x = 0.278281 * safezoneW + safezoneX; - y = 0.676 * safezoneH + safezoneY; - w = 0.0309375 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "$STR_ACE_Explosives_Phone_AddToSpeedDial"; - action = QUOTE([ARR_2(ctrlText 1401,ctrlText 1400)] call FUNC(addToSpeedDial);); - }; - class clear: Rsc_ACE_HiddenButton { - idc = 1610; - x = 0.278281 * safezoneW + safezoneX; - y = 0.445 * safezoneH + safezoneY; - w = 0.020625 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "$STR_ACE_Explosives_Clear"; - action = QUOTE(ctrlSetText [ARR_2(1400,'')];[ctrlText 1401] call FUNC(removeFromSpeedDial);ctrlSetText [ARR_2(1401,'')];); - }; - class dial: Rsc_ACE_HiddenButton { - idc = 1611; - x = 0.309219 * safezoneW + safezoneX; - y = 0.445 * safezoneH + safezoneY; - w = 0.04125 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "$STR_ACE_Explosives_Phone_Dial"; - action = QUOTE([ARR_2(ace_player,ctrlText 1400)] call FUNC(dialPhone);); - }; - class up: Rsc_ACE_HiddenButton { - idc = 1612; - x = 0.360781 * safezoneW + safezoneX; - y = 0.445 * safezoneH + safezoneY; - w = 0.020625 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "$STR_ACE_Explosives_Phone_Up"; - action = QUOTE([true] call FUNC(setSpeedDial)); - }; - class down: Rsc_ACE_HiddenButton { - idc = 1613; - x = 0.345312 * safezoneW + safezoneX; - y = 0.485 * safezoneH + safezoneY; - w = 0.020625 * safezoneW; - h = 0.033 * safezoneH; - tooltip = "$STR_ACE_Explosives_Phone_Down"; - action = QUOTE([false] call FUNC(setSpeedDial)); - }; - class speedDial_Text: RscText { - idc = 1405; - y = 0.302 * safezoneH + safezoneY; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; - x = 0.288594 * safezoneW + safezoneX; - w = 0.0825 * safezoneW; - h = 0.044 * safezoneH; - text = "Name"; - }; - class speedDial_edit: Rsc_ACE_CallScreen_Edit { - idc = 1401; - y = 0.302 * safezoneH + safezoneY; - x = 0.318 * safezoneW + safezoneX; - w = 0.1; - }; - class numberEdit_Text: RscText { - idc = 1406; - y = 0.348 * safezoneH + safezoneY; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; - x = 0.288594 * safezoneW + safezoneX; - w = 0.0825 * safezoneW; - h = 0.044 * safezoneH; - text = "#"; - }; - class number_edit: Rsc_ACE_CallScreen_Edit { - canModify = 0; - idc = 1400; - y = 0.348 * safezoneH + safezoneY; - x = 0.3 * safezoneW + safezoneX; - }; - }; }; diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 3747151d16..435624d2a5 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -19,7 +19,11 @@ ADDON = false; PREP(addCellphoneIED); PREP(addClacker); +PREP(addDetonateActions); +PREP(addExplosiveActions); PREP(addToSpeedDial); +PREP(addTransmitterActions); +PREP(addTriggerActions); PREP(canDefuse); PREP(canDetonate); PREP(defuseExplosive); @@ -36,11 +40,9 @@ PREP(getDetonators); PREP(getPlacedExplosives); PREP(getSpeedDialExplosive); -PREP(openDetonateUI); -PREP(openPlaceUI); -PREP(openTransmitterUI); +PREP(onLanded); + PREP(openTimerSetUI); -PREP(openTriggerSelectionUI); PREP(place_Approve); PREP(place_Cancel); diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index da95d45e7e..9652c38dd2 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -1,15 +1,15 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch", "ACE_Cellphone"}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common", "ace_interaction"}; - author[] = {"Garth 'L-H' de Wet"}; - authorUrl = "http://garth.snakebiteink.co.za/"; - VERSION_CONFIG; - }; + class ADDON { + units[] = {}; + weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch", "ACE_Cellphone"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"Garth 'L-H' de Wet"}; + authorUrl = "http://garth.snakebiteink.co.za/"; + VERSION_CONFIG; + }; }; #include "CfgEventHandlers.hpp" @@ -22,30 +22,30 @@ class CfgPatches { #include "ExplosivesUI.hpp" class CfgActions { - class None; - class Deactivate:None { - show = 0; - }; - class DeactivateMine:None { - show = 0; - }; + class None; + class Deactivate:None { + show = 0; + }; + class DeactivateMine:None { + show = 0; + }; }; class CfgMineTriggers { - class RangeTrigger; - class MagneticTrigger: RangeTrigger { - mineMagnetic = 1; - mineTriggerRange = 1; - }; + class RangeTrigger; + class MagneticTrigger: RangeTrigger { + mineMagnetic = 1; + mineTriggerRange = 1; + }; }; class ACE_Settings { - class GVAR(RequireSpecialist) { - value = 0; - typeName = "BOOL"; - }; - class GVAR(PunishNonSpecialists) { - value = 1; - typeName = "BOOL"; - }; + class GVAR(RequireSpecialist) { + value = 0; + typeName = "BOOL"; + }; + class GVAR(PunishNonSpecialists) { + value = 1; + typeName = "BOOL"; + }; }; diff --git a/addons/explosives/functions/fnc_addCellphoneIED.sqf b/addons/explosives/functions/fnc_addCellphoneIED.sqf index 84cb57cf4e..3be21df559 100644 --- a/addons/explosives/functions/fnc_addCellphoneIED.sqf +++ b/addons/explosives/functions/fnc_addCellphoneIED.sqf @@ -25,23 +25,23 @@ _requiredItems = getArray(_config >> "requires"); _hasRequired = true; _detonators = [_unit] call FUNC(getDetonators); { - if !(_x in _detonators) exitWith{ - _hasRequired = false; - }; + if !(_x in _detonators) exitWith{ + _hasRequired = false; + }; } count _requiredItems; private ["_code", "_count", "_codeSet"]; _codeSet = false; while {!_codeSet} do { - _code = str(round (random 9999)); - _count = 4 - count (toArray _code); - while {_count > 0} do { - _code = "0" + _code; - _count = _count - 1; - }; - _codeSet = (count ([_code] call FUNC(getSpeedDialExplosive))) == 0; + _code = str(round (random 9999)); + _count = 4 - count (toArray _code); + while {_count > 0} do { + _code = "0" + _code; + _count = _count - 1; + }; + _codeSet = (count ([_code] call FUNC(getSpeedDialExplosive))) == 0; }; if (isNil QGVAR(CellphoneIEDs)) then { - GVAR(CellphoneIEDs) = []; + GVAR(CellphoneIEDs) = []; }; _count = GVAR(CellphoneIEDs) pushBack [_explosive,_code,GetNumber(ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> "Cellphone" >> "FuseTime")]; _count = _count + 1; diff --git a/addons/explosives/functions/fnc_addClacker.sqf b/addons/explosives/functions/fnc_addClacker.sqf index b61daee3a4..1e12b79d62 100644 --- a/addons/explosives/functions/fnc_addClacker.sqf +++ b/addons/explosives/functions/fnc_addClacker.sqf @@ -17,10 +17,8 @@ * Public: Yes */ #include "script_component.hpp" -private ["_unit", "_explosive", "_clacker", "_config", "_magazineClass", "_requiredItems", "_hasRequired"]; -_unit = _this select 0; -_explosive = _this select 1; -_magazineClass = _this select 2; +private ["_clacker", "_config", "_requiredItems", "_hasRequired"]; +EXPLODE_3_PVT(_this,_unit,_explosive,_magazineClass); // Config is the last item in the list of passed in items. _config = (_this select 3) select (count (_this select 3) - 1); @@ -38,7 +36,9 @@ _config = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> co _clacker = _unit getVariable [QGVAR(Clackers), []]; GVAR(PlacedCount) = GVAR(PlacedCount) + 1; + _clacker pushBack [_explosive, getNumber(_config >> "FuseTime"), format [localize "STR_ACE_Explosives_DetonateCode", GVAR(PlacedCount)], _magazineClass, configName ((_this select 3) select (count (_this select 3) - 1))]; + _unit setVariable [QGVAR(Clackers), _clacker, true]; _unit sideChat format [localize "STR_ACE_Explosives_DetonateCode", GVAR(PlacedCount)]; diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf new file mode 100644 index 0000000000..0017488458 --- /dev/null +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -0,0 +1,49 @@ +/* + * Author: Garth 'L-H' de Wet + * Opens the UI for explosive detonation selection + * + * Arguments: + * 0: Unit + * 1: Trigger classname + * + * Return Value: + * None + * + * Example: + * [player, "ACE_M26_Clacker"] call ACE_Explosives_fnc_addDetonateActions; + * + * Public: No + */ +#include "script_component.hpp" +private ["_result", "_item", "_children"]; +call EFUNC(interaction,hideMenu); +EXPLODE_2_PVT(_this,_unit,_detonator); +_range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range"); + +_result = [_unit] call FUNC(getPlacedExplosives); +_children = []; +{ + if (!isNull(_x select 0)) then { + _required = getArray (ConfigFile >> "CfgACE_Triggers" >> (_x select 4) >> "requires"); + if (_detonator in _required) then { + _item = ConfigFile >> "CfgMagazines" >> (_x select 3); + + _children pushBack + [ + [ + format ["Explosive_%1", _forEachIndex], + _x select 2, + getText(_item >> "picture"), + {(_this select 2) call FUNC(detonateExplosive);}, + {true}, + {}, + [ACE_player,_range,_x] + ] call EFUNC(interact_menu,createAction), + [], + ACE_Player + ]; + }; + }; +} foreach _result; + +_children diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf new file mode 100644 index 0000000000..29a2eed608 --- /dev/null +++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf @@ -0,0 +1,56 @@ +/* + * Author: Garth 'L-H' de Wet and CAA-Picard + * + * + * Arguments: + * 0: Unit + * + * Return Value: + * Actions + * + * Public: No + */ +#include "script_component.hpp" +private ["_mags", "_item", "_index", "_children"]; + +EXPLODE_1_PVT(_this,_unit); + +_mags = magazines _unit; +_list = []; +_itemCount = []; +{ + _item = ConfigFile >> "CfgMagazines" >> _x; + if (getNumber(_item >> "ACE_Placeable") == 1) then { + _index = _list find _item; + if (_index != -1) then { + _itemCount set [_index, (_itemCount select _index) + 1]; + } else { + _list pushBack _item; + _itemCount pushBack 1; + }; + }; +} forEach _mags; + +_children = []; + +{ + private "_name"; + _name = if(isText(_x >> "displayNameShort") && {getText(_x >> "displayNameShort") != ""}) then + {getText (_x >> "displayNameShort")}else{getText(_x >> "displayName")}; + _children pushBack + [ + [ + format ["Explosive_%1", _forEachIndex], + format [_name + " (%1)", _itemCount select _foreachIndex], + getText(_x >> "picture"), + {(_this select 2) call FUNC(setupExplosive);}, + {true}, + {}, + [_unit, configName _x] + ] call EFUNC(interact_menu,createAction), + [], + _unit + ]; +} foreach _list; + +_children diff --git a/addons/explosives/functions/fnc_addTransmitterActions.sqf b/addons/explosives/functions/fnc_addTransmitterActions.sqf new file mode 100644 index 0000000000..6408eb2ec7 --- /dev/null +++ b/addons/explosives/functions/fnc_addTransmitterActions.sqf @@ -0,0 +1,39 @@ +/* + * Author: Garth 'L-H' de Wet + * Opens the UI for selecting the transmitter + * + * Arguments: + * 0: Unit + * + * Return Value: + * Nothing + * + * Example: + * [player] call ACE_Explosives_fnc_addTransmitterActions; + * + * Public: No + */ +#include "script_component.hpp" +private ["_items", "_unit", "_children", "_config"]; +_unit = _this select 0; +_detonators = [_unit] call FUNC(getDetonators); +_children = []; +{ + _config = ConfigFile >> "CfgWeapons" >> _x; + _children pushBack + [ + [ + format ["Trigger_%1", _forEachIndex], + getText(_config >> "displayName"), + getText(_config >> "picture"), + {}, + {true}, + {(_this select 2) call FUNC(addDetonateActions);}, + [ACE_player,_x] + ] call EFUNC(interact_menu,createAction), + [], + ACE_Player + ]; +} foreach _detonators; + +_children diff --git a/addons/explosives/functions/fnc_addTriggerActions.sqf b/addons/explosives/functions/fnc_addTriggerActions.sqf new file mode 100644 index 0000000000..e9c2dca0e6 --- /dev/null +++ b/addons/explosives/functions/fnc_addTriggerActions.sqf @@ -0,0 +1,56 @@ +/* + * Author: Garth 'L-H' de Wet + * Opens the UI for explosive trigger selection + * + * Arguments: + * 0: Explosive Magazine + * 1: Explosive + * + * Return Value: + * None + * + * Example: + * [lbData [8866, lbCurSel 8866], _explosive] call ACE_Explosives_fnc_addTriggerActions; + * + * Public: No + */ +#include "script_component.hpp" +private ["_hasRequiredItems","_triggerTypes", "_children", + "_detonators", "_required", "_magTriggers"]; +EXPLODE_2_PVT(_this,_magazine,_explosive); +_detonators = [ACE_player] call FUNC(getDetonators); + +_triggerTypes = [_magazine] call FUNC(triggerType); +_magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers"; +_children = []; +{ + _required = getArray (_x >> "requires"); + _hasRequiredItems = true; + { + if !(_x in _detonators) exitWith { + _hasRequiredItems = false; + }; + } count _required; + if (_hasRequiredItems) then { + _children pushBack + [ + [ + format ["Trigger_%1", _forEachIndex], + if(isText(_magTriggers >> configName _x >> "displayName"))then + {getText(_magTriggers >> configName _x >> "displayName")} + else{getText(_x >> "displayName")}, + if(isText(_magTriggers >> configName _x >> "picture"))then + {getText(_magTriggers >> configName _x >> "picture")} + else{getText(_x >> "picture")}, + {(_this select 2) call FUNC(selectTrigger);}, + {true}, + {}, + [_explosive, _magazine, configName _x] + ] call EFUNC(interact_menu,createAction), + [], + ACE_Player + ]; + }; +} foreach _triggerTypes; + +_children diff --git a/addons/explosives/functions/fnc_canDefuse.sqf b/addons/explosives/functions/fnc_canDefuse.sqf index 566363c2ad..cd04564a9f 100644 --- a/addons/explosives/functions/fnc_canDefuse.sqf +++ b/addons/explosives/functions/fnc_canDefuse.sqf @@ -14,25 +14,15 @@ * Public: Yes */ #include "script_component.hpp" -private "_unit"; -_unit = _this select 0; +private ["_specialist"]; +EXPLODE_2_PVT(_this,_unit,_target); +if (isNull(_target getVariable [QGVAR(Explosive),objNull])) exitWith { + deleteVehicle _target; + false +}; if (vehicle _unit != _unit || {!("ACE_DefusalKit" in (items _unit))}) exitWith {false}; _isSpecialist = [_unit] call EFUNC(Common,isEOD); if (GVAR(RequireSpecialist) && {!_isSpecialist}) exitWith {false}; -_timeBombCore = nearestObject [_unit, "TimeBombCore"]; -_mineBase = nearestObject [_unit, "MineBase"]; - -_distCore = _unit distance _timeBombCore; -_distBase = _unit distance _mineBase; -_distance = 10; -if (_distCore < _distBase) then { - _distance = _distCore; - EGVAR(interaction,Target) = _timeBombCore; -}else{ - _distance = _distBase; - EGVAR(interaction,Target) = _mineBase; -}; -if (isNil "_distance") exitWith {false}; -_distance < 4 +true diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index 97bf9709b7..5abfabe60f 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -15,12 +15,16 @@ * Public: Yes */ #include "script_component.hpp" -private ["_unit", "_explosive"]; -_unit = _this select 0; -_explosive = _this select 1; +EXPLODE_2_PVT(_this,_unit,_explosive); if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith { [_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive); }; +{ + detach _x; + deleteVehicle _x; + false +} count (attachedObjects (_explosive)); + _unit action ["Deactivate", _unit, _explosive]; diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index 2285b9a8b8..f05a265c3a 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -19,15 +19,19 @@ * Public: Yes */ #include "script_component.hpp" -private ["_item","_result", "_ignoreRange", "_unit", "_range"]; -_unit = _this select 0; -_range = _this select 1; -_item = _this select 2; +private ["_result", "_ignoreRange", "_helper"]; +EXPLODE_3_PVT(_this,_unit,_range,_item); _ignoreRange = (_range == -1); _result = true; if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {false}; +_helper = (attachedTo (_item select 0)); +if (!isNull(_helper)) then { + detach (_item select 0); + deleteVehicle _helper; +}; + if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhenDestroyed") == 0) then { private ["_exp", "_previousExp"]; _previousExp = _item select 0; @@ -44,7 +48,7 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhe [{ _explosive = _this; if (!isNull _explosive) then { - _explosive setDamage 1; + _explosive setDamage 1; }; }, _item select 0, _item select 1, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/explosives/functions/fnc_getPlacedExplosives.sqf b/addons/explosives/functions/fnc_getPlacedExplosives.sqf index 1feddfabd9..9b40002bbe 100644 --- a/addons/explosives/functions/fnc_getPlacedExplosives.sqf +++ b/addons/explosives/functions/fnc_getPlacedExplosives.sqf @@ -27,7 +27,7 @@ _adjustedList = false; _clackerList = _unit getVariable [QGVAR(Clackers), []]; _list = []; { - if isNull (_x select 0) then { + if (isNull (_x select 0)) then { _clackerList set [_foreachIndex, "X"]; _adjustedList = true; } else { diff --git a/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf b/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf index d6d5b57b3b..b57f4f9f16 100644 --- a/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf +++ b/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf @@ -19,9 +19,9 @@ private ["_explosive"]; if (isNil QGVAR(CellphoneIEDs)) exitWith {[]}; _explosive = []; { - if ((_x select 1) == _code) exitWith { - _explosive = _x; - }; - false + if ((_x select 1) == _code) exitWith { + _explosive = _x; + }; + false } count GVAR(CellphoneIEDs); _explosive diff --git a/addons/explosives/functions/fnc_handleScrollWheel.sqf b/addons/explosives/functions/fnc_handleScrollWheel.sqf index 8c842b8a05..3bef53e196 100644 --- a/addons/explosives/functions/fnc_handleScrollWheel.sqf +++ b/addons/explosives/functions/fnc_handleScrollWheel.sqf @@ -14,7 +14,6 @@ * Public: No */ #include "script_component.hpp" -private ["_obj"]; if (isNull(GVAR(Setup)) || {ACE_Modifier == 0} || !GVAR(pfeh_running)) exitWith {false}; _this = _this * 5; GVAR(Setup) setDir ((getDir GVAR(Setup)) + _this); diff --git a/addons/explosives/functions/fnc_module.sqf b/addons/explosives/functions/fnc_module.sqf index 432671b551..3e522e9a70 100644 --- a/addons/explosives/functions/fnc_module.sqf +++ b/addons/explosives/functions/fnc_module.sqf @@ -20,7 +20,9 @@ _activated = _this select 2; if !(_activated) exitWith {}; -[_logic, QGVAR(RequireSpecialist), "RequireSpecialist" ] call EFUNC(Common,readSettingFromModule); -[_logic, QGVAR(PunishNonSpecialists), "PunishNonSpecialists" ] call EFUNC(Common,readSettingFromModule); +[_logic, QGVAR(RequireSpecialist), "RequireSpecialist"] + call EFUNC(Common,readSettingFromModule); +[_logic, QGVAR(PunishNonSpecialists),"PunishNonSpecialists"] + call EFUNC(Common,readSettingFromModule); diag_log text "[ACE]: Explosive Module Initialized."; diff --git a/addons/explosives/functions/fnc_onLanded.sqf b/addons/explosives/functions/fnc_onLanded.sqf new file mode 100644 index 0000000000..409b6a286f --- /dev/null +++ b/addons/explosives/functions/fnc_onLanded.sqf @@ -0,0 +1,39 @@ +/* + * Author: Garth 'L-H' de Wet + * + * Arguments: + * + * Return Value: + * None + * + * Example: + * object addEventHandler ["EpeContactStart", ACE_explosive_fnc_onLanded]; + * + * Public: No + */ +#include "script_component.hpp" +EXPLODE_2_PVT(_this,_explosive,_hitTarget); + +if ((_explosive getVariable [QGVAR(Handled), false])) exitWith {}; + +_explosive setVariable [QGVAR(Handled), true]; +if (!isNull _hitTarget && {_hitTarget isKindOf "AllVehicles"}) then { + _explosive attachTo [_hitTarget]; + private "_dir"; + _dir = _setup getVariable [QGVAR(Direction), 0]; + _dir = _dir - (getDir _hitTarget); + [[_explosive, _dir, 0], QFUNC(setPosition)] call EFUNC(common,execRemoteFnc); +} else { + [{ + EXPLODE_2_PVT(_this,_player,_explosive); + private "_pos"; + _player setVariable [QGVAR(PlantingExplosive), false]; + if (surfaceIsWater _pos) then { + _pos = getPosASL _explosive; + _explosive setPosASL _pos; + }else{ + _pos = getPosATL _explosive; + _explosive setPosATL _pos; + }; + }, [ACE_player, _explosive], 0.5, 0.1] call EFUNC(common,waitAndExecute); +}; diff --git a/addons/explosives/functions/fnc_openDetonateUI.sqf b/addons/explosives/functions/fnc_openDetonateUI.sqf deleted file mode 100644 index fcea8b4b5c..0000000000 --- a/addons/explosives/functions/fnc_openDetonateUI.sqf +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Author: Garth 'L-H' de Wet - * Opens the UI for explosive detonation selection - * - * Arguments: - * 0: Unit - * 1: Trigger classname - * - * Return Value: - * None - * - * Example: - * [player, "ACE_M26_Clacker"] call ACE_Explosives_fnc_openDetonateUI; - * - * Public: No - */ -#include "script_component.hpp" -private ["_unit","_result", "_item"]; -call EFUNC(interaction,hideMenu); -_unit = _this select 0; -_detonator = _this select 1; -_range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range"); - -_result = [_unit] call FUNC(getPlacedExplosives); -_actions = [localize "STR_ACE_Explosives_DetonateMenu", localize "STR_ACE_Explosives_Detonate"] - call EFUNC(interaction,prepareSelectMenu); -_count = 0; -{ - if (!isNull(_x select 0)) then { - _required = getArray (ConfigFile >> "CfgACE_Triggers" >> (_x select 4) >> "requires"); - if (_detonator in _required) then { - _item = ConfigFile >> "CfgMagazines" >> (_x select 3); - _actions = [ - _actions, - _x select 2, - getText(_item >> "picture"), - [_foreachIndex, _range] - ] call EFUNC(interaction,AddSelectableItem); - _count = _count + 1; - }; - }; -} foreach _result; -if (_count > 0) then { - [ - _actions, - { - [ - ACE_player, - [_this select 1] call EFUNC(common,toNumber), - (ACE_player getVariable [QGVAR(Clackers), []]) select ([_this select 0] call EFUNC(common,toNumber)), - false - ] call FUNC(detonateExplosive); - call EFUNC(interaction,hideMenu); - }, - {[ACE_player] call FUNC(openTransmitterUI);} - ] call EFUNC(interaction,openSelectMenu); -}else{ - call EFUNC(interaction,hideMenu); - [ACE_player] call FUNC(openTransmitterUI); - [localize "STR_ACE_Explosives_NoExplosivesAvailable"] call EFUNC(common,displayTextStructured); -}; diff --git a/addons/explosives/functions/fnc_openPlaceUI.sqf b/addons/explosives/functions/fnc_openPlaceUI.sqf deleted file mode 100644 index a1b839ec35..0000000000 --- a/addons/explosives/functions/fnc_openPlaceUI.sqf +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Author: Garth 'L-H' de Wet - * Opens the UI for explosive placement selection - * - * Arguments: - * 0: Unit - * - * Return Value: - * None - * - * Example: - * [player] call ACE_Explosives_fnc_openPlaceUI; - * - * Public: No - */ -#include "script_component.hpp" -private ["_unit","_mags", "_item", "_index", "_actions"]; -_unit = _this select 0; -call FUNC(place_Cancel); - -_mags = magazines _unit; -_list = []; -_itemCount = []; -{ - _item = ConfigFile >> "CfgMagazines" >> _x; - if (getNumber(_item >> "ACE_Placeable") == 1) then { - _index = _list find _item; - if (_index != -1) then { - _itemCount set [_index, (_itemCount select _index) + 1]; - } else { - _list pushBack _item; - _itemCount pushBack 1; - }; - }; -} forEach _mags; -_actions = [localize "STR_ACE_Explosives_PlaceMenu", localize "STR_ACE_Explosives_Place"] - call EFUNC(interaction,prepareSelectMenu); -{ - _actions = [ - _actions, - format [getText(_x >> "displayName") + " (%1)", _itemCount select _foreachIndex], - getText(_x >> "picture"), - configName _x - ] call EFUNC(interaction,AddSelectableItem); -} foreach _list; - -[ - _actions, - { - [_this] call FUNC(openTriggerSelectionUI); - }, - { - call EFUNC(interaction,hideMenu); - } -] call EFUNC(interaction,openSelectMenu); diff --git a/addons/explosives/functions/fnc_openTimerSetUI.sqf b/addons/explosives/functions/fnc_openTimerSetUI.sqf index d7f6ef30d8..e37bef06e3 100644 --- a/addons/explosives/functions/fnc_openTimerSetUI.sqf +++ b/addons/explosives/functions/fnc_openTimerSetUI.sqf @@ -3,24 +3,39 @@ * Opens the UI for timer setting of an explosive * * Arguments: - * 0: Magazine + * 0: Explosive + * 1: Magazine * * Return Value: * None * * Example: - * ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_openTimerSetUI; + * [_explosive, "SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_openTimerSetUI; * * Public: No */ #include "script_component.hpp" -private ["_mag"]; -_mag = _this select 0; +EXPLODE_2_PVT(_this,_explosive,_mag); createDialog "RscACE_SelectTimeUI"; sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes sliderSetPosition [8845, 30]; -buttonSetAction [8860, format[QUOTE([ARR_4(ACE_player,'%1','Timer',floor sliderPosition 8845)] call FUNC(setupExplosive);closeDialog 0;), _mag]]; -buttonSetAction [8855, format[QUOTE(['%1'] call FUNC(openTriggerSelectionUI);), _mag]]; +GVAR(explosive) = _explosive; + +DFUNC(SetTimer) = { + [ + ACE_player, + getPosATL GVAR(explosive), + GVAR(explosive) getVariable QGVAR(Direction), + GVAR(explosive) getVariable QGVAR(class), + "Timer", + [floor sliderPosition 8845], + GVAR(explosive) + ] call FUNC(placeExplosive); + closeDialog 0; +}; + +buttonSetAction [8860, QUOTE(call DFUNC(SetTimer);)]; +buttonSetAction [8855, QUOTE(closeDialog 0;)]; ctrlSetText [8870, format[localize "STR_ACE_Explosives_TimerMenu",0, 30]]; diff --git a/addons/explosives/functions/fnc_openTransmitterUI.sqf b/addons/explosives/functions/fnc_openTransmitterUI.sqf deleted file mode 100644 index 275aef4dd0..0000000000 --- a/addons/explosives/functions/fnc_openTransmitterUI.sqf +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Author: Garth 'L-H' de Wet - * Opens the UI for selecting the transmitter - * - * Arguments: - * 0: Unit - * - * Return Value: - * Nothing - * - * Example: - * [player] call ACE_Explosives_fnc_openTransmitterUI; - * - * Public: No - */ -#include "script_component.hpp" -private ["_items", "_unit", "_count", "_actions", "_config"]; -_unit = _this select 0; -_items = (items _unit); - -_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"] - call EFUNC(interaction,prepareSelectMenu); -_detonators = [_unit] call FUNC(getDetonators); -{ - _config = ConfigFile >> "CfgWeapons" >> _x; - _actions = [ - _actions, - getText(_config >> "displayName"), - getText(_config >> "picture"), - _x - ] call EFUNC(interaction,addSelectableItem); -} count _detonators; - -if (count _detonators == 0) then { - call EFUNC(interaction,hideMenu); - "ACE_Explosives" call EFUNC(interaction,openMenuSelf); - [format[localize "STR_ACE_Explosives_NoTriggersAvailable", "player"]] call EFUNC(Common,displayTextStructured); -}else{ - [ - _actions, - { - [ACE_player, _this] call FUNC(openDetonateUI); - }, - { - call EFUNC(interaction,hideMenu); - } - ] call EFUNC(interaction,openSelectMenu); -}; diff --git a/addons/explosives/functions/fnc_openTriggerSelectionUI.sqf b/addons/explosives/functions/fnc_openTriggerSelectionUI.sqf deleted file mode 100644 index ce5efd7dff..0000000000 --- a/addons/explosives/functions/fnc_openTriggerSelectionUI.sqf +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Author: Garth 'L-H' de Wet - * Opens the UI for explosive trigger selection - * - * Arguments: - * 0: Explosive Magazine - * - * Return Value: - * None - * - * Example: - * [lbData [8866, lbCurSel 8866]] call ACE_Explosives_fnc_openTriggerSelectionUI; - * - * Public: No - */ -#include "script_component.hpp" -private ["_magazine", "_hasRequiredItems","_triggerTypes", "_actions", "_detonators", "_required", "_magTriggers"]; -_magazine = _this select 0; -_detonators = [ACE_player] call FUNC(getDetonators); - -_triggerTypes = [_magazine] call FUNC(triggerType); -_magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers"; -_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"] - call EFUNC(interaction,prepareSelectMenu); -_count = 0; -{ - _required = getArray (_x >> "requires"); - _hasRequiredItems = true; - { - if !(_x in _detonators) exitWith { - _hasRequiredItems = false; - }; - } count _required; - if (_hasRequiredItems) then { - _actions = [ - _actions, - if(isText(_magTriggers >> configName _x >> "displayName"))then{getText(_magTriggers >> configName _x >> "displayName")}else{getText(_x >> "displayName")}, - if(isText(_magTriggers >> configName _x >> "picture"))then{getText(_magTriggers >> configName _x >> "picture")}else{getText(_x >> "picture")}, - [configName _x, _magazine] - ] call EFUNC(interaction,addSelectableItem); - _count = _count + 1; - }; -} count _triggerTypes; - -if (_count == 0) then { - [ACE_player] call FUNC(openPlaceUI); - [format[localize "STR_ACE_Explosives_NoTriggersAvailable", - getText(configFile >> "CfgMagazines" >> _magazine >> "DisplayName")]] call EFUNC(Common,displayTextStructured); -}else{ - [ - _actions, - { - [_this select 1, _this select 0] call FUNC(selectTrigger); - }, - {[ACE_player] call FUNC(openPlaceUI);} - ] call EFUNC(interaction,openSelectMenu); -}; diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf index 1a09d531d0..90997fd2ad 100644 --- a/addons/explosives/functions/fnc_placeExplosive.sqf +++ b/addons/explosives/functions/fnc_placeExplosive.sqf @@ -7,30 +7,24 @@ * 1: Position to place explosive * 2: Rotation * 3: Magazine class - * 4: Config of trigger + * 4: Config of trigger * 5: Variables required for the trigger type - * 6: Should direction be set + * 6: Explosive placeholder * * Return Value: * Placed explosive * * Example: * _explosive = [player, player modelToWorldVisual [0,0.5, 0.1], 134, - * "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_placeExplosive; + * "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_placeExplosive; * * Public: Yes */ #include "script_component.hpp" -private ["_pos", "_dir", "_magazineClass", "_ammo", "_triggerSpecificVars", "_unit", "_triggerConfig", "_explosive"]; -_unit = _this select 0; -_pos = _this select 1; -_dir = _this select 2; -_magazineClass = _this select 3; -_triggerConfig = _this select 4; -_triggerSpecificVars = _this select 5; -_setDir = true; +private ["_ammo", "_explosive"]; +EXPLODE_6_PVT(_this,_unit,_pos,_dir,_magazineClass,_triggerConfig,_triggerSpecificVars); if (count _this > 6) then { - _setDir = _this select 6; + deleteVehicle (_this select 6); }; if (isNil "_triggerConfig") exitWith { @@ -51,11 +45,19 @@ if (isText(_magazineTrigger >> "ammo")) then { _ammo = getText (_magazineTrigger >> "ammo"); }; _triggerSpecificVars pushBack _triggerConfig; +private ["_defuseHelper"]; +_defuseHelper = createVehicle ["ACE_DefuseObject", _pos, [], 0, "NONE"]; +_defuseHelper setPosATL _pos; + _explosive = createVehicle [_ammo, _pos, [], 0, "NONE"]; +_defuseHelper attachTo [_explosive, [0,0,0], ""]; +_defuseHelper setVariable [QGVAR(Explosive),_explosive,true]; + +_expPos = getPosATL _explosive; +_defuseHelper setPosATL (((getPosATL _defuseHelper) vectorAdd (_pos vectorDiff _expPos))); +_explosive setPosATL _pos; + if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_triggerSpecificVars] call compile (getText (_triggerConfig >> "onPlace"))}) exitWith {_explosive}; -if (_setDir) then { - [[_explosive, _dir, getNumber (_magazineTrigger >> "pitch")], QFUNC(setPosition)] - call EFUNC(common,execRemoteFnc); -}; +[[_explosive, _dir, getNumber (_magazineTrigger >> "pitch")], QFUNC(setPosition)] call EFUNC(common,execRemoteFnc); _explosive diff --git a/addons/explosives/functions/fnc_place_Approve.sqf b/addons/explosives/functions/fnc_place_Approve.sqf index 2eb7b7fde9..dc94bf3731 100644 --- a/addons/explosives/functions/fnc_place_Approve.sqf +++ b/addons/explosives/functions/fnc_place_Approve.sqf @@ -23,10 +23,10 @@ private ["_mag", "_setup", "_player"]; _setup = GVAR(Setup); GVAR(Setup) = objNull; [GVAR(placer), "ACE_Explosives", false] call EFUNC(Common,setForceWalkStatus); +[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler); +[ACE_player, "MenuBack", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); GVAR(placer) = objNull; _player = ACE_player; -[_player, "DefaultAction", _player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler); -[_player, "MenuBack", _player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); call EFUNC(interaction,hideMouseHint); if ((_setup getVariable [QGVAR(Class), ""]) == "") exitWith { deleteVehicle _setup; @@ -39,67 +39,7 @@ if (_dir > 180) then { }; _setup setVariable [QGVAR(Direction), _dir]; _player setVariable [QGVAR(PlantingExplosive), true]; -_setup addEventHandler ["EpeContactStart", { - if (!((_this select 0) getVariable [QGVAR(Handled), false])) then { - private ["_player", "_pos", "_attachTo"]; - _player = ACE_player; - _player setVariable [QGVAR(PlantingExplosive), false]; - _pos = getPosATL (_this select 0); - (_this select 0) enableSimulationGlobal false; - if (surfaceIsWater _pos) then { - _pos = getPosASL (_this select 0); - (_this select 0) setPosASL _pos; - }else{ - (_this select 0) setPosATL _pos; - }; - (_this select 0) setVariable [QGVAR(Handled), true]; - _attachTo = objNull; - if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then { - _attachTo = (_this select 1); - }; - [(_this select 0),_attachTo, _pos] spawn { // TODO: Change to scheduled delay execution - private ["_mag", "_setup", "_dir", "_player"]; - _setup = _this select 0; - _player = ACE_player; - _mag = _setup getVariable [QGVAR(Class), ""]; - _dir = _setup getVariable [QGVAR(Direction), 0]; - - sleep getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime"); - _explosive = [_player, _this select 2, _dir, _mag, _setup getVariable QGVAR(Trigger), - [_setup getVariable QGVAR(Timer)], isNull (_this select 1)] call FUNC(placeExplosive); - deleteVehicle _setup; - if (!isNull(_explosive)) then { - _player RemoveMagazine _mag; - if (!isNull (_this select 1)) then { - _explosive attachTo [(_this select 1)]; - _dir = _dir - (getDir (_this select 1)); - [[_explosive, _dir, 0], QFUNC(setPosition)] call EFUNC(common,execRemoteFnc); - }; - }; - }; - }; -}]; +_setup addEventHandler ["EpeContactStart", FUNC(onLanded)]; _setup enableSimulationGlobal true; _player playActionNow "MedicOther"; -[_setup] spawn { // TODO: Change to scheduled delay execution - private ["_setup", "_player"]; - _setup = _this select 0; - _player = ACE_player; - sleep 5; - _player setVariable [QGVAR(PlantingExplosive), false]; - if (!isNull _setup) then { - private ["_mag", "_dir", "_delayTime"]; - _mag = _setup getVariable [QGVAR(Class), ""]; - _dir = _setup getVariable [QGVAR(Direction), 0]; - _delayTime = (getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime")) - 5; - if (_delayTime > 0) then { - sleep _delayTime; - }; - if (!isNull _setup) then { - [_player, GetPosATL _setup, _dir, _mag, _setup getVariable QGVAR(Trigger), - [_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive); - deleteVehicle _setup; - _player RemoveMagazine _mag; - }; - }; -}; +_player removeMagazine (_setup getVariable [QGVAR(Class), ""]); diff --git a/addons/explosives/functions/fnc_place_Cancel.sqf b/addons/explosives/functions/fnc_place_Cancel.sqf index 56775c910e..78d718e283 100644 --- a/addons/explosives/functions/fnc_place_Cancel.sqf +++ b/addons/explosives/functions/fnc_place_Cancel.sqf @@ -29,4 +29,4 @@ if (isNil {GVAR(placer)}) then { GVAR(placer) = objNull; call EFUNC(interaction,hideMouseHint); [ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler); -[ACE_player, "MenuBack", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); +[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); diff --git a/addons/explosives/functions/fnc_selectTrigger.sqf b/addons/explosives/functions/fnc_selectTrigger.sqf index 8c51fd2c9c..a27d512475 100644 --- a/addons/explosives/functions/fnc_selectTrigger.sqf +++ b/addons/explosives/functions/fnc_selectTrigger.sqf @@ -3,26 +3,26 @@ * Selects a trigger for an explosive. * * Arguments: - * 0: Magazine - * 1: Trigger mode + * 0: Explosive + * 1: Magazine + * 2: Trigger mode * * Return Value: * None * * Example: - * ["SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger; + * [_explosive, "SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger; * * Public: No */ #include "script_component.hpp" -private ["_magazine","_trigger"]; +private ["_config"]; closeDialog 0; -_magazine = _this select 0; -_trigger = _this select 1; -_config = ConfigFile >> "CfgACE_Triggers" >> _trigger; call EFUNC(interaction,hideMenu); +EXPLODE_3_PVT(_this,_explosive,_magazine,_trigger); +_config = ConfigFile >> "CfgACE_Triggers" >> _trigger; // If the onSetup function returns true, it is handled elsewhere -if (isText(_config >> "onSetup") && {[_magazine] call compile getText (_config >> "onSetup")}) exitWith {}; +if (isText(_config >> "onSetup") && {[_explosive,_magazine] call compile getText (_config >> "onSetup")}) exitWith {}; -[ACE_player, _magazine, _trigger] call FUNC(setupExplosive); +[ACE_player, getPosATL _explosive, _explosive getVariable [QGVAR(Direction), 0],_magazine, _trigger, [], _explosive] call ACE_Explosives_fnc_placeExplosive; diff --git a/addons/explosives/functions/fnc_setPosition.sqf b/addons/explosives/functions/fnc_setPosition.sqf index 4b6536d24d..dcf2537776 100644 --- a/addons/explosives/functions/fnc_setPosition.sqf +++ b/addons/explosives/functions/fnc_setPosition.sqf @@ -16,10 +16,8 @@ * Public: Yes */ #include "script_component.hpp" -private "_ex"; -_ex = _this select 0; -_ex setDir (_this select 1); -if ((_this select 2) != 0) then { - [_ex, _this select 2, 0] call CALLSTACK(BIS_fnc_setPitchBank); +EXPLODE_3_PVT(_this,_explosive,_direction,_pitch); +_explosive setDir _direction; +if (_pitch != 0) then { + [_explosive, _pitch, 0] call CALLSTACK(BIS_fnc_setPitchBank); }; -//_ex setVectorUp (surfaceNormal _pos); diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 7f80ba7e63..ea3a086274 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -5,60 +5,45 @@ * Arguments: * 0: Unit * 1: Classname of explosive to place. (CfgMagazine class) - * 2: Trigger Config - * 3: Timer (optional) * * Return Value: * None * * Example: - * [player, "SatchelCharge_Remote_Mag", "Command"] call ACE_Explosives_fnc_SetupExplosive; + * [player, "SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_SetupExplosive; * * Public: Yes */ #include "script_component.hpp" -private ["_unit", "_class", "_config", "_timer"]; -_unit = _this select 0; -_class = _this select 1; -_config = _this select 2; -_timer = _this select 3; +closeDialog 0; +EXPLODE_2_PVT(_this,_unit,_class); GVAR(placer) = _unit; -// Commented out due to the fact there is a distinction between who can deactivate mines and who can plant them in standard configs. -// Would require custom config entries (ACE_ExplosiveSpecialist/ACE_Specialist) which excludes custom mods. -//if (ACE_Explosives_RequireSpecialist && {!([_unit] call ACE_Core_fnc_isEOD)}) exitWith {}; -if (isNil "_config") then { - _config = getArray(ConfigFile >> "CfgMagazines" >> _class >> "ACE_Triggers" >> "SupportedTriggers") select 0; -}; - -GVAR(Setup) = getText(ConfigFile >> "CfgMagazines" >> _class >> "ACE_SetupObject") createVehicleLocal [0,0,-10000]; +// TODO: check MP performance and MP compatible. +GVAR(Setup) = createVehicle [getText(ConfigFile >> "CfgMagazines" >> _class >> "ACE_SetupObject"),[0,0,-10000],[], 0, "NONE"]; GVAR(Setup) enableSimulationGlobal false; -GVAR(Setup) setVariable [QGVAR(Class), _class]; -GVAR(Setup) setVariable [QGVAR(Trigger), _config]; -//GVAR(Setup) setVariable [QGVAR(Offset), GetArray(ConfigFile >> "CfgVehicles" >> typeof GVAR(Setup) >> "ACE_Offset")]; -if (!isNil "_timer") then { - GVAR(Setup) setVariable [QGVAR(Timer), _timer]; -}; +GVAR(Setup) setVariable [QGVAR(class), _class, true]; [_unit, "ACE_Explosives", true] call EFUNC(common,setForceWalkStatus); GVAR(TweakedAngle) = 180; + [QGVAR(Placement),"OnEachFrame", { - private "_player"; - _player = ACE_player; - if (GVAR(placer) != _player) exitWith { - call FUNC(place_Cancel); - }; - GVAR(pfeh_running) = true; - _pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]); - //_pos = _pos vectorAdd ((VectorDir GVAR(Setup)) vectorCrossProduct (GVAR(Setup) getVariable [QGVAR(Offset), [0,0,0]])); - GVAR(Setup) setPosATL _pos; - if (ACE_Modifier == 0) then { - GVAR(Setup) setDir (GVAR(TweakedAngle) + getDir _player); - }; + private "_player"; + _player = ACE_player; + if (GVAR(placer) != _player) exitWith { + call FUNC(place_Cancel); + }; + GVAR(pfeh_running) = true; + _pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]); + GVAR(Setup) setPosATL _pos; + if (ACE_Modifier == 0) then { + GVAR(Setup) setDir (GVAR(TweakedAngle) + getDir _player); + }; }] call CALLSTACK(BIS_fnc_addStackedEventHandler); + [localize "STR_ACE_Explosives_PlaceAction", localize "STR_ACE_Explosives_CancelAction", - localize "STR_ACE_Explosives_ScrollAction"] call EFUNC(interaction,showMouseHint); + localize "STR_ACE_Explosives_ScrollAction"] call EFUNC(interaction,showMouseHint); _unit setVariable [QGVAR(Place), [_unit, "DefaultAction", - {GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Approve);}] call EFUNC(common,AddActionEventHandler)]; -_unit setVariable [QGVAR(Cancel), [_unit, "MenuBack", - {GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Cancel);}] call EFUNC(common,AddActionEventHandler)]; + {GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Approve);}] call EFUNC(common,AddActionEventHandler)]; +_unit setVariable [QGVAR(Cancel), [_unit, "zoomtemp", + {GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Cancel);}] call EFUNC(common,AddActionEventHandler)]; diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index 35e5e682df..7eacdd33e1 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -15,49 +15,48 @@ * Public: Yes */ #include "script_component.hpp" -private ["_unit","_target"]; -_unit = _this select 0; -_target = _this select 1; +EXPLODE_2_PVT(_this,_unit,_target); +_target = attachedTo (_target); _fnc_DefuseTime = { - _target = _this select 1; + EXPLODE_2_PVT(_this,_specialist,_target); - _defuseTime = 5; - if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime")) then { - _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime"); - }; - if (!(_this select 0) && {GVAR(PunishNonSpecialists)}) then { - _defuseTime = _defuseTime * 1.5; - }; - _defuseTime + _defuseTime = 5; + if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime")) then { + _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime"); + }; + if (!_specialist && {GVAR(PunishNonSpecialists)}) then { + _defuseTime = _defuseTime * 1.5; + }; + _defuseTime }; _actionToPlay = "MedicOther"; if (STANCE _unit == "Prone") then { - _actionToPlay = "PutDown"; + _actionToPlay = "PutDown"; }; if (ACE_player != _unit) then { - // If the unit is a player, call the function on the player. - if (isPlayer _unit) then { - [[_unit, _target], QFUNC(startDefuse), _unit] call EFUNC(common,execRemoteFnc); - } else { - // TODO: use scheduled delay execution - [_unit, _target, [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime] spawn { - (_this select 0) playActionNow _actionToPlay; - (_this select 0) disableAI "MOVE"; - (_this select 0) disableAI "TARGET"; - sleep (_this select 2); - [(_this select 0), (_this select 1)] call FUNC(defuseExplosive); - (_this select 0) enableAI "MOVE"; - (_this select 0) enableAI "TARGET"; + // If the unit is a player, call the function on the player. + if (isPlayer _unit) then { + [[_unit, _target], QFUNC(startDefuse), _unit] call EFUNC(common,execRemoteFnc); + } else { + // TODO: use scheduled delay execution + [_unit, _target, [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime] spawn { + (_this select 0) playActionNow _actionToPlay; + (_this select 0) disableAI "MOVE"; + (_this select 0) disableAI "TARGET"; + sleep (_this select 2); + [(_this select 0), (_this select 1)] call FUNC(defuseExplosive); + (_this select 0) enableAI "MOVE"; + (_this select 0) enableAI "TARGET"; + }; }; - }; } else { - _unit playActionNow _actionToPlay; - private ["_defuseSeconds", "_isEOD"]; - _isEOD = [_unit] call EFUNC(Common,isEOD); - _defuseSeconds = [_isEOD, _target] call _fnc_DefuseTime; - if (_isEOD || {!GVAR(RequireSpecialist)}) then { - [_defuseSeconds, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize "STR_ACE_Explosives_DefusingExplosive")] call EFUNC(common,progressBar); - }; + _unit playActionNow _actionToPlay; + private ["_defuseSeconds", "_isEOD"]; + _isEOD = [_unit] call EFUNC(Common,isEOD); + _defuseSeconds = [_isEOD, _target] call _fnc_DefuseTime; + if (_isEOD || {!GVAR(RequireSpecialist)}) then { + [_defuseSeconds, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize "STR_ACE_Explosives_DefusingExplosive")] call EFUNC(common,progressBar); + }; }; diff --git a/addons/explosives/functions/fnc_startTimer.sqf b/addons/explosives/functions/fnc_startTimer.sqf index f4b0876866..13da62ec29 100644 --- a/addons/explosives/functions/fnc_startTimer.sqf +++ b/addons/explosives/functions/fnc_startTimer.sqf @@ -21,6 +21,6 @@ EXPLODE_2_PVT(_this,_explosive,_delay); [{ _explosive = _this; if (!isNull _explosive) then { - [_explosive, -1, [_explosive, 0], true] call FUNC(detonateExplosive); + [_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive); }; }, _explosive, _delay, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index c19c65ccb2..57ef190460 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1,494 +1,497 @@ - - - Explosives - Sprengstoffe - Explosivos - Ładunki wybuchowe - Explosifs - Výbušniny - Esplosivi - Robbanóanyagok - Explosivos - Взрывчатка - - - Place >> - Platzieren >> - Colocar >> - Umieść >> - Placer >> - Položit >> - Piazza >> - Lerakás >> - Colocar >> - Установить >> - - - Detonate >> - Zünden >> - Detonar >> - Detonuj >> - Mise à feu >> - Odpálit >> - Detona >> - Robbantás >> - Detonar >> - Подрыв >> - - - Explosive code: %1 - Sprengstoffcode: %1 - Código del explosivo: %1 - Kod ładunku: %1 - Code explosif: %1 - Kód výbušniny: %1 - Codice dell'esplosivo : %1 - Robbanóanyag kódja: %1 - Código do explosivo: %1 - Взрывная код: %1 - - - Place - Platzieren - Colocar - Umieść - Placer - Položit - Piazza - Elhelyezés - Colocar - Положить - - - Cancel - Abbrechen - Cancelar - Anuluj - Annuler - Zrušit - Annulla - Mégsem - Cancelar - Отмена - - - + Modifier, rotates - + Modifikator, drehen - + Modificador, girar - + Modificateur, tourner - + Modificatore, rotazione - + Otočit - + Változtatás, forgatás - + modyfikator, obracanie - + Modificador, rotaciona - + Bращать - - - Turn On Thor III - Thor III aktivieren - Encender Thor III - Włącz Thor III - Allumer Thor III - Zapnout Thor III - Accendi Thor III - Thor III bekapcsolása - Ativar Thor III - Активировать Thor III - - - Turn Off Thor III - Thor III deaktivieren - Apagar Thor III - Wyłącz Thor III - Éteindre Thor III - Vypnout Thor III - Spegni Thor III - Thor III kikapcsolása - Desativar Thor III - Деактивировать Thor III - - - Cellphone - Mobiltelefon - Télefono móvil - Telefon komórkowy - Téléphone Portable - Telefon - Cellulare - Mobil - Celular - Сотовый телефон - - - Used to remotely trigger explosives - Wird benutzt um Sprengstoffe fernzuzünden - Usado para detonar remotamente explosivos - Używany do zdalnego detonowania ładunków wybuchowych - Utilisé pour déclencher des explosifs à distance - Používaný ke vzdálenému odpalování výbušnin - Usato per l'attivazione a distanza degli esplosivi - Robbanóanyagok távoli robbantásához - Usado para acionar explosivos remotamente - Используется для удаленного запуска взрывчатку - - - M57 Firing Device - M57 Zündvorrichtung - Dispositivo de detonación M57 - Zapalnik M57 - M57 Dispositif de mise à feu - M57 Odpalovací Zařízení - Detonatore M57 - M57 Detonátor - M57 Dispositivo de Detonação - Взрыватель M57 - - - Used to remotely trigger explosives - Wird benutzt um Sprengstoffe fernzuzünden - Usado para detonar remotamente explosivos - Używany do zdalnego detonowania ładunków wybuchowych - Utilisé pour déclencher des explosifs à distance - Použévané ke vzdálenému odpalování výbušnin - Usato per l'attivazione a distanza degli esplosivi - Robbanóanyagok távoli robbantásához - Usado para acionar explosivos remotamente - Используется для удаленного запуска взрывчатку - - - M26 Firing Device - M26 Zündvorrichtung - Dispositivo de detonación MK26 - Zapalnik M26 - M26 Dispositif de mise à feu - M26 Odpalovací Zařízení - Detonatore M26 - M26 Detonátor - M26 Dispositivo de Detonação - Взрыватель M26 - - - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - - - Defusal Kit - Entschärfungskit - Kit de desactivación - Zestaw do rozbrajania - Kit de désamorçage - Zneškodňovací sada - Kit E.O.D. - Hatástalanító felszerelés - Kit de desarme - Разминирование комплект - - - Allows defusing of explosives - Erlaubt die Entschärfung von Sprengstoffen - Permite desactivar explosivos - Umożliwia rozbrajanie ładunków wybuchowych - Permet de désamorçer des explosifs - Dovoluje zneškodňování výbušnin - Consente la disattivazione degli ordigni esplosivi - Robbanóanyagok hatástalanításához - Permite o desarme de explosivos - Allows defusing of explosives - - - Add to Speed Dial - Zur Schnellauswahl hinzufügen - Agregar a marcado rápido - Dodaj do szybkiego wybierania - Ajouter à la composition rapide - Přidat jako rychlou volbu - Aggiungi alla selezione rapida - Hozzáadás gyorshíváshoz - Adicionar à ligação rápida - Добавить в ускоренный набор - - - Clear - Löschen - Borrar - Usuń - Désamorçé - Čistý - Libera - Törlés - Limpar - Pассеиваться - - - Dial - Wählen - Marcar - Wybierz mumer - Composer - Vytočit - Composizione numero - Tárcsázás - Discar - Hабрать - - - Up - Hoch - Arriba - W górę - Haut - Nahoru - Sopra - Fel - Cima - Поднять - - - Down - Runter - Abajo - W dół - Bas - Dolu - Sotto - Le - Baixo - Опустить - - - Cancel - Abbrechen - Cancelar - Anuluj - Annuler - Zrušit - Annulla - Mégsem - Cancelar - Отмена - - - Detonate Menu - "Zünden"-Menü - Menú de detonación - Menu detonowania - Menu de mise à feu - Menu Detonace - Menù di detonazione - Robbantás menü - Menu de detonação - Меню Подрыв - - - Place Menu - "Platzieren"-Menü - Menú de colocación - Menu umieszczania - Menu Placement - Menu Umístění - Menù di collocamento - Lerakás menü - Menu de posicionamento - Меню Установить - - - Defuse - Entschärfen - Desactivar - Rozbrój - Désamorçer - Zneškodnit - Disinnesca - Hatástalanítás - Desarmar - Обезвредить - - - Defusing Explosive... - Entschärfe Sprengstoff... - Desactivando explosivo... - Rozbrajanie ładunku... - Désamorçage des explosifs... - Zneškodňuji Výbušninu... - Esposivo in fase di disattivazione... - Robbanóanyag hatástalaníása... - Desarmando Explosivo... - Обезвреживание... - - - Timer - Zeitzünder - Temporizador - Czasomierz - Retard - Časovač - Cronometro - Időzített - Timer - Временной - - - Time: %1m %2s - Zeit: %1m %2s - Tiempo: %1m %2s - Czas: %1m %2s - Temps : %1m %2s - Čas: %1m %2s - Tempo : %1m %2s - Idő: %1m %2s - Tempo: %1m %2s - Tемп: %1m %2c - - - Set Time - Zeit einstellen - Configurar tiempo - Ustaw czas - Régler retard - Nastavit Čas - Modifica il conto alla rovescia - Idő állítása - Configurar Tempo - Xронометр - - - Select a Trigger - Wähle einen Zünder - Seleccionar un disparador - Wybierz zapalnik - Sélectionner une mise à feu - Zvolit Detonátor - Seleziona un Attivatore - Detonátor kiválasztása - Selecionar um Gatilho - Выберите - - - Select - Wählen - Seleccionar - Wybierz - Sélectionner - Zvolit - Seleziona - Kiválasztás - Selecionar - Выбрать защелка - - - Pressure Plate - Płyta naciskowa - Placa de presión - Druckplatte - Plaque de pression - Nášlapná nástraha - Piastra a Pressione - Nyomólap - Placa de pressão - Давление - - - Tripwire - Linka naciągu - Cable trampa - Stolperdraht - Fil de butée - Nástražný drát - Filo a Inciampo - Botlódrót - Linha de tração - Натяжной - - - IR Sensor - Czujnik podczerwieni - Sensor IR - Infrarotsensor - Capteur IR - IR Značkovač - Sensore IR - IR szenzor - Sensor IV - ИК - - - No triggers available for %1 - Brak dostępnych zapalników dla %1 - No hay detonadores disponibles para %1 - Keine Auslöser vorhanden für %1 - Pas de mise à feu disponible pour %1 - Žádný detonátor k dispozici pro %1 - Nessun attivatore disponibile per %1 - Nincs detonátor a %1 - Nenhum gatilho disponível para %1 - Нет защелка доступны для %1 - - - IR Sensor (Side Attack) - Czujnik podczerwieni (wybuch na bok) - Sensor IR (ataque lateral) - Infrarotsensor (Seitenangriff) - Capteur IR (de flanc) - IR Značkovač (Výbuch stranou) - Sensore IR (Attacco laterale) - IR Sensor (Side Attack) - Sensor infravermelho (ataque lateral) - ИК (боковая атака) - - - Magnetic Influence Sensor (Bottom Attack) - Czujnik magnetyczny (wybuch w górę) - Sensor IM (ataque inferior) - Magnetfeldsensor (Bodenangriff) - Capteur Magnétique (par le bas) - Magnetický Senzor (Výbuch ze spoda) - Sensore Magnetico di Prossimità (Attacco inferiore) - Mágneses (Bottom Attack) - Influência magnética (ataque inferior) - Магнитный (дно атака) - - - No explosives on trigger. - Keine Sprengladungen auf diesem Auslöser. - Ningún explosivo en el detonador. - Pas d'explosif à mettre à feu. - Nessun esplosivo sul sensore. - Žádná výbušnina k odpálení. - Nincs robbanóanyag a detonátorhoz. - Brak ładunków na zapalnik. - Nenhum explosivo no gatilho. - Нет взрывчатки на курок. - - - Dead Man's Switch - Totmannschalter - Mise à feu par relâchement de pression - Spínač mrtvého muže - Czuwak - Detonador de hombre muerto - Dead Man's Switch - Кнопка мертвеца - - - Used to remotely trigger explosives when released. - Zündet Sprengladungen wenn losgelassen. - Déclenche la mise à feu d'un explosif lorsqu'il est libéré. - Používaný k vzdálenému odpálení, při uvolnění odpálí výbušniny - Używany w celu zdalnej detonacji ładunków kiedy jego operator zostanie zabity. - Utilizado para detonar explosivos remotamente al soltarlo. - Robbanóanyagok távoli robbantásához - Используется для дистанционного подрыва, после смерти оператора. - - + + + Explosives + Sprengstoffe + Explosivos + Ładunki wybuchowe + Explosifs + Výbušniny + Esplosivi + Robbanóanyagok + Explosivos + Взрывчатка + + + Place >> + Platzieren >> + Colocar >> + Umieść >> + Placer >> + Položit >> + Piazza >> + Lerakás >> + Colocar >> + Установить >> + + + Detonate >> + Zünden >> + Detonar >> + Detonuj >> + Mise à feu >> + Odpálit >> + Detona >> + Robbantás >> + Detonar >> + Подрыв >> + + + Explosive code: %1 + Sprengstoffcode: %1 + Código del explosivo: %1 + Kod ładunku: %1 + Code explosif: %1 + Kód výbušniny: %1 + Codice dell'esplosivo : %1 + Robbanóanyag kódja: %1 + Código do explosivo: %1 + Взрывная код: %1 + + + Place + Platzieren + Colocar + Umieść + Placer + Položit + Piazza + Elhelyezés + Colocar + Положить + + + Cancel + Abbrechen + Cancelar + Anuluj + Annuler + Zrušit + Annulla + Mégsem + Cancelar + Отмена + + + + Modifier, rotates + + Modifikator, drehen + + Modificador, girar + + Modificateur, tourner + + Modificatore, rotazione + + Otočit + + Változtatás, forgatás + + modyfikator, obracanie + + Modificador, rotaciona + + Bращать + + + Turn On Thor III + Thor III aktivieren + Encender Thor III + Włącz Thor III + Allumer Thor III + Zapnout Thor III + Accendi Thor III + Thor III bekapcsolása + Ativar Thor III + Активировать Thor III + + + Turn Off Thor III + Thor III deaktivieren + Apagar Thor III + Wyłącz Thor III + Éteindre Thor III + Vypnout Thor III + Spegni Thor III + Thor III kikapcsolása + Desativar Thor III + Деактивировать Thor III + + + Cellphone + Mobiltelefon + Télefono móvil + Telefon komórkowy + Téléphone Portable + Telefon + Cellulare + Mobil + Celular + Сотовый телефон + + + Used to remotely trigger explosives + Wird benutzt um Sprengstoffe fernzuzünden + Usado para detonar remotamente explosivos + Używany do zdalnego detonowania ładunków wybuchowych + Utilisé pour déclencher des explosifs à distance + Používaný ke vzdálenému odpalování výbušnin + Usato per l'attivazione a distanza degli esplosivi + Robbanóanyagok távoli robbantásához + Usado para acionar explosivos remotamente + Используется для удаленного запуска взрывчатку + + + M57 Firing Device + M57 Zündvorrichtung + Dispositivo de detonación M57 + Zapalnik M57 + M57 Dispositif de mise à feu + M57 Odpalovací Zařízení + Detonatore M57 + M57 Detonátor + M57 Dispositivo de Detonação + Взрыватель M57 + + + Used to remotely trigger explosives + Wird benutzt um Sprengstoffe fernzuzünden + Usado para detonar remotamente explosivos + Używany do zdalnego detonowania ładunków wybuchowych + Utilisé pour déclencher des explosifs à distance + Použévané ke vzdálenému odpalování výbušnin + Usato per l'attivazione a distanza degli esplosivi + Robbanóanyagok távoli robbantásához + Usado para acionar explosivos remotamente + Используется для удаленного запуска взрывчатку + + + M26 Firing Device + M26 Zündvorrichtung + Dispositivo de detonación MK26 + Zapalnik M26 + M26 Dispositif de mise à feu + M26 Odpalovací Zařízení + Detonatore M26 + M26 Detonátor + M26 Dispositivo de Detonação + Взрыватель M26 + + + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + + + Defusal Kit + Entschärfungskit + Kit de desactivación + Zestaw do rozbrajania + Kit de désamorçage + Zneškodňovací sada + Kit E.O.D. + Hatástalanító felszerelés + Kit de desarme + Разминирование комплект + + + Allows defusing of explosives + Erlaubt die Entschärfung von Sprengstoffen + Permite desactivar explosivos + Umożliwia rozbrajanie ładunków wybuchowych + Permet de désamorçer des explosifs + Dovoluje zneškodňování výbušnin + Consente la disattivazione degli ordigni esplosivi + Robbanóanyagok hatástalanításához + Permite o desarme de explosivos + Allows defusing of explosives + + + Add to Speed Dial + Zur Schnellauswahl hinzufügen + Agregar a marcado rápido + Dodaj do szybkiego wybierania + Ajouter à la composition rapide + Přidat jako rychlou volbu + Aggiungi alla selezione rapida + Hozzáadás gyorshíváshoz + Adicionar à ligação rápida + Добавить в ускоренный набор + + + Clear + Löschen + Borrar + Usuń + Désamorçé + Čistý + Libera + Törlés + Limpar + Pассеиваться + + + Dial + Wählen + Marcar + Wybierz mumer + Composer + Vytočit + Composizione numero + Tárcsázás + Discar + Hабрать + + + Up + Hoch + Arriba + W górę + Haut + Nahoru + Sopra + Fel + Cima + Поднять + + + Down + Runter + Abajo + W dół + Bas + Dolu + Sotto + Le + Baixo + Опустить + + + Cancel + Abbrechen + Cancelar + Anuluj + Annuler + Zrušit + Annulla + Mégsem + Cancelar + Отмена + + + Detonate Menu + "Zünden"-Menü + Menú de detonación + Menu detonowania + Menu de mise à feu + Menu Detonace + Menù di detonazione + Robbantás menü + Menu de detonação + Меню Подрыв + + + Place Menu + "Platzieren"-Menü + Menú de colocación + Menu umieszczania + Menu Placement + Menu Umístění + Menù di collocamento + Lerakás menü + Menu de posicionamento + Меню Установить + + + Defuse + Entschärfen + Desactivar + Rozbrój + Désamorçer + Zneškodnit + Disinnesca + Hatástalanítás + Desarmar + Обезвредить + + + Defusing Explosive... + Entschärfe Sprengstoff... + Desactivando explosivo... + Rozbrajanie ładunku... + Désamorçage des explosifs... + Zneškodňuji Výbušninu... + Esposivo in fase di disattivazione... + Robbanóanyag hatástalaníása... + Desarmando Explosivo... + Обезвреживание... + + + Timer + Zeitzünder + Temporizador + Czasomierz + Retard + Časovač + Cronometro + Időzített + Timer + Временной + + + Time: %1m %2s + Zeit: %1m %2s + Tiempo: %1m %2s + Czas: %1m %2s + Temps : %1m %2s + Čas: %1m %2s + Tempo : %1m %2s + Idő: %1m %2s + Tempo: %1m %2s + Tемп: %1m %2c + + + Set Time + Zeit einstellen + Configurar tiempo + Ustaw czas + Régler retard + Nastavit Čas + Modifica il conto alla rovescia + Idő állítása + Configurar Tempo + Xронометр + + + Select a Trigger + Wähle einen Zünder + Seleccionar un disparador + Wybierz zapalnik + Sélectionner une mise à feu + Zvolit Detonátor + Seleziona un Attivatore + Detonátor kiválasztása + Selecionar um Gatilho + Выберите + + + Select + Wählen + Seleccionar + Wybierz + Sélectionner + Zvolit + Seleziona + Kiválasztás + Selecionar + Выбрать защелка + + + Pressure Plate + Płyta naciskowa + Placa de presión + Druckplatte + Plaque de pression + Nášlapná nástraha + Piastra a Pressione + Nyomólap + Placa de pressão + Давление + + + Tripwire + Linka naciągu + Cable trampa + Stolperdraht + Fil de butée + Nástražný drát + Filo a Inciampo + Botlódrót + Linha de tração + Натяжной + + + IR Sensor + Czujnik podczerwieni + Sensor IR + Infrarotsensor + Capteur IR + IR Značkovač + Sensore IR + IR szenzor + Sensor IV + ИК + + + No triggers available for %1 + Brak dostępnych zapalników dla %1 + No hay detonadores disponibles para %1 + Keine Auslöser vorhanden für %1 + Pas de mise à feu disponible pour %1 + Žádný detonátor k dispozici pro %1 + Nessun attivatore disponibile per %1 + Nincs detonátor a %1 + Nenhum gatilho disponível para %1 + Нет защелка доступны для %1 + + + IR Sensor (Side Attack) + Czujnik podczerwieni (wybuch na bok) + Sensor IR (ataque lateral) + Infrarotsensor (Seitenangriff) + Capteur IR (de flanc) + IR Značkovač (Výbuch stranou) + Sensore IR (Attacco laterale) + IR Sensor (Side Attack) + Sensor infravermelho (ataque lateral) + ИК (боковая атака) + + + Magnetic Influence Sensor (Bottom Attack) + Czujnik magnetyczny (wybuch w górę) + Sensor IM (ataque inferior) + Magnetfeldsensor (Bodenangriff) + Capteur Magnétique (par le bas) + Magnetický Senzor (Výbuch ze spoda) + Sensore Magnetico di Prossimità (Attacco inferiore) + Mágneses (Bottom Attack) + Influência magnética (ataque inferior) + Магнитный (дно атака) + + + No explosives on trigger. + Keine Sprengladungen auf diesem Auslöser. + Ningún explosivo en el detonador. + Pas d'explosif à mettre à feu. + Nessun esplosivo sul sensore. + Žádná výbušnina k odpálení. + Nincs robbanóanyag a detonátorhoz. + Brak ładunków na zapalnik. + Nenhum explosivo no gatilho. + Нет взрывчатки на курок. + + + Dead Man's Switch + Totmannschalter + Mise à feu par relâchement de pression + Spínač mrtvého muže + Czuwak + Detonador de hombre muerto + Dead Man's Switch + Кнопка мертвеца + + + Used to remotely trigger explosives when released. + Zündet Sprengladungen wenn losgelassen. + Déclenche la mise à feu d'un explosif lorsqu'il est libéré. + Používaný k vzdálenému odpálení, při uvolnění odpálí výbušniny + Używany w celu zdalnej detonacji ładunków kiedy jego operator zostanie zabity. + Utilizado para detonar explosivos remotamente al soltarlo. + Robbanóanyagok távoli robbantásához + Используется для дистанционного подрыва, после смерти оператора. + + + Pick up + + diff --git a/addons/fcs/CfgOptics.hpp b/addons/fcs/CfgOptics.hpp index 3c17e760f0..e32a01b3d1 100644 --- a/addons/fcs/CfgOptics.hpp +++ b/addons/fcs/CfgOptics.hpp @@ -147,6 +147,14 @@ class RscInGameUI { MACRO_RANGEFINDER }; }; + }; + class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { + onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; }; class RscOptics_Heli_Attack_01_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 67c7e1d301..698a9bef22 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -48,7 +48,14 @@ _offset = 0; _velocityCorrection = (vectorMagnitude velocity _projectile) - getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); -[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, _velocityCorrection] call EFUNC(common,changeProjectileDirection); +[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, -_velocityCorrection] call EFUNC(common,changeProjectileDirection); + +// Remove the platform velocity +if( (vectorMagnitude velocity _vehicle) > 2) then { + _sumVelocity = (velocity _projectile) vectorDiff (velocity _vehicle); + _projectile setVelocity _sumVelocity; +}; + // Air burst missile // handle locally only diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index f0b1f1b137..433053178b 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -12,7 +12,7 @@ #include "script_component.hpp" -private ["_vehicle", "_turret", "_turretConfig", "_distance", "_magazines", "_userChange"]; +private ["_vehicle", "_turret", "_turretConfig", "_distance", "_magazines", "_showHint", "_playSound"]; _vehicle = _this select 0; _turret = _this select 1; @@ -162,11 +162,20 @@ _FCSElevation = []; [_vehicle, format ["%1_%2", QGVAR(Elevation), _turret], _FCSElevation] call EFUNC(common,setVariablePublic); [_vehicle, format ["%1_%2", QGVAR(Azimuth), _turret], _FCSAzimuth] call EFUNC(common,setVariablePublic); -_userChange = true; +_showHint = false; if( (count _this) > 3) then { - _userChange = _this select 3; + _showHint = _this select 3; }; -if(_userChange) then { +_playSound = true; +if( (count _this) > 3) then { + _playSound = _this select 4; +}; + +if(_playSound) then { + playSound "ACE_Sound_Click"; +}; + +if(_showHint) then { [format ["%1: %2", localize "STR_ACE_FCS_ZeroedTo", _distance]] call EFUNC(common,displayTextStructured); }; \ No newline at end of file diff --git a/addons/fcs/functions/fnc_onForceUpdate.sqf b/addons/fcs/functions/fnc_onForceUpdate.sqf index c911fc38de..6f477fd3f6 100644 --- a/addons/fcs/functions/fnc_onForceUpdate.sqf +++ b/addons/fcs/functions/fnc_onForceUpdate.sqf @@ -4,4 +4,4 @@ if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) ex if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false}; [vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -1, false] call FUNC(keyDown); -[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -1, false] call FUNC(keyUp); \ No newline at end of file +[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -1, false, false] call FUNC(keyUp); \ No newline at end of file diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf index f44fb2e2b9..f0fdc8458f 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf @@ -1,9 +1,9 @@ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" TRACE_1("enter", _this); -#define FCS_UPDATE_DELAY 2.0 +#define FCS_UPDATE_DELAY 1 FUNC(magnitude) = { _this distance [0, 0, 0] @@ -68,14 +68,13 @@ FUNC(laserHudDesignatePFH) = { ["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent; }; - if( ((getPosASL _laserTarget) vectorDistance _pos) > 2) then { + if( (_laserTarget distance _pos) > 0.1) then { TRACE_1("LaserPos Update", ""); _laserTarget setPosATL (ASLToATL _pos); - - }; + }; if(diag_tickTime > _forceUpdateTime) then { - _args set[3, diag_tickTime + FCS_UPDATE_DELAY]; + _args set[2, diag_tickTime + FCS_UPDATE_DELAY]; }; #ifdef DEBUG_MODE_FULL drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], (getPosATL _laserTarget), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"]; @@ -101,7 +100,7 @@ if(isNil QGVAR(laser)) then { GVAR(laserActive) = true; - _handle = [FUNC(laserHudDesignatePFH), 0, [_laserTarget, player]] call cba_fnc_addPerFrameHandler; + _handle = [FUNC(laserHudDesignatePFH), 0.1, [_laserTarget, player]] call cba_fnc_addPerFrameHandler; _laserTarget setVariable ["ACE_PFH_HANDLE", _handle, false]; GVAR(laser) = _laserTarget; diff --git a/addons/laserpointer/stringtable.xml b/addons/laserpointer/stringtable.xml index 1da46607d4..87b36618a6 100644 --- a/addons/laserpointer/stringtable.xml +++ b/addons/laserpointer/stringtable.xml @@ -17,7 +17,6 @@ - <t color='#9cf953'>Use: </t>Turn Laser ON/OFF <t color='#9cf953'>Use: </t>Turn Laser ON/OFF <t color='#9cf953'>Použití: </t>Zapnout/vypnout laser <t color='#9cf953'>Utiliser : </t>laser on/off diff --git a/addons/magazines/CfgEventHandlers.hpp b/addons/magazines/CfgEventHandlers.hpp deleted file mode 100644 index b5577d09b7..0000000000 --- a/addons/magazines/CfgEventHandlers.hpp +++ /dev/null @@ -1,13 +0,0 @@ -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; - -class Extended_FiredBIS_EventHandlers { - class AllVehicles { - class ADDON { - firedBIS = QUOTE(_this call FUNC(forceMagazineMuzzleVelocity)); - }; - }; -}; diff --git a/addons/magazines/CfgMagazines.hpp b/addons/magazines/CfgMagazines.hpp index 1c0242bd6d..86cb6d9e1b 100644 --- a/addons/magazines/CfgMagazines.hpp +++ b/addons/magazines/CfgMagazines.hpp @@ -22,7 +22,6 @@ class CfgMagazines { descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription"; picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa"; initSpeed = 320; - GVAR(forceMagazineMuzzleVelocity) = 1; }; class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag { @@ -58,7 +57,6 @@ class CfgMagazines { displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort"; descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription"; initSpeed = 320; - GVAR(forceMagazineMuzzleVelocity) = 1; }; class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green { @@ -90,7 +88,6 @@ class CfgMagazines { displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort"; descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription"; initSpeed = 320; - GVAR(forceMagazineMuzzleVelocity) = 1; picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa"; }; @@ -130,7 +127,6 @@ class CfgMagazines { displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort"; descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription"; initSpeed = 320; - GVAR(forceMagazineMuzzleVelocity) = 1; }; class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag { diff --git a/addons/magazines/XEH_preInit.sqf b/addons/magazines/XEH_preInit.sqf deleted file mode 100644 index 8e611f370a..0000000000 --- a/addons/magazines/XEH_preInit.sqf +++ /dev/null @@ -1,7 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; - -PREP(forceMagazineMuzzleVelocity); - -ADDON = true; diff --git a/addons/magazines/config.cpp b/addons/magazines/config.cpp index 58c1dfa467..c757d62f5c 100644 --- a/addons/magazines/config.cpp +++ b/addons/magazines/config.cpp @@ -12,8 +12,6 @@ class CfgPatches { }; }; -#include "CfgEventHandlers.hpp" - #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" diff --git a/addons/magazines/functions/fnc_forceMagazineMuzzleVelocity.sqf b/addons/magazines/functions/fnc_forceMagazineMuzzleVelocity.sqf deleted file mode 100644 index 414dbb40e8..0000000000 --- a/addons/magazines/functions/fnc_forceMagazineMuzzleVelocity.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: commy2 - * - * DESCRIPTION. - * - * Arguments: - * firedBIS - * - * Return Value: - * None - */ - -#include "script_component.hpp" - -private ["_weapon", "_magazine", "_projectile"]; - -_weapon = _this select 1; -_magazine = _this select 5; -_projectile = _this select 6; - -if (getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(forceMagazineMuzzleVelocity)) != 1) exitWith { - //hint str (speed _projectile / 3.6); -}; - -private ["_initSpeedWeapon", "_initSpeedMagazine"]; - -_initSpeedWeapon = getNumber (configFile >> "CfgWeapons" >> _weapon >> "initSpeed"); -_initSpeedMagazine = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); - -//systemChat format ["W: %1m/s, M: %2m/s", _initSpeedWeapon, _initSpeedMagazine]; - -// force magazine initSpeed - -private ["_credit", "_debit"]; - -_credit = vectorMagnitude velocity _projectile; -_debit = _credit + (_initSpeedMagazine - _initSpeedWeapon); - -_projectile setVelocity ((velocity _projectile) vectorMultiply (_debit / _credit)); - -//hint str (speed _projectile / 3.6); diff --git a/addons/magazines/functions/script_component.hpp b/addons/magazines/functions/script_component.hpp deleted file mode 100644 index 2849ae3632..0000000000 --- a/addons/magazines/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\magazines\script_component.hpp" \ No newline at end of file diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index c2336529b3..13c54dfe37 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -886,7 +886,7 @@ class CfgVehicles { scope = 2; accuracy = 1000; displayName = "[ACE] Medical Supply Crate"; - model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F"; + model = PATHTOF(data\ace_medcrate.p3d); author = "$STR_ACE_Common_ACETeam"; class TransportItems { class ACE_fieldDressing { diff --git a/addons/medical/data/ace_medcrate.p3d b/addons/medical/data/ace_medcrate.p3d new file mode 100644 index 0000000000..4398599b99 Binary files /dev/null and b/addons/medical/data/ace_medcrate.p3d differ diff --git a/addons/medical/data/ace_medcrate_co.paa b/addons/medical/data/ace_medcrate_co.paa new file mode 100644 index 0000000000..a817bf0ae4 Binary files /dev/null and b/addons/medical/data/ace_medcrate_co.paa differ diff --git a/addons/medical/data/ace_medcrate_r.p3d b/addons/medical/data/ace_medcrate_r.p3d new file mode 100644 index 0000000000..f711996bec Binary files /dev/null and b/addons/medical/data/ace_medcrate_r.p3d differ diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index b5eecbeb8d..599c2f344f 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -31,7 +31,9 @@ if (_show) then { [{ private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"]; _target = (_this select 0) select 0; - if (GVAR(displayPatientInformationTarget) != _target) exitwith { + _selectionN = (_this select 0) select 1; + + if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith { [_this select 1] call CBA_fnc_removePerFrameHandler; }; @@ -44,7 +46,7 @@ if (_show) then { _allInjuryTexts = []; _genericMessages = []; - _partText = ["STR_ACE_Interaction_Head", "STR_ACE_Interaction_Torso", "STR_ACE_Interaction_ArmLeft" ,"STR_ACE_Interaction_ArmRight" ,"STR_ACE_Interaction_LegLeft", "STR_ACE_Interaction_LegRight"] select GVAR(currentSelectedSelectionN); + _partText = ["STR_ACE_Interaction_Head", "STR_ACE_Interaction_Torso", "STR_ACE_Interaction_ArmLeft" ,"STR_ACE_Interaction_ArmRight" ,"STR_ACE_Interaction_LegLeft", "STR_ACE_Interaction_LegRight"] select _selectionN; _genericMessages pushback [localize _partText, [1, 1, 1, 1]]; if (_target getvariable[QGVAR(isBleeding), false]) then { @@ -54,7 +56,7 @@ if (_show) then { _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_LOST_BLOOD", [1, 0.1, 0.1, 1]]; }; - if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select GVAR(currentSelectedSelectionN)) > 0) then { + if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then { _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.77, 0.51, 0.08, 1]]; }; if (_target getvariable[QGVAR(hasPain), false]) then { @@ -192,7 +194,7 @@ if (_show) then { (_display displayCtrl 303) ctrlSetText (_triageStatus select 0); (_display displayCtrl 303) ctrlSetBackgroundColor (_triageStatus select 2); - }, 0, [_target]] call CBA_fnc_addPerFrameHandler; + }, 0, [_target, GVAR(currentSelectedSelectionN)]] call CBA_fnc_addPerFrameHandler; } else { ("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index c6e59fead2..5feb209b44 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -16,7 +16,6 @@ private ["_target", "_show"]; _target = _this select 0; _show = if (count _this > 1) then {_this select 1} else {true}; -GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} else {0}; GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull}; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 0243ab5222..70506fa3e0 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -30,9 +30,6 @@ Injetar Morfina Inietta Morfina - - Inject Atropine - Transfuse Blood Bluttransfusion diff --git a/addons/vector/XEH_preInit.sqf b/addons/vector/XEH_preInit.sqf index 21ca573118..fcae0f282b 100644 --- a/addons/vector/XEH_preInit.sqf +++ b/addons/vector/XEH_preInit.sqf @@ -18,7 +18,7 @@ PREP(getHeightDistance); PREP(getRelativeAzimuthDistance); PREP(getRelativeDistance); PREP(getRelativeHeightLength); -PREP(getFallOfShort); +PREP(getFallOfShot); PREP(showAzimuth); PREP(showAzimuthInclination); PREP(showHeightDistance); @@ -26,7 +26,7 @@ PREP(showDistance); PREP(showRelativeAzimuthDistance); PREP(showRelativeDistance); PREP(showRelativeHeightLength); -PREP(showFallOfShort); +PREP(showFallOfShot); PREP(showText); PREP(nextMode); PREP(adjustBrightness); diff --git a/addons/vector/functions/fnc_convertToTexturesFOS.sqf b/addons/vector/functions/fnc_convertToTexturesFOS.sqf index 2a93f93548..3ce09e3c6c 100644 --- a/addons/vector/functions/fnc_convertToTexturesFOS.sqf +++ b/addons/vector/functions/fnc_convertToTexturesFOS.sqf @@ -30,75 +30,6 @@ _digit4 = _number mod 10; switch (_coordinate) do { case 0 : { - if (_isNegative) then { - - if (_digit1 == 0) then { - if (_digit2 == 0) then { - if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); - _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; - _digit3 = ""; - _digit4 = ""; - } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); - _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; - _digit4 = ""; - }; - } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); - _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; - }; - } else { - _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - }; - - } else { - - if (_digit1 == 0) then { - if (_digit2 == 0) then { - if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); - _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; - _digit3 = ""; - _digit4 = ""; - } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); - _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; - _digit4 = ""; - }; - } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); - _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; - }; - } else { - _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - }; - }; - - }; - - case 1 : { - if (_isNegative) then { if (_digit1 == 0) then { @@ -166,6 +97,75 @@ switch (_coordinate) do { }; + case 1 : { + + if (_isNegative) then { + + if (_digit1 == 0) then { + if (_digit2 == 0) then { + if (_digit3 == 0) then { + _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); + _digit1 = ""; + _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = ""; + _digit4 = ""; + } else { + _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); + _digit1 = ""; + _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit4 = ""; + }; + } else { + _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); + _digit1 = ""; + _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; + _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + }; + } else { + _digit0 = ""; + _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + }; + + } else { + + if (_digit1 == 0) then { + if (_digit2 == 0) then { + if (_digit3 == 0) then { + _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); + _digit1 = ""; + _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = ""; + _digit4 = ""; + } else { + _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); + _digit1 = ""; + _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit4 = ""; + }; + } else { + _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); + _digit1 = ""; + _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; + _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + }; + } else { + _digit0 = ""; + _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + }; + }; + + }; + case 2 : { if (_isNegative) then { diff --git a/addons/vector/functions/fnc_getFallOfShort.sqf b/addons/vector/functions/fnc_getFallOfShot.sqf similarity index 100% rename from addons/vector/functions/fnc_getFallOfShort.sqf rename to addons/vector/functions/fnc_getFallOfShot.sqf diff --git a/addons/vector/functions/fnc_onKeyDown.sqf b/addons/vector/functions/fnc_onKeyDown.sqf index 884f2af128..feb706bc02 100644 --- a/addons/vector/functions/fnc_onKeyDown.sqf +++ b/addons/vector/functions/fnc_onKeyDown.sqf @@ -128,11 +128,11 @@ switch (_this select 0) do { }; // prevent additinal modifier input if advanced mode it set, spaghetti - if (GETGVAR(isKeyDownAzimuth,false) && {GETGVAR(currentMode,"") in ["relative_azimuth+distance", "fall_of_short"]}) exitWith {}; + if (GETGVAR(isKeyDownAzimuth,false) && {GETGVAR(currentMode,"") in ["relative_azimuth+distance", "fall_of_shot"]}) exitWith {}; // toggle fos values - if (GETGVAR(currentMode,"") == "fall_of_short") exitWith { - [!(GETGVAR(FOSState,true))] call FUNC(showFallOfShort); + if (GETGVAR(currentMode,"") == "fall_of_shot") exitWith { + [!(GETGVAR(FOSState,true))] call FUNC(showFallOfShot); }; ["distance"] call FUNC(clearDisplay); diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf index aca31d95a5..568ef2050c 100644 --- a/addons/vector/functions/fnc_onKeyHold.sqf +++ b/addons/vector/functions/fnc_onKeyHold.sqf @@ -198,7 +198,7 @@ switch (_this select 0) do { }; - case ("fall_of_short"): { + case ("fall_of_shot"): { private "_isReady"; _isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5; @@ -207,8 +207,8 @@ switch (_this select 0) do { if (!GVAR(isKeyDownAzimuth) && {!GVAR(isKeyDownDistance)}) then { if (_isReady) then { - GVAR(FOSData) = call FUNC(getFallOfShort);// - [false] call FUNC(showFallOfShort); + GVAR(FOSData) = call FUNC(getFallOfShot); + [false] call FUNC(showFallOfShot); }; [false] call FUNC(showCenter); [false] call FUNC(showP1); diff --git a/addons/vector/functions/fnc_onKeyUp.sqf b/addons/vector/functions/fnc_onKeyUp.sqf index 5fc2d84092..aa768077d9 100644 --- a/addons/vector/functions/fnc_onKeyUp.sqf +++ b/addons/vector/functions/fnc_onKeyUp.sqf @@ -65,7 +65,7 @@ switch (_this select 0) do { ["distance"] call FUNC(clearDisplay); [true] call FUNC(showP1); GVAR(pData) = [call FUNC(getDistance), call FUNC(getDirection)]; - "fall_of_short" call _fnc_setPFH; + "fall_of_shot" call _fnc_setPFH; }; }; diff --git a/addons/vector/functions/fnc_showFallOfShort.sqf b/addons/vector/functions/fnc_showFallOfShot.sqf similarity index 100% rename from addons/vector/functions/fnc_showFallOfShort.sqf rename to addons/vector/functions/fnc_showFallOfShot.sqf index 0f2040708e..45a2232daf 100644 --- a/addons/vector/functions/fnc_showFallOfShort.sqf +++ b/addons/vector/functions/fnc_showFallOfShot.sqf @@ -15,8 +15,8 @@ _fosData = GVAR(FOSData); if !(_this select 0) then { private "_digits"; - // of abscissa - _digits = [_fosData, 0] call FUNC(convertToTexturesFOS); + // of ordinate + _digits = [_fosData, 1] call FUNC(convertToTexturesFOS); (_dlgVector displayCtrl 1310) ctrlSetText (_digits select 0); (_dlgVector displayCtrl 1311) ctrlSetText (_digits select 1); @@ -24,8 +24,8 @@ if !(_this select 0) then { (_dlgVector displayCtrl 1313) ctrlSetText (_digits select 3); (_dlgVector displayCtrl 1314) ctrlSetText (_digits select 4); - // of ordinate - _digits = [_fosData, 1] call FUNC(convertToTexturesFOS); + // of abscissa + _digits = [_fosData, 0] call FUNC(convertToTexturesFOS); (_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0); (_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index 409ebf7523..b52100046f 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -3,31 +3,26 @@ - Wind Information Wind Information Informacje o wietrze Información del viento - Direction: %1 Direction: %1 Kierunek: %1 Dirección: %1 - Speed: %1 m/s Speed: %1 m/s Prędkość: %1 Velocidad: %1 m/s - Weather Information Weather Information Informacje o pogodzie Información Meteorológica - Humidity: %1% Humidity: %1% Wilgotność: %1 Humedad: %1% diff --git a/extensions/fcs/ace_fcs.cpp b/extensions/fcs/ace_fcs.cpp index bf3b8e1290..6338dd8571 100644 --- a/extensions/fcs/ace_fcs.cpp +++ b/extensions/fcs/ace_fcs.cpp @@ -58,12 +58,13 @@ double traceBullet(double initSpeed, double airFriction, double angle, double an while (i < MAXITERATIONS) { lastPosX = posX; lastPosY = posY; - simulationStep = 0.1 - 0.049 * (posX / posTargetX); velMag = sqrt(pow(velX, 2) + pow(velY, 2)); + posX += velX * simulationStep * 0.5; + posY += velY * simulationStep * 0.5; velX += simulationStep * (velX * velMag * airFriction); - velY += simulationStep * (velY * velMag * airFriction - 9.81); - posX += velX * simulationStep; - posY += velY * simulationStep; + velY += simulationStep * (velY * velMag * airFriction - 9.80665); + posX += velX * simulationStep * 0.5; + posY += velY * simulationStep * 0.5; if (posX >= posTargetX) { break; } i++; }