mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into limping
This commit is contained in:
commit
641f3f8a70
@ -9,9 +9,3 @@ class Extended_PreInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Extended_PostInit_EventHandlers {
|
|
||||||
class ADDON {
|
|
||||||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
|
||||||
|
|
||||||
private _cfgAction = configFile >> "CfgActions" >> "Eject";
|
|
||||||
GVAR(ejectActionParams) = [
|
|
||||||
[
|
|
||||||
"", // will be set with setUserActionText
|
|
||||||
{
|
|
||||||
params ["_vehicle", "_unit"];
|
|
||||||
private _preserveEngineOn = (_unit == driver _vehicle) && {isEngineOn _vehicle};
|
|
||||||
moveOut _unit;
|
|
||||||
if (_preserveEngineOn) then {
|
|
||||||
// vehicle is local to last driver, no need to care
|
|
||||||
_vehicle engineOn true;
|
|
||||||
};
|
|
||||||
},
|
|
||||||
nil,
|
|
||||||
getNumber (_cfgAction >> "priority"),
|
|
||||||
false,
|
|
||||||
true,
|
|
||||||
getText (_cfgAction >> "shortcut"),
|
|
||||||
'[_this, _target] call DFUNC(canShowEject)'
|
|
||||||
],
|
|
||||||
getText (_cfgAction >> "text"),
|
|
||||||
getText (_cfgAction >> "textDefault")
|
|
||||||
];
|
|
||||||
|
|
||||||
["Helicopter", "initPost", LINKFUNC(initEjectAction)] call CBA_fnc_addClassEventHandler;
|
|
@ -6,4 +6,41 @@ PREP_RECOMPILE_START;
|
|||||||
#include "XEH_PREP.hpp"
|
#include "XEH_PREP.hpp"
|
||||||
PREP_RECOMPILE_END;
|
PREP_RECOMPILE_END;
|
||||||
|
|
||||||
|
if (hasInterface) then {
|
||||||
|
["CBA_settingsInitialized", {
|
||||||
|
private _ejectAction = configFile >> "CfgActions" >> "Eject";
|
||||||
|
private _hideEjectAction = missionNamespace getVariable [QEGVAR(vehicles,hideEjectAction), false];
|
||||||
|
|
||||||
|
private _text = getText (_ejectAction >> "text");
|
||||||
|
if (_hideEjectAction) then {
|
||||||
|
_text = format ["<t color='#808080'>%1</t>", _text];
|
||||||
|
};
|
||||||
|
|
||||||
|
GVAR(ejectActionParams) = [
|
||||||
|
[
|
||||||
|
"", // will be set with setUserActionText
|
||||||
|
{
|
||||||
|
params ["_vehicle", "_unit"];
|
||||||
|
private _preserveEngineOn = (_unit == driver _vehicle) && {isEngineOn _vehicle};
|
||||||
|
moveOut _unit;
|
||||||
|
if (_preserveEngineOn) then {
|
||||||
|
// vehicle is local to last driver, no need to care
|
||||||
|
_vehicle engineOn true;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
[getNumber (_ejectAction >> "priority"), -999] select _hideEjectAction,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
getText (_ejectAction >> "shortcut"),
|
||||||
|
'[_this, _target] call DFUNC(canShowEject)'
|
||||||
|
],
|
||||||
|
_text,
|
||||||
|
getText (_ejectAction >> "textDefault")
|
||||||
|
];
|
||||||
|
|
||||||
|
["Helicopter", "InitPost", LINKFUNC(initEjectAction), nil, nil, true] call CBA_fnc_addClassEventHandler;
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
};
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -42,6 +42,7 @@ private _fnc_selectItem = {
|
|||||||
|
|
||||||
case 19: {
|
case 19: {
|
||||||
if (_item == "") then {
|
if (_item == "") then {
|
||||||
|
if (cba_disposable_replaceDisposableLauncher && !isNil {cba_disposable_LoadedLaunchers getVariable secondaryWeapon GVAR(center)}) exitWith { TRACE_1("ignoring unload of disposable",secondaryWeapon GVAR(center)); };
|
||||||
GVAR(center) removeSecondaryWeaponItem ((GVAR(currentItems) select 19) select _itemIndex);
|
GVAR(center) removeSecondaryWeaponItem ((GVAR(currentItems) select 19) select _itemIndex);
|
||||||
private _secondaryMags = secondaryWeaponMagazine GVAR(center);
|
private _secondaryMags = secondaryWeaponMagazine GVAR(center);
|
||||||
GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + ([_secondaryMags + [""], _secondaryMags] select (count _secondaryMags > 1))];
|
GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + ([_secondaryMags + [""], _secondaryMags] select (count _secondaryMags > 1))];
|
||||||
|
@ -28,8 +28,6 @@ class CfgWeapons {
|
|||||||
|
|
||||||
// MX
|
// MX
|
||||||
class arifle_MX_Base_F: Rifle_Base_F {
|
class arifle_MX_Base_F: Rifle_Base_F {
|
||||||
magazineWell[] = {"CBA_65x39_MX", "CBA_65x39_MX_XL"};
|
|
||||||
|
|
||||||
class Single: Mode_SemiAuto {
|
class Single: Mode_SemiAuto {
|
||||||
dispersion = MOA_TO_RAD(0.90);
|
dispersion = MOA_TO_RAD(0.90);
|
||||||
};
|
};
|
||||||
|
@ -87,7 +87,7 @@ if (_amountOfMagazines > 0) exitWith {
|
|||||||
playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1300];
|
playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1300];
|
||||||
|
|
||||||
if (random 1 < 0.15) then {
|
if (random 1 < 0.15) then {
|
||||||
[_vehicle, _ammo, _speed, random 1 < 0.15] call _spawnProjectile;
|
[_vehicle, _ammo, _speed, true] call _spawnProjectile;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (toLower _simType == "shotgrenade") then {
|
if (toLower _simType == "shotgrenade") then {
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#include "XEH_PREP.hpp"
|
#include "XEH_PREP.hpp"
|
||||||
|
|
||||||
|
// Show warning for launchers still using disposables
|
||||||
|
{
|
||||||
|
private _nonInheritedCfg = configProperties [_x, "configName _x == 'ACE_UsedTube'", false];
|
||||||
|
if ((count _nonInheritedCfg) == 1) then {
|
||||||
|
private _weapon = configName _x;
|
||||||
|
if (_weapon != "launch_NLAW_F") then { // ignore the one we modifiy ourselves
|
||||||
|
WARNING_1("[%1] ACE_disposables functionality will be removed in a future version - switch to CBA Disposables",_weapon);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach ("isText (_x >> 'ACE_UsedTube')" configClasses (configFile >> "CfgWeapons"));
|
||||||
|
@ -6,7 +6,7 @@ class CfgWeapons {
|
|||||||
EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code)
|
EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code)
|
||||||
EGVAR(laser,showHud) = 1; // show attack profile / lock on hud
|
EGVAR(laser,showHud) = 1; // show attack profile / lock on hud
|
||||||
magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"};
|
magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"};
|
||||||
magazineWell[] = {QGVAR(K)};
|
magazineWell[] += {QGVAR(K)};
|
||||||
autoFire = 0;
|
autoFire = 0;
|
||||||
canLock = 0;
|
canLock = 0;
|
||||||
weaponLockSystem = 0;
|
weaponLockSystem = 0;
|
||||||
@ -27,6 +27,6 @@ class CfgWeapons {
|
|||||||
class GVAR(launcher_N): GVAR(launcher) {
|
class GVAR(launcher_N): GVAR(launcher) {
|
||||||
displayName = "AGM-114N Hellfire II";
|
displayName = "AGM-114N Hellfire II";
|
||||||
magazines[] = {"6Rnd_ACE_Hellfire_AGM114N", "PylonMissile_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_3Rnd_ACE_Hellfire_AGM114N", "PylonRack_4Rnd_ACE_Hellfire_AGM114N"};
|
magazines[] = {"6Rnd_ACE_Hellfire_AGM114N", "PylonMissile_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_3Rnd_ACE_Hellfire_AGM114N", "PylonRack_4Rnd_ACE_Hellfire_AGM114N"};
|
||||||
magazineWell[] = {QGVAR(N)};
|
magazineWell[] += {QGVAR(N)};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -56,7 +56,19 @@
|
|||||||
"dd_pletivo.p3d",\
|
"dd_pletivo.p3d",\
|
||||||
"plot_green_draty.p3d",\
|
"plot_green_draty.p3d",\
|
||||||
"plot_rust_draty.p3d",\
|
"plot_rust_draty.p3d",\
|
||||||
"wall_fen1_5_2.p3d"\
|
"wall_fen1_5_2.p3d",\
|
||||||
|
"gm_fence_border_gssz_70_600.p3d",\
|
||||||
|
"gm_fence_border_gssz_70_gate_350_r.p3d",\
|
||||||
|
"gm_fence_border_gssz_70_gate_350_w.p3d",\
|
||||||
|
"gm_fence_border_gz1_600.p3d",\
|
||||||
|
"gm_fence_border_gz1_gate_350_r.p3d",\
|
||||||
|
"gm_fence_border_gz1_gate_350_w.p3d",\
|
||||||
|
"gm_fence_wirefence_01_01.p3d",\
|
||||||
|
"gm_fence_wirefence_01_02.p3d",\
|
||||||
|
"gm_fence_wirefence_01_03.p3d",\
|
||||||
|
"gm_gc_g501_sm70_01.p3d",\
|
||||||
|
"gm_gc_g501_sm70_02.p3d",\
|
||||||
|
"gm_gc_g501_sm70_03.p3d"\
|
||||||
]
|
]
|
||||||
|
|
||||||
#define SOUND_CLIP_TIME_SPACING 1.5
|
#define SOUND_CLIP_TIME_SPACING 1.5
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// MINIMAL required version for the Mod. Components can specify others..
|
// MINIMAL required version for the Mod. Components can specify others..
|
||||||
#define REQUIRED_VERSION 1.88
|
#define REQUIRED_VERSION 1.88
|
||||||
#define REQUIRED_CBA_VERSION {3,9,0}
|
#define REQUIRED_CBA_VERSION {3,11,1}
|
||||||
|
|
||||||
#ifdef COMPONENT_BEAUTIFIED
|
#ifdef COMPONENT_BEAUTIFIED
|
||||||
#define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED)
|
#define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED)
|
||||||
|
7
addons/vehicles/CfgActions.hpp
Normal file
7
addons/vehicles/CfgActions.hpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
class CfgActions {
|
||||||
|
class None;
|
||||||
|
class Eject: None {
|
||||||
|
show = QUOTE(call compile getText (configFile >> 'CfgActions' >> 'Eject' >> 'GVAR(setting)'));
|
||||||
|
GVAR(setting) = QUOTE(profileNamespace getVariable [ARR_2('GVAR(showEjectAction)',0)]);
|
||||||
|
};
|
||||||
|
};
|
@ -21,3 +21,4 @@ class CfgPatches {
|
|||||||
#include "CfgAmmo.hpp"
|
#include "CfgAmmo.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
|
#include "CfgActions.hpp"
|
||||||
|
@ -1,9 +1,21 @@
|
|||||||
|
|
||||||
[
|
[
|
||||||
QGVAR(keepEngineRunning),
|
QGVAR(keepEngineRunning),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
[LSTRING(SettingKeepEngineRunningName), LSTRING(SettingKeepEngineRunningDesc)],
|
[LSTRING(SettingKeepEngineRunningName), LSTRING(SettingKeepEngineRunningDesc)],
|
||||||
localize ELSTRING(common,ACEKeybindCategoryVehicles),
|
ELSTRING(common,ACEKeybindCategoryVehicles),
|
||||||
false, // default value
|
false, // default value
|
||||||
true // isGlobal
|
true // isGlobal
|
||||||
] call CBA_settings_fnc_init;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(hideEjectAction),
|
||||||
|
"CHECKBOX",
|
||||||
|
[LSTRING(HideEjectAction), LSTRING(HideEjectActionTooltip)],
|
||||||
|
ELSTRING(common,ACEKeybindCategoryVehicles),
|
||||||
|
true,
|
||||||
|
2, {
|
||||||
|
profileNamespace setVariable [QGVAR(showEjectAction), parseNumber !_this];
|
||||||
|
saveProfileNamespace;
|
||||||
|
},
|
||||||
|
true // needs restart
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
@ -75,5 +75,15 @@
|
|||||||
<English>Prevent the automatic shut-off of the engine when exiting vehicles.</English>
|
<English>Prevent the automatic shut-off of the engine when exiting vehicles.</English>
|
||||||
<German>Verhindere das automatische Abschalten des Motors beim Verlassen des Fahrzeugs.</German>
|
<German>Verhindere das automatische Abschalten des Motors beim Verlassen des Fahrzeugs.</German>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Vehicles_HideEjectAction">
|
||||||
|
<English>Hide Eject Action</English>
|
||||||
|
<German>Abspringen-Aktion verstecken</German>
|
||||||
|
<Polish>Ukryj akcję Wyskocz</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Vehicles_HideEjectActionTooltip">
|
||||||
|
<English>Hides the Eject entry from the action menu. Requires a game restart.</English>
|
||||||
|
<German>Versteckt den Abspringen-Eintrag aus dem Aktionsmenü. Benötigt Neustart des Spiels.</German>
|
||||||
|
<Polish>Usuwa akcję Wyskocz z menu akcji. Wymaga restartu gry.</Polish>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
|||||||
units[] = {};
|
units[] = {};
|
||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_weather"};
|
requiredAddons[] = {"ace_common"};
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
authors[] = {ECSTRING(common,ACETeam), "Glowbal", "Ruthberg"};
|
authors[] = {ECSTRING(common,ACETeam), "Glowbal", "Ruthberg"};
|
||||||
url = ECSTRING(main,URL);
|
url = ECSTRING(main,URL);
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if include.component == "medical" %}
|
{% if include.component == "medical" %}
|
||||||
`ace_common`
|
`ace_medical_engine`
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if include.component == "medical_ai" %}
|
{% if include.component == "medical_ai" %}
|
||||||
@ -467,7 +467,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if include.component == "winddeflection" %}
|
{% if include.component == "winddeflection" %}
|
||||||
`ace_weather`
|
`ace_common`
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if include.component == "yardage450" %}
|
{% if include.component == "yardage450" %}
|
||||||
|
Loading…
Reference in New Issue
Block a user