CSW/Dragon cleanup and rearm compat (#7068)

* Dragon work

cleanup
remove unused p3ds
add pos_gunner_dir/pos_gunner to static
add [csw] prefix to arsenal version
add sight interaction icons

* Update fnc_staticWeaponInit_unloadExtraMags.sqf

* ace_rearm compat

allows pulling carry mags out of rearm trucks

* Update fnc_ai_handleFired.sqf

* Re-add 3den attributes

* cleanup and move A2 staticweapon strings to ace_csw
This commit is contained in:
PabstMirror 2019-07-05 17:57:22 -05:00 committed by GitHub
parent 7b13a75305
commit 8763184b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 398 additions and 392 deletions

View File

@ -1330,37 +1330,5 @@
<Chinesesimp>玩家与AI</Chinesesimp>
<Chinese>玩家與AI</Chinese>
</Key>
<Key ID="STR_ACE_Common_playerOnly">
<English>Players only</English>
<Russian>Игроков</Russian>
<Polish>Tylko dla graczy</Polish>
<Spanish>Solo jugadores</Spanish>
<German>Nur Spieler</German>
<Czech>Pouze hráči</Czech>
<Portuguese>Somente jogadores</Portuguese>
<French>Joueur uniquement</French>
<Hungarian>Csak játékosok</Hungarian>
<Italian>Solo giocatori</Italian>
<Japanese>プレイヤーのみ</Japanese>
<Korean>플레이어만</Korean>
<Chinesesimp>只限玩家</Chinesesimp>
<Chinese>只限玩家</Chinese>
</Key>
<Key ID="STR_ACE_Common_playersAndAI">
<English>Players and AI</English>
<Russian>Игроков и ботов</Russian>
<Polish>Gracze oraz AI</Polish>
<Spanish>Jugadores e IA</Spanish>
<German>Spieler und KI</German>
<Czech>Hráči a AI</Czech>
<Portuguese>Jogadores e IA</Portuguese>
<French>Joueurs et IA</French>
<Hungarian>Játékosok és AI</Hungarian>
<Italian>Giocatori ed IA</Italian>
<Japanese>プレイヤーと AI</Japanese>
<Korean>플레이어 및 인공지능</Korean>
<Chinesesimp>玩家与AI</Chinesesimp>
<Chinese>玩家與AI</Chinese>
</Key>
</Package>
</Project>

38
addons/csw/Cfg3den.hpp Normal file
View File

@ -0,0 +1,38 @@
class ctrlCombo;
class Cfg3DEN {
class Attributes {
class Title;
class Combo: Title {
class Controls {
class Title;
class Value;
};
};
class GVAR(assemblyModeControl): Combo {
class Controls: Controls {
class Title: Title {};
class Value: Value {
class Items {
class Disable {
text = "$STR_DISABLED";
value = 0;
};
class Enable {
text = "$STR_CONFIG_JOYSTICK_ENABLED";
value = 1;
};
class EnableAndEmpty {
text = CSTRING(eden_enableAndEmpty);
value = 2;
};
class Default {
text = "$STR_VEHICLE_DEFAULT";
value = 3;
default = 1;
};
};
};
};
};
};
};

View File

@ -1,17 +1,3 @@
#define ENABLE_CSW_ATTRIBUTE class Attributes { \
class GVAR(enableCSW) { \
property = QGVAR(enableCSW); \
control = "Checkbox"; \
displayName = CSTRING(eden_enableCSW); \
tooltip = CSTRING(eden_enableCSW_tooltip); \
expression = QUOTE(_this setVariable[ARR_3(QQGVAR(enableCSW), _value, true)];); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = true; \
}; \
}
class CfgVehicles {
class Man;
class CAManBase: Man {
@ -37,14 +23,14 @@ class CfgVehicles {
accuracy = 1000;
destrType = "DestructDefault";
ace_dragging_canDrag = 1;
ace_dragging_dragPosition[] = {0, 2, 0};
ace_dragging_canCarry = 1;
ace_dragging_carryPosition[] = {0, 2, 0};
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition)[] = {0, 2, 0};
EGVAR(dragging,canCarry) = 1;
EGVAR(dragging,carryPosition)[] = {0, 2, 0};
class ACE_Actions {
class ACE_MainActions {
displayName = CSTRING(Tripod_displayName);
displayName = CSTRING(genericTripod_displayName);
selection = "";
distance = 2.5;
condition = "true";
@ -90,7 +76,7 @@ class CfgVehicles {
disassembleTo = QGVAR(kordCarryTripod);
};
};
class GVAR(sag30Tripod): GVAR(m3Tripod) {
class GVAR(sag30Tripod): GVAR(baseTripod) {
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ace_csw_tripod_ags30.p3d);
@ -112,12 +98,12 @@ class CfgVehicles {
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ace_csw_tripod_spg9.p3d);
displayName = CSTRING(spg9Tripod_displayName);
displayName = CSTRING(spg9_Tripod);
class ADDON {
disassembleTo = QGVAR(spg9CarryTripod);
};
};
class GVAR(mortarBaseplate): GVAR(m3Tripod) {
class GVAR(mortarBaseplate): GVAR(baseTripod) {
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_mortarBaseplate.p3d);
@ -145,6 +131,7 @@ class CfgVehicles {
class StaticMGWeapon: StaticWeapon {};
class HMG_01_base_F: StaticMGWeapon {
// ENABLE_CSW_ATTRIBUTE;
class ADDON {
enabled = 1;
proxyWeapon = QGVAR(HMG_Static);
@ -179,6 +166,7 @@ class CfgVehicles {
class GMG_TriPod;
class GMG_01_base_F: GMG_TriPod {
// ENABLE_CSW_ATTRIBUTE;
class ADDON {
enabled = 1;
proxyWeapon = QGVAR(GMG_20mm); // Weapon Proxy (Shorter Reload Time) [CfgWeapons]
@ -212,6 +200,7 @@ class CfgVehicles {
class AT_01_base_F: StaticMGWeapon {
// ENABLE_CSW_ATTRIBUTE;
class ADDON {
enabled = 1;
proxyWeapon = QGVAR(Titan_AT_Static);
@ -225,6 +214,7 @@ class CfgVehicles {
};
class AA_01_base_F: StaticMGWeapon {
// ENABLE_CSW_ATTRIBUTE;
class ADDON {
enabled = 1;
proxyWeapon = QGVAR(Titan_AA_Static); // Weapon Proxy (Shorter Reload Time) [CfgWeapons]
@ -240,6 +230,7 @@ class CfgVehicles {
class StaticMortar: StaticWeapon {};
class Mortar_01_base_F: StaticMortar {
// ENABLE_CSW_ATTRIBUTE;
class ADDON {
enabled = 1;
magazineLocation = "";

View File

@ -83,7 +83,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 260;
};
displayName = CSTRING(spg9TripodFolded_displayName);
displayName = CSTRING(spg9_TripodFolded);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -119,7 +119,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 290; // M3A1 baseblate weight
};
displayName = CSTRING(m224MortarBaseplate_displayName);
displayName = CSTRING(mortarBaseplateBag_displayName);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -225,7 +225,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 620; // M252 Mortar Weight
};
displayName = CSTRING(m224MortarBag_displayName);
displayName = CSTRING(mk6MortarBag_displayName);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -234,16 +234,8 @@ class CfgWeapons {
};
// Proxy Weapons
class HMG_static;
class GVAR(HMG_Static): HMG_Static {
magazineReloadTime = 0.5;
};
class GMG_20mm;
class GVAR(GMG_20mm): GMG_20mm {
magazineReloadTime = 0.5;
};
CREATE_CSW_PROXY(HMG_Static);
CREATE_CSW_PROXY(GMG_20mm);
class missiles_titan_static;
class EGVAR(javelin,Titan_Static): missiles_titan_static {}; // if ace_javelin does not exist, this will just inherit from the base weapon

View File

@ -1,5 +1,7 @@
TRACE_1("",QUOTE(ADDON));
PREP(aceRearmGetCarryMagazines);
PREP(ai_handleFired);
PREP(assemble_canDeployTripod);

View File

@ -1,4 +1,5 @@
#include "script_component.hpp"
#include "script_config_macros_csw.hpp"
class CfgPatches {
class ADDON {
@ -14,6 +15,7 @@ class CfgPatches {
};
};
#include "Cfg3den.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

View File

@ -1,53 +0,0 @@
Settings:
defaultBehaviour:
Normal - Untouched [full mags, normal backpack disassemble]
Advanced - [Realistic mags, side unloading]
handleExtraMagazines
Extra magazines on ground
Ignore extra magazines
Vehicle:
3den attribute controls if [useSetting, normal or advanced]
configs:
CfgWeapons:
class GVAR(m3CarryTripod): Launcher_Base_F {
class ADDON {
type = "mount";
deployTime = 3;
pickupTime = 3;
deploy = QGVAR(m3Tripod);
};
class GVAR(staticATCarry): Launcher_Base_F {
class ADDON {
type = "weapon";
deployTime = 8;
pickupTime = 15;
class assembleTo {
tripodCfgVehicle = staticCfgVehicle;
};
};
CfgVehicles:
class GVAR(m3Tripod): // Tripod Example
class ADDON {
disassembleTo = QGVAR(m3CarryTripod);
class Mortar_01_base_F: // Static Weapon Example
class ADDON {
enabled = 1;
magazineLocation = "";
disassembleWeapon = ""; // secondary weapon classname
disassembleTurret = ""; // CfgVehicle
desiredAmmo = 100; //
ammoLoadTime = 5;
ammoUnloadTime = 5;

View File

@ -0,0 +1,50 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
* Helper function for ace_rearm; Gets magazines that should be loaded by csw
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Specific Turret or pass bool to check all turrets <ARRAY><BOOL>(default: true)
*
* Return Value:
* [0: compatible veh mags, 1: carry mags] <ARRAY>
*
* Example:
* [cursorObject, [0]] call ace_csw_fnc_aceRearmGetCarryMagazines
*
* Public: No
*/
params ["_vehicle", ["_targetTurret", true, [[], true]]];
if (!(_vehicle isKindOf "StaticWeapon")) exitWith { [[],[]] }; // limit to statics for now
// Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default]
if ((GVAR(ammoHandling) == 0) && {!([false, true, true, GVAR(defaultAssemblyMode)] select (_vehicle getVariable [QGVAR(assemblyMode), 3]))}) exitWith { [[],[]] };
private _turretMagsCSW = [];
private _allCarryMags = [];
{
private _turretPath = _x;
if ((_targetTurret isEqualTo true) || {_turretPath isEqualTo _targetTurret}) then {
{
private _weapon = _x;
{
private _xMag = _x;
private _carryMag = GVAR(vehicleMagCache) getVariable _xMag;
if (isNil "_carryMag") then {
private _groups = "getNumber (_x >> _xMag) == 1" configClasses (configFile >> QGVAR(groups));
_carryMag = configName (_groups param [0, configNull]);
GVAR(vehicleMagCache) setVariable [_x, _carryMag];
TRACE_2("setting cache",_xMag,_carryMag);
};
if (_carryMag != "") then {
_turretMagsCSW pushBackUnique _xMag;
_allCarryMags pushBackUnique _carryMag;
};
} forEach ([_weapon] call CBA_fnc_compatibleMagazines);
} forEach (_vehicle weaponsTurret _turretPath);
};
} forEach (allTurrets _vehicle);
[_turretMagsCSW, _allCarryMags]

View File

@ -75,7 +75,7 @@ if (_bestAmmoToSend == -1) exitWith {ERROR("No ammo");};
// Remove the mag from the source
if (_reloadSource isKindOf "CaManBase") then {
[_reloadSource, _reloadMag, _bestAmmoToSend] call ace_common_fnc_removeSpecificMagazine;
[_reloadSource, _reloadMag, _bestAmmoToSend] call EFUNC(common,removeSpecificMagazine);
} else {
[_reloadSource, _reloadMag, 1, _bestAmmoToSend] call CBA_fnc_removeMagazineCargo;
};

View File

@ -17,9 +17,10 @@
params ["_staticWeapon"];
private _assemblyMode = [false, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 2]);
private _crewed = (crew _staticWeapon) isEqualTo [];
// Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default]
private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 3]);
private _notCrewed = (crew _staticWeapon) isEqualTo [];
private _deadCrew = !(alive (gunner _staticWeapon)); // need to eject body???
_assemblyMode && {(!_crewed) || _deadCrew}
_assemblyMode && {_notCrewed || _deadCrew}

View File

@ -33,8 +33,7 @@
// Create a tripod
private _cswTripod = createVehicle [_tripodClassname, [0, 0, 0], [], 0, "NONE"];
// Because the tripod can be a "full weapon" we disable any data that will allow it to be loaded
_cswTripod setVariable [QGVAR(assemblyMode), 1, true]; // Explicitly set advanced assembly mode and broadcast
_cswTripod setVariable [QGVAR(emptyWeapon), true, false]; // unload gun, shouldn't need broadcast for this as it will be local to us
_cswTripod setVariable [QGVAR(assemblyMode), 2, true]; // Explicitly set enabled&unload assembly mode and broadcast
if (!GVAR(defaultAssemblyMode)) then {
TRACE_1("global disableVanillaAssembly event",_cswTripod); // handles it being assembled when setting is disabled
[QGVAR(disableVanillaAssembly), [_cswTripod]] call CBA_fnc_globalEvent;

View File

@ -43,15 +43,18 @@
[{
params ["_assembledClassname", "_tripodDir", "_tripodPos"];
private _csw = createVehicle [_assembledClassname, [0, 0, 0], [], 0, "NONE"];
_csw setVariable [QGVAR(assemblyMode), 1, true]; // Explicitly set advanced assembly mode and broadcast
_csw setVariable [QGVAR(emptyWeapon), true, false]; // unload gun, shouldn't need broadcast for this as it will be local to us
// Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default]
_csw setVariable [QGVAR(assemblyMode), 2, true]; // Explicitly set advanced assembly mode + unload, and broadcast
if (!GVAR(defaultAssemblyMode)) then {
TRACE_1("global disableVanillaAssembly event",_csw); // handles it being assembled when setting is disabled
[QGVAR(disableVanillaAssembly), [_csw]] call CBA_fnc_globalEvent;
};
_csw setDir _tripodDir;
_csw setPosATL _tripodPos;
_csw setVectorUp (surfaceNormal _tripodPos);
if ((_tripodPos select 2) < 0.5) then {
_csw setVectorUp (surfaceNormal _tripodPos);
};
TRACE_2("csw placed",_csw,_assembledClassname);
}, [_assembledClassname, _tripodDir, _tripodPos]] call CBA_fnc_execNextFrame;
};

View File

@ -7,30 +7,33 @@
* 0: Weapon <OBJECT>
* 1: Turret <ARRAY>
* 2: Proxy weapon needed <BOOL>
* 2: Weapon should be emptied <BOOL>
*
* Return Value:
* None
*
* Example:
* [weapon, [0], true] call ace_csw_fnc_proxyWeapon
* [weapon, [0], true, false] call ace_csw_fnc_proxyWeapon
*
* Public: No
*/
params ["_staticWeapon", "_turret", "_needed"];
params ["_staticWeapon", "_turret", "_needed", "_emptyWeapon"];
TRACE_4("proxyWeapon",_staticWeapon,_turret,_needed,_emptyWeapon);
if (_staticWeapon getVariable [format [QGVAR(proxyHandled_%1), _turret], false]) exitWith { TRACE_1("proxy weapon already handled",_staticWeapon); };
if (_staticWeapon getVariable [format [QGVAR(proxyHandled_%1), _turret], false]) exitWith { TRACE_1("already handled",typeOf _staticWeapon); };
private _typeOf = typeOf _staticWeapon;
private _proxyWeapon = getText(configFile >> "CfgVehicles" >> _typeOf >> "ace_csw" >> "proxyWeapon");
TRACE_5("proxyWeapon",_staticWeapon,_turret,_needed,_typeOf,_proxyWeapon);
if (_proxyWeapon == "") exitWith { TRACE_1("proxyWeapon not defined",_proxyWeapon); };
TRACE_2("",_typeOf,_proxyWeapon);
if (_proxyWeapon == "") exitWith {};
private _currentWeapon = (_staticWeapon weaponsTurret [0]) param [0, "#none"];
if ((missionNamespace getVariable [_proxyWeapon, objNull]) isEqualType {}) then { // check if string is a function
TRACE_1("Calling proxyWeapon function",_proxyWeapon);
_proxyWeapon = [_staticWeapon, _turret, _currentWeapon, _needed] call (missionNamespace getVariable _proxyWeapon);
// This function may replace magazines or do other things to the static weapon
_proxyWeapon = [_staticWeapon, _turret, _currentWeapon, _needed, _emptyWeapon] call (missionNamespace getVariable _proxyWeapon);
_needed = _proxyWeapon != "";
};
if (!_needed) exitWith { TRACE_2("not needed",_needed,_proxyWeapon); };

View File

@ -43,7 +43,7 @@ private _return = [];
if (((getNumber (_carryGroup >> _x)) == 1) && {_loadInfo = [_vehicle, _turretPath, _carryMag, _player] call FUNC(reload_canLoadMagazine); _loadInfo select 0}) exitWith {
_return pushBack [_carryMag, _turretPath, _loadInfo];
};
} forEach (getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"));
} forEach ([_weapon] call CBA_fnc_compatibleMagazines);
} forEach _carriedMagazines;
} forEach (_vehicle weaponsTurret _turretPath);
} forEach (allTurrets _vehicle);

View File

@ -52,7 +52,7 @@ if (_canAdd) then {
TRACE_1("Removing emtpy mag",_loadedMag);
_vehicle removeMagazinesTurret [_loadedMag, _turret];
};
[_vehicle, _turret, true] call FUNC(proxyWeapon); // Check if we need to add proxy weapon now
[_vehicle, _turret, true, false] call FUNC(proxyWeapon); // Check if we need to add proxy weapon now
private _newMag = [_vehicle, _turret, _carryMag] call FUNC(reload_getVehicleMagazine);
TRACE_2("Adding new mag",_newMag,_ammoUsed);
_vehicle addMagazineTurret [_newMag, _turret, _ammoUsed];

View File

@ -31,10 +31,13 @@ if (_configEnabled && {_staticWeapon turretLocal [0]}) then { // if turret is lo
[{
params ["_staticWeapon"];
if (!alive _staticWeapon) exitWith { TRACE_1("dead/deleted",_staticWeapon); };
private _assemblyMode = [false, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 2]);
// Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default]
private _assemblyModeIndex = _staticWeapon getVariable [QGVAR(assemblyMode), 3];
private _emptyWeapon = _assemblyModeIndex isEqualTo 2;
private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select _assemblyModeIndex;
TRACE_2("turretLocal",_staticWeapon,_assemblyMode);
[_staticWeapon, [0], _assemblyMode] call FUNC(proxyWeapon);
[_staticWeapon, _assemblyMode] call FUNC(staticWeaponInit_unloadExtraMags);
[_staticWeapon, [0], _assemblyMode, _emptyWeapon] call FUNC(proxyWeapon);
[_staticWeapon, _assemblyMode, _emptyWeapon] call FUNC(staticWeaponInit_unloadExtraMags);
}, [_staticWeapon]] call CBA_fnc_execNextFrame; // need to wait a frame to allow setting object vars during assembly
};
@ -42,7 +45,7 @@ if (_assemblyConfig) then {
[{
params ["_staticWeapon"];
if (!alive _staticWeapon) exitWith { TRACE_1("dead/deleted",_staticWeapon); };
private _assemblyMode = [false, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 2]);
private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 3]);
TRACE_2("assemblyConfig present",_staticWeapon,_assemblyMode);
if (_assemblyMode) then { // Disable vanilla assembly if assemblyMode eanbled
[QGVAR(disableVanillaAssembly), [_staticWeapon]] call CBA_fnc_localEvent;
@ -65,7 +68,7 @@ if (hasInterface && {!(_typeOf in GVAR(initializedStaticTypes))}) then {
private _magazineLocation = getText (configFile >> "CfgVehicles" >> _typeOf >> QUOTE(ADDON) >> "magazineLocation");
private _condition = { //IGNORE_PRIVATE_WARNING ["_target", "_player"];
// If magazine handling is enabled or weapon assembly/disassembly is enabled we enable ammo handling
if ((GVAR(ammoHandling) == 0) && {!([false, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 2]))}) exitWith { false };
if ((GVAR(ammoHandling) == 0) && {!([false, true, true, GVAR(defaultAssemblyMode)] select (_target getVariable [QGVAR(assemblyMode), 3]))}) exitWith { false };
[_player, _target, ["isNotSwimming", "isNotSitting"]] call EFUNC(common,canInteractWith)
};
private _childenCode = {

View File

@ -5,24 +5,19 @@
*
* Arguments:
* 0: Weapon <OBJECT>
* 1: Using advanced assembly <BOOL>
*
* Return Value:
* None
*
* Example:
* [weapon] call ace_csw_fnc_staticWeaponInit_unloadExtraMags
* [cursorObject, false] call ace_csw_fnc_staticWeaponInit_unloadExtraMags
*
* Public: No
*/
params ["_staticWeapon"];
TRACE_1("staticWeaponInit_unloadExtraMags",_staticWeapon);
if (!alive _staticWeapon) exitWith {TRACE_1("dead/deleted",alive _staticWeapon);};
private _assemblyMode = [false, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 2]);
private _emptyWeapon = _staticWeapon getVariable [QGVAR(emptyWeapon), false];
TRACE_2("",_assemblyMode,_emptyWeapon);
params ["_staticWeapon", "_assemblyMode", "_emptyWeapon"];
TRACE_3("staticWeaponInit_unloadExtraMags",_staticWeapon,_assemblyMode,_emptyWeapon);
if (!_assemblyMode) exitWith {};
private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "desiredAmmo");
@ -31,7 +26,7 @@ if (_emptyWeapon) then {
_desiredAmmo = 0;
_storeExtraMagazines = false;
};
TRACE_2("settings",_desiredAmmo,_storeExtraMagazines);
TRACE_3("settings",_emptyWeapon,_desiredAmmo,_storeExtraMagazines);
private _magsToRemove = [];
private _loadedMagazineInfo = [];

View File

@ -2,10 +2,10 @@
#define COMPONENT_BEAUTIFIED Crew-Served Weapons
#include "\z\ace\addons\main\script_mod.hpp"
#define FAST_PROGRESSBARS
#define DEBUG_MODE_FULL
#define DISABLE_COMPILE_CACHE
#define ENABLE_PERFORMANCE_COUNTERS
// #define FAST_PROGRESSBARS
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_CSW
#define DEBUG_MODE_FULL

View File

@ -0,0 +1,15 @@
#define CREATE_CSW_PROXY(weapon) class ##weapon; class GVAR(weapon): ##weapon { magazineReloadTime = 0.5; }
// Need to be careful about breaking Attributes inheritance, doesn't seem to be any standard
#define ENABLE_CSW_ATTRIBUTE class Attributes { \
class EGVAR(CSW,assemblyMode) { \
property = QEGVAR(CSW,assemblyMode); \
control = QEGVAR(CSW,assemblyModeControl); \
displayName = ECSTRING(CSW,eden_enableCSW); \
tooltip = ECSTRING(CSW,eden_enableCSW_tooltip); \
expression = QUOTE( if (_value != 3) then {_this setVariable [ARR_3('%s',_value,true)]} ); \
typeName = "NUMBER"; \
condition = "objectVehicle"; \
defaultValue = 3; \
}; \
}

View File

@ -72,12 +72,6 @@
<Key ID="STR_ACE_CSW_ammoHandling_description">
<English>Allow loading and unloading magazines</English>
</Key>
<Key ID="STR_ACE_CSW_aiReloading_displayName">
<English>AI Reloading</English>
</Key>
<Key ID="STR_ACE_CSW_aiReloading_description">
<English>AI will attempt to reload static weapons with available ammo</English>
</Key>
<Key ID="STR_ACE_CSW_progressBarTimeCoefficent_displayName">
<English>Interaction Time Coefficent</English>
</Key>
@ -87,9 +81,6 @@
<Key ID="STR_ACE_CSW_Pickup_displayName">
<English>Pickup Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_Move_displayName">
<English>Move Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_MountWeapon_displayName">
<English>Mount Weapon</English>
</Key>
@ -99,12 +90,6 @@
<Key ID="STR_ACE_CSW_AssembleCSW_progressBar">
<English>Assembling Gun...</English>
</Key>
<Key ID="STR_ACE_CSW_LoadingAmmo_progressBar">
<English>Loading Ammo...</English>
</Key>
<Key ID="STR_ACE_CSW_UnloadingAmmo_progressBar">
<English>Unloading Ammo...</English>
</Key>
<Key ID="STR_ACE_CSW_PickupTripod_progressBar">
<English>Picking Up Tripod...</English>
</Key>
@ -117,32 +102,17 @@
<Key ID="STR_ACE_CSW_eden_enableCSW_tooltip">
<English>Enables Crew Served ability on this weapon</English>
</Key>
<Key ID="STR_ACE_CSW_genericDescription">
<English>Used to reload crew served weapons</English>
<Key ID="STR_ACE_CSW_eden_enableAndEmpty">
<English>Enabled and Leave Weapon Empty</English>
</Key>
<Key ID="STR_ACE_CSW_StaticATWeapon_displayName">
<English>[CSW] Mini-Spike Launcher (AT)</English>
</Key>
<Key ID="STR_ACE_CSW_StaticAAWeapon_displayName">
<English>[CSW] Mini-Spike Launcher (AA)</English>
</Key>
<Key ID="STR_ACE_CSW_StaticHMGWeapon_displayName">
<English>[CSW] XM312</English>
</Key>
<Key ID="STR_ACE_CSW_StaticAutoHMGWeapon_displayName">
<English>[CSW] XM312A</English>
</Key>
<Key ID="STR_ACE_CSW_StaticHMGTallWeapon_displayName">
<English>[CSW] XM312 (High)</English>
</Key>
<Key ID="STR_ACE_CSW_StaticGMGWeapon_displayName">
<English>[CSW] XM307</English>
</Key>
<Key ID="STR_ACE_CSW_StaticAutoGMGWeapon_displayName">
<English>[CSW] XM307A</English>
</Key>
<Key ID="STR_ACE_CSW_StaticGMGTallWeapon_displayName">
<English>[CSW] XM307 (High)</English>
<Key ID="STR_ACE_CSW_genericTripod_displayName">
<English>Tripod</English>
<French>Trépied</French>
<Spanish>Trípode</Spanish>
<Italian>Treppiede</Italian>
<Polish>Trójnóg</Polish>
<German>Dreibein</German>
<Turkish>Üçayak</Turkish>
</Key>
<Key ID="STR_ACE_CSW_StaticATBag_displayName">
<English>[CSW] Static Mini-Spike Launcher (AT)</English>
@ -156,30 +126,12 @@
<Key ID="STR_ACE_CSW_StaticAutoHMGBag_displayName">
<English>[CSW] Static XM312 Gun (Autonomous)</English>
</Key>
<Key ID="STR_ACE_CSW_StaticHMGTallBag_displayName">
<English>[CSW] Static XM312 Gun (High)</English>
</Key>
<Key ID="STR_ACE_CSW_StaticGMGBag_displayName">
<English>[CSW] Static XM307 Gun</English>
</Key>
<Key ID="STR_ACE_CSW_StaticAutoGMGBag_displayName">
<English>[CSW] Static XM307 Gun (Autonomous)</English>
</Key>
<Key ID="STR_ACE_CSW_StaticGMGTallBag_displayName">
<English>[CSW] Static XM307 Gun (High)</English>
</Key>
<Key ID="STR_ACE_CSW_HMGStatic_displayName">
<English>[CSW] HMG Static</English>
</Key>
<Key ID="STR_ACE_CSW_GMGStatic_displayName">
<English>[CSW] GMG Static</English>
</Key>
<Key ID="STR_ACE_CSW_ATStatic_displayName">
<English>[CSW] AT Static</English>
</Key>
<Key ID="STR_ACE_CSW_AAStatic_displayName">
<English>[CSW] AA Static</English>
</Key>
<Key ID="STR_ACE_CSW_127x108_displayName">
<English>[CSW] 12.7x108mm HMG Belt</English>
</Key>
@ -198,9 +150,6 @@
<Key ID="STR_ACE_CSW_GMGBelt_displayName">
<English>[CSW] 20mm Grenade GMG Belt</English>
</Key>
<Key ID="STR_ACE_CSW_mag_127x108">
<English>[CSW] 12.7 x 108 mm Ammo Belt</English>
</Key>
<Key ID="STR_ACE_CSW_m3Tripod_displayName">
<English>M3 Tripod</English>
</Key>
@ -213,9 +162,6 @@
<Key ID="STR_ACE_CSW_m220TripodFolded_displayName">
<English>[CSW] M220 Deployable Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_spg9TripodFolded_displayName">
<English>[CSW] SPG-9 Deployable Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_sag30TripodFolded_displayName">
<English>[CSW] SAG-30 Deployable Tripod</English>
</Key>
@ -228,20 +174,65 @@
<Key ID="STR_ACE_CSW_m220Tripod_displayName">
<English>M220 Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_spg9Tripod_displayName">
<English>SPG-9 Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_m3TripodFolded_displayName">
<English>[CSW] M3 Deployable Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_m3TripodLowFolded_displayName">
<English>[CSW] M3 Deployable Tripod (Low)</English>
</Key>
<Key ID="STR_ACE_CSW_m224MortarBaseplate_displayName">
<English>[CSW] M224 Mortar Baseplate</English>
<Key ID="STR_ACE_CSW_mortarBaseplateBag_displayName">
<English>[CSW] Mortar Baseplate</English>
</Key>
<Key ID="STR_ACE_CSW_m224MortarBag_displayName">
<Key ID="STR_ACE_CSW_mortarBaseplate_displayName">
<English>Mortar Baseplate</English>
</Key>
<Key ID="STR_ACE_CSW_mk6MortarBag_displayName">
<English>[CSW] Mk6 Mortar Tube</English>
</Key>
<Key ID="STR_ACE_CSW_m252_tube">
<English>[CSW] M252 Tube Bag</English>
</Key>
<Key ID="STR_ACE_CSW_m2_gun">
<English>[CSW] M2 Gun Bag</English>
</Key>
<Key ID="STR_ACE_CSW_mk19_gun">
<English>[CSW] MK19 Gun Bag</English>
</Key>
<Key ID="STR_ACE_CSW_tow_tube">
<English>[CSW] BGM-71 TOW Launcher Bag</English>
</Key>
<Key ID="STR_ACE_CSW_dshk_gun">
<English>[CSW] DSHK Gun Bag</English>
</Key>
<Key ID="STR_ACE_CSW_2b14_tube">
<English>[CSW] 2B14 Tube Bag</English>
</Key>
<Key ID="STR_ACE_CSW_nsv_gun">
<English>[CSW] NSV Gun Bag</English>
</Key>
<Key ID="STR_ACE_CSW_kord_gun">
<English>[CSW] KORD Gun Bag</English>
</Key>
<Key ID="STR_ACE_CSW_ags30_gun">
<English>[CSW] AGS-30 Gun Bag</English>
</Key>
<Key ID="STR_ACE_CSW_metis_tube">
<English>[CSW] 9k115 Metis Launcher Bag</English>
</Key>
<Key ID="STR_ACE_CSW_kornet_launcher">
<English>[CSW] 9m113 Kornet Launcher</English>
</Key>
<Key ID="STR_ACE_CSW_spg9_Tripod">
<English>SPG-9 Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_spg9_TripodFolded">
<English>[CSW] SPG-9 Deployable Tripod</English>
</Key>
<Key ID="STR_ACE_CSW_spg9_tube">
<English>[CSW] SPG-9 Launcher Bag</English>
</Key>
<Key ID="STR_ACE_CSW_spg9m_tube">
<English>[CSW] SPG-9M Launcher Bag</English>
</Key>
</Package>
</Project>

View File

@ -122,11 +122,13 @@ class CfgVehicles {
displayName = CSTRING(attachSight);
condition = QUOTE(call FUNC(sightCanAttach));
statement = QUOTE(call FUNC(sightAttach));
icon = QPATHTOF(data\m47_daysight_interaction_attach.paa);
};
class GVAR(detachSight) {
displayName = CSTRING(detachSight);
condition = QUOTE(call FUNC(sightCanDetach));
statement = QUOTE(call FUNC(sightDetach));
icon = QPATHTOF(data\m47_daysight_interaction_detach.paa);
};
};
};

View File

@ -15,7 +15,7 @@ class CfgWeapons {
model = QPATHTOF(models\ace_m47_magazine.p3d);
picture = QPATHTOF(data\m47_dragon_item_ca.paa);
magazines[] = {};
displayName = CSTRING(dragonName);
displayName = CSTRING(dragonNameCarry); // add [CSW] prefix to make it clearer in arsenal that this is a deployable weapon
descriptionShort = CSTRING(dragonDescription);
scope = 2;

View File

@ -23,6 +23,10 @@
if ((!alive _vehicle) || {!alive ACE_player} || {(vehicle ACE_player) != _vehicle}) exitWith {
TRACE_1("exiting PFEH",GVAR(pfID));
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
if ((alive _vehicle) && {!alive gunner _vehicle}) then {
TRACE_1("reseting rest rotate anim",_vehicle);
_vehicle animate ["rest_rotate", -0.35];
};
};
if (cameraView in ["INTERNAL", "EXTERNAL"]) then {

View File

@ -6,7 +6,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common","ace_missileguidance","ace_hot","ace_csw"};
requiredAddons[] = {"ace_hot","ace_csw"};
author = ECSTRING(common,ACETeam);
authors[] = {"Brandon (TCVM)"};
url = ECSTRING(main,URL);

Binary file not shown.

Binary file not shown.

View File

@ -30,7 +30,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || _wireCut || { !alive _shoote
// wire snap, random direction
if (!_wireCut) then {
_attackProfileStateParams set [1, true];
playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLtoASL (_shooter modelToWorld _wireCutSource), 150, 1, 25];
playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLtoASL (_shooter modelToWorld _wireCutSource), 5, 1, 25];
};
if (_serviceChargeCount > 0 && {(_lastTime - CBA_missionTime) <= 0}) then {

View File

@ -6,6 +6,7 @@
* Arguments:
* 0: Target <OBJECT>
* 1: Unit Performing Action <OBJECT>
* 2: Is event (function recursives globaly to set weapon where turret is local) <BOOL> (default: false)
*
* Return Value:
* Can Attach Sighting Unit <BOOL>
@ -19,7 +20,7 @@
params ["_target", "_unit", ["_event", false]];
TRACE_3("sightAttach",_target,_unit,_event);
if (_event isEqualTo true) then {
if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
if (!(_target turretLocal [0])) exitWith {};
_target setVariable [QGVAR(sightAttached), true, true];
_target animate ["optic_hide", 0];

View File

@ -19,6 +19,5 @@
params ["_target", "_unit"];
(alive _target)
// && {!(_target getVariable [QGVAR(fired), false])}
&& {!(_target getVariable [QGVAR(sightAttached), ((typeOf _target) == QGVAR(staticAssembled))])}
&& {QGVAR(sight) in (weapons _unit)}

View File

@ -19,5 +19,4 @@
params ["_target", "_unit"];
(alive _target)
// && {!(_target getVariable [QGVAR(fired), false])}
&& {_target getVariable [QGVAR(sightAttached), ((typeOf _target) == QGVAR(staticAssembled))]}

View File

@ -6,6 +6,7 @@
* Arguments:
* 0: Target <OBJECT>
* 1: Unit Performing Action <OBJECT>
* 2: Is event (function recursives globaly to set weapon where turret is local) <BOOL> (default: false)
*
* Return Value:
* Can Attach Sighting Unit <BOOL>
@ -21,7 +22,7 @@ params ["_target", "_unit"];
params ["_target", "_unit", ["_event", false]];
TRACE_3("sightDetach",_target,_unit,_event);
if (_event isEqualTo true) then {
if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
if (!(_target turretLocal [0])) exitWith {};
_target setVariable [QGVAR(sightAttached), false, true];
_target animate ["optic_hide", 1];

Binary file not shown.

Binary file not shown.

View File

@ -1,15 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="dragon">
<Key ID="STR_ACE_dragon_dragonNameCarry">
<English>[CSW] M47 Super-Dragon</English>
</Key>
<Key ID="STR_ACE_dragon_dragonName">
<English>M47 Super-Dragon</English>
</Key>
<Key ID="STR_ACE_dragon_dragonNoSight">
<English>M47 Super-Dragon (No Sight)</English>
</Key>
<Key ID="STR_ACE_dragon_dragonSight">
<English>M47 Super-Dragon (With Sight)</English>
</Key>
<Key ID="STR_ACE_dragon_attachSight">
<English>Attach Sight</English>
</Key>

View File

@ -11,7 +11,7 @@
<Russian>XM312</Russian>
<Portuguese>XM312</Portuguese>
<Hungarian>XM312</Hungarian>
<Italian>XM312A</Italian>
<Italian>XM312</Italian>
<Japanese>XM312</Japanese>
<Korean>XM312</Korean>
<Chinese>XM312重機槍</Chinese>

View File

@ -5,25 +5,23 @@
*
* Arguments:
* 0: Ammo Truck <OBJECT>
* 1: Player <OBJECT>
*
* Return Value:
* ChildActions <ARRAY>
*
* Example:
* [tank] call ace_rearm_fnc_addRearmActions
* [tank, player] call ace_rearm_fnc_addRearmActions
*
* Public: No
*/
params ["_truck"];
params ["_truck", "_player"];
private _vehicles = nearestObjects [_truck, ["AllVehicles"], 20];
_vehicles = _vehicles select {(_x != _truck) && {!(_x isKindOf "CAManBase")} && {!(_x getVariable [QGVAR(disabled), false])}};
if (missionNamespace getVariable [QEGVAR(mk6mortar,useAmmoHandling), false]) then {
_vehicles = _vehicles select {!(_x isKindOf "Mortar_01_base_F")};
};
private _cswCarryMagazines = [];
private _vehicleActions = [];
{
private _vehicle = _x;
@ -35,6 +33,14 @@ private _vehicleActions = [];
private _magazineHelper = _needRearmMags arrayIntersect _needRearmMags;
_magazineHelper = _magazineHelper select {[_truck, _x] call FUNC(hasEnoughSupply)};
if (["ace_csw"] call EFUNC(common,isModLoaded)) then {
([_vehicle] call EFUNC(csw,aceRearmGetCarryMagazines)) params ["_turretMagsCSW", "_allCarryMags"];
TRACE_3("csw compat",_vehicle,_turretMagsCSW,_allCarryMags);
_cswCarryMagazines append _allCarryMags;
_magazineHelper = _magazineHelper - _turretMagsCSW;
};
TRACE_2("can add",_x,_magazineHelper);
if (!(_magazineHelper isEqualTo [])) then {
@ -86,4 +92,23 @@ private _vehicleActions = [];
};
} forEach _vehicles;
if (!(_cswCarryMagazines isEqualTo [])) then {
_cswCarryMagazines = _cswCarryMagazines arrayIntersect _cswCarryMagazines;
_cswCarryMagazines = _cswCarryMagazines select {[_truck, _x] call FUNC(hasEnoughSupply)};
private _baseAction = [QGVAR(cswTake), "CSW", "", {}, {true}] call EFUNC(interact_menu,createAction);
private _subActions = _cswCarryMagazines apply {
private _action = [
_x,
_x call FUNC(getMagazineName),
getText(configFile >> "CfgMagazines" >> _x >> "picture"),
{_this call FUNC(takeAmmo)},
{true},
{},
[_x, _player]
] call EFUNC(interact_menu,createAction);
[_action, [], _truck];
};
_vehicleActions pushBack [_baseAction, _subActions, _truck];
};
_vehicleActions

View File

@ -26,6 +26,8 @@ if (isNil "_magName") then {
WARNING_1("Magazine is missing display name [%1]",_className);
};
if ((_displayName select [0,6]) == "[CSW] ") then { _displayName = _displayName select [6]; };
GVAR(magazineNameCache) setVariable [_className, _displayName];
GVAR(originalMagazineNames) pushBack _displayName;
TRACE_2("Adding to cache",_className,_displayName);

View File

@ -77,6 +77,7 @@ private _turrets = [_vehicle] call FUNC(getAllRearmTurrets);
/* If there is space for new magazines or if some magazines are not full, add the magazine
* type to _magazineInfo. */
if ((_currentMagazines < _maxMagazines) || {({_x < _maxRoundsPerMag} count _currentRounds) > 0}) then {
if (_magazineClass == "FakeWeapon") exitWith {};
_magazineInfo pushBack [_magazineClass, _turretPath, false, -1, _maxMagazines, _currentMagazines, _maxRoundsPerMag, _currentRounds];
};

View File

@ -22,6 +22,14 @@ TRACE_3("rearmEntireVehicleSuccessLocal",_truck,_vehicle,_turretPath);
// Fetching all rearmable magazines in this turret
private _magazines = ([_vehicle] call FUNC(getNeedRearmMagazines)) select {(_x select 1) isEqualTo _turretPath};
if (["ace_csw"] call EFUNC(common,isModLoaded)) then {
([_vehicle, _turretPath] call EFUNC(csw,aceRearmGetCarryMagazines)) params ["_turretMagsCSW", "_allCarryMags"];
TRACE_1("skipping",_turretMagsCSW);
_magazines = _magazines select {
_x params ["_magazineClass"];
(_turretMagsCSW findIf {_x == _magazineClass}) == -1
};
};
{
_x params ["_magazineClass", "_magTurretPath", "_isPylonMag", "_pylonIndex", "_maxMagazines", "_currentMagazines", "_maxRoundsPerMag", "_currentRounds"];

View File

@ -8,7 +8,7 @@
* 1: Unit <OBJECT>
* 2: Params <ARRAY>
* 0: Magazine Classname <STRING>
* 1: Vehicle to be armed <OBJECT>
* 1: Vehicle to be armed or player <OBJECT>
*
* Return Value:
* None
@ -27,12 +27,18 @@ TRACE_5("takeAmmo",_truck,_unit,_args,_magazineClass,_vehicle);
REARM_HOLSTER_WEAPON;
private _targetName = if (_vehicle == _unit) then {
"CSW"
} else {
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")
};
[
TIME_PROGRESSBAR(REARM_DURATION_TAKE select _idx),
[_unit, _magazineClass, _truck],
[_unit, _magazineClass, _truck, _vehicle],
FUNC(takeSuccess),
"",
format [localize LSTRING(TakeAction), _magazineClass call FUNC(getMagazineName), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")],
format [localize LSTRING(TakeAction), _magazineClass call FUNC(getMagazineName), _targetName],
{true},
["isnotinside"]
] call EFUNC(common,progressBar);

View File

@ -8,19 +8,20 @@
* 0: Unit <OBJECT>
* 1: Magazine Classname <STRING>
* 2: Ammo Truck <OBJECT>
* 3: Target Vehicle or Player <OBJECT>
*
* Return Value:
* None
*
* Example:
* [[player, "500Rnd_127x99_mag_Tracer_Red"]] call ace_rearm_fnc_takeSuccess
* [[player, "500Rnd_127x99_mag_Tracer_Red", ammoTruck, targetVehicle]] call ace_rearm_fnc_takeSuccess
*
* Public: No
*/
params ["_args"];
_args params ["_unit", "_magazineClass", "_truck"];
TRACE_3("takeSuccess",_unit,_magazineClass,_truck);
_args params ["_unit", "_magazineClass", "_truck", "_vehicle"];
TRACE_4("takeSuccess",_unit,_magazineClass,_truck,_vehicle);
private _success = true;
if (GVAR(supply) > 0) then {
@ -28,6 +29,13 @@ if (GVAR(supply) > 0) then {
};
if !(_success) exitWith {WARNING_2("takeSuccess failed to take [%1] from [%2]",_magazineClass,_truck);};
if (_vehicle == _unit) exitWith {
([_magazineClass] call FUNC(getCaliber)) params ["", "_idx"];
private _rounds = (REARM_COUNT select _idx);
TRACE_4("passing to csw",_unit,_magazineClass,_idx,_rounds);
[_unit, _magazineClass, _rounds] call EFUNC(csw,reload_handleReturnAmmo);
};
[_unit, "forceWalk", "ACE_rearm", true] call EFUNC(common,statusEffect_set);
[_unit, "blockThrow", "ACE_rearm", true] call EFUNC(common,statusEffect_set);
private _dummy = [_unit, _magazineClass] call FUNC(createDummy);

View File

@ -233,6 +233,7 @@ class CfgVehicles {
position = "";
};
};
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_weap_SPG9);
@ -251,6 +252,7 @@ class CfgVehicles {
selection = "tripod";
};
};
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_weap_9K133_launcher);
@ -276,6 +278,7 @@ class CfgVehicles {
selection = ""; // no good selections for this mortar
};
};
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
magazineLocation = "";
@ -321,6 +324,7 @@ class CfgVehicles {
class StaticGrenadeLauncher: StaticWeapon {};
class RHS_AGS30_TriPod_base: StaticGrenadeLauncher {
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_weap_AGS30);
@ -341,6 +345,7 @@ class CfgVehicles {
};
class rhs_Metis_Base: AT_01_base_F {
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_weap_9K115_2_launcher);

View File

@ -1,5 +1,3 @@
#define CREATE_CSW_PROXY(weapon) class ##weapon; class GVAR(weapon): ##weapon { magazineReloadTime = 0.5; }
class CfgWeapons {
class NVGoggles;
@ -166,7 +164,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 670; // 2B14 Mortar Weight
};
displayName = CSTRING(2b14_tube);
displayName = ECSTRING(CSW,2b14_tube);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -186,7 +184,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 550;
};
displayName = CSTRING(nsv_gun);
displayName = ECSTRING(CSW,nsv_gun);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -207,7 +205,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 550;
};
displayName = CSTRING(kord_gun);
displayName = ECSTRING(CSW,kord_gun);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -227,7 +225,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 400; // https://odin.tradoc.army.mil/mediawiki/index.php/AGS-17_Russian_30mm_Automatic_Grenade_Launcher
};
displayName = CSTRING(ags30_gun);
displayName = ECSTRING(CSW,ags30_gun);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -247,7 +245,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 1000;
};
displayName = CSTRING(spg9_tube);
displayName = ECSTRING(csw,spg9_tube);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -260,7 +258,7 @@ class CfgWeapons {
EGVAR(csw,spg9Tripod) = "rhs_SPG9M_MSV";
};
};
displayName = CSTRING(spg9m_tube);
displayName = ECSTRING(csw,spg9m_tube);
};
class GVAR(metis_carry): Launcher_Base_F {
@ -273,7 +271,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 300;
};
displayName = CSTRING(metis_tube);
displayName = ECSTRING(csw,metis_tube);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -291,7 +289,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 600;
};
displayName = CSTRING(kornet_launcher);
displayName = ECSTRING(csw,kornet_launcher);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);

View File

@ -1,4 +1,5 @@
#include "script_component.hpp"
#include "\z\ace\addons\csw\script_config_macros_csw.hpp"
class CfgPatches {
class ADDON {

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="compat_rhs_afrf3">
<Key ID="STR_ACE_compat_rhs_afrf3_2b14_tube">
<English>2B14 Tube Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_afrf3_nsv_gun">
<English>NSV Gun Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_afrf3_kord_gun">
<English>KORD Gun Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_afrf3_ags30_gun">
<English>AGS-30 Gun Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_afrf3_spg9_tube">
<English>SPG-9 Launcher Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_afrf3_spg9m_tube">
<English>SPG-9M Launcher</English>
</Key>
<Key ID="STR_ACE_compat_rhs_afrf3_metis_tube">
<English>9k115 Metis Launcher Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_afrf3_kornet_launcher">
<English>9m113 Kornet Launcher</English>
</Key>
</Package>
</Project>

View File

@ -7,6 +7,7 @@ class CfgVehicles {
class StaticMGWeapon;
class rhs_DSHKM_base: StaticMGWeapon {
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_weap_DSHKM);

View File

@ -1,5 +1,3 @@
#define CREATE_CSW_PROXY(weapon) class ##weapon; class GVAR(weapon): ##weapon { magazineReloadTime = 0.5; }
class CfgWeapons {
class rhs_weap_kar98k_Base_F;
class rhs_weap_kar98k: rhs_weap_kar98k_Base_F {
@ -102,7 +100,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 740;
};
displayName = CSTRING(dshk_gun);
displayName = ECSTRING(csw,dshk_gun);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);

View File

@ -1,4 +1,5 @@
#include "script_component.hpp"
#include "\z\ace\addons\csw\script_config_macros_csw.hpp"
class CfgPatches {
class ADDON {

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="compat_rhs_gref3">
<Key ID="STR_ACE_compat_rhs_gref3_dshk_gun">
<English>DSHK Gun Bag</English>
</Key>
</Package>
</Project>

View File

@ -300,6 +300,7 @@ class CfgVehicles {
selection = "main_gun";
};
};
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
magazineLocation = "";
@ -315,6 +316,7 @@ class CfgVehicles {
class StaticMGWeapon: StaticWeapon {};
class rhs_m2staticmg_base: StaticMGWeapon {
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_M2);
@ -336,6 +338,7 @@ class CfgVehicles {
class StaticGrenadeLauncher: StaticWeapon {};
class RHS_MK19_TriPod_base: StaticGrenadeLauncher {
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_MK19);
@ -350,6 +353,7 @@ class CfgVehicles {
class StaticATWeapon: StaticWeapon {};
class RHS_TOW_TriPod_base: StaticATWeapon {
// ENABLE_CSW_ATTRIBUTE;
class ACE_CSW {
enabled = 1;
proxyWeapon = QGVAR(rhs_weap_TOW_Launcher_static);

View File

@ -1,5 +1,3 @@
#define CREATE_CSW_PROXY(weapon) class ##weapon; class GVAR(weapon): ##weapon { magazineReloadTime = 0.5; }
class CfgWeapons {
class NVGoggles;
class rhsusf_ANPVS_14: NVGoggles { // Monocular
@ -442,7 +440,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 620; // M252 Mortar Weight
};
displayName = CSTRING(m252_tube);
displayName = ECSTRING(CSW,m252_tube);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -463,7 +461,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 840;
};
displayName = CSTRING(m2_gun);
displayName = ECSTRING(CSW,m2_gun);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -483,7 +481,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 770;
};
displayName = CSTRING(mk19_gun);
displayName = ECSTRING(CSW,mk19_gun);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);
@ -503,7 +501,7 @@ class CfgWeapons {
class WeaponSlotsInfo: WeaponSlotsInfo {
mass = 500;
};
displayName = CSTRING(tow_tube);
displayName = ECSTRING(CSW,tow_tube);
author = ECSTRING(common,ACETeam);
scope = 2;
model = QPATHTOEF(apl,ACE_CSW_Bag.p3d);

View File

@ -1,4 +1,5 @@
#include "script_component.hpp"
#include "\z\ace\addons\csw\script_config_macros_csw.hpp"
class CfgPatches {
class ADDON {

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="compat_rhs_usf3">
<Key ID="STR_ACE_compat_rhs_usf3_m252_tube">
<English>M252 Tube Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_usf3_m2_gun">
<English>M2 Gun Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_usf3_mk19_gun">
<English>MK19 Gun Bag</English>
</Key>
<Key ID="STR_ACE_compat_rhs_usf3_tow_tube">
<English>BGM-71 TOW Launcher Bag</English>
</Key>
</Package>
</Project>