Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #239 launcher attachments #255

Merged
merged 15 commits into from
Jul 27, 2019
Merged
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_3IFB.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_aaf.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
15 changes: 13 additions & 2 deletions f/assignGear/f_assignGear_attachments.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (_attachments isEqualType []) then {
removeAllPrimaryWeaponItems _unit;
{
// loop trough the attachments and add them to the weapon
// loop through the attachments and add them to the weapon
_unit addPrimaryWeaponItem _x;
} foreach _attachments;
};
Expand All @@ -10,7 +10,18 @@ if (_attachments isEqualType []) then {
if (_hg_attachments isEqualType []) then {
removeAllHandgunItems _unit;
{
// loop trough the attachments and add them to the weapon
// loop through the attachments and add them to the weapon
_unit addHandgunItem _x;
} foreach _hg_attachments;
};

// Handle launcher attachments
if (_lau_attachments isEqualType []) then {
{
_unit removeSecondaryWeaponItem _x;
} forEach secondaryWeaponItems _unit;
{
// loop through the attachments and add them to the weapon
_unit addSecondaryWeaponItem _x;
} foreach _lau_attachments;
};
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_csat.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_csatPacific.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_ctrg.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_fia.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_gendarmerie.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_nato.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_natoPacific.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
7 changes: 7 additions & 0 deletions f/assignGear/f_assignGear_syndikat.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ _hg_attachments= []; // The default attachment set for handguns, overwritten in

// ====================================================================================

// ATTACHMENTS - LAUNCHER
_lau_attach1 = ""; // Empty by default, could be a scope in GM or a laser pointer for Titans

_lau_attachments = []; // The default attachment set for launchers, overwritten in the individual unitType

// ====================================================================================

// WEAPON SELECTION

// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
Expand Down
2 changes: 1 addition & 1 deletion f/assignGear/fn_assignGear.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ _unit setVariable ["f_var_assignGear",_typeofUnit,true];
// DECLARE VARIABLES AND FUNCTIONS 2
// Used by the faction-specific scripts

private ["_attach1","_attach2","_silencer1","_silencer2","_scope1","_scope2","_scope3","_bipod1","_bipod2","_attachments","_silencer","_hg_silencer1","_hg_scope1","_hg_attachments","_rifle","_riflemag","_riflemag_tr","_carbine","_carbinemag","_carbinemag_tr","_smg","_smgmag","_smgmag_tr","_diverWep","_diverMag1","_diverMag2","_glrifle","_glriflemag","_glriflemag_tr","_glmag","_glsmokewhite","_glsmokegreen","_glsmokered","_glflarewhite","_glflarered","_glflareyellow","_glflaregreen","_pistol","_pistolmag","_grenade","_Mgrenade","_smokegrenade","_smokegrenadegreen","_smokegrenadeblue","_smokegrenadepurple","_firstaid","_medkit","_nvg","_uavterminal","_chemgreen","_chemred","_chemyellow","_chemblue","_bag","_bagLarge","_bagmediumdiver","_baguav","_baghmgg","_baghmgag","_baghatg","_baghatag","_bagmtrg","_bagmtrag","_baghsamg","_baghsamag","_AR","_ARmag","_ARmag_tr","_MMG","_MMGmag","_MMGmag_tr","_Tracer","_DMrifle","_DMriflemag","_RAT","_RATmag1","_RATmag2","_MAT","_MATmag1","_MATmag2","_SAM","_SAMmag","_HAT","_HATmag1","_HATmag2","_SNrifle","_SNrifleMag","_ATmine","_satchel","_APmine1","_APmine2","_diver","_pilot","_crew","_ghillie","_specOp","_baseUniform","_baseHelmet","_baseGlasses","_lightRig","_mediumRig","_heavyRig","_diverUniform","_diverHelmet","_diverRig","_diverGlasses","_pilotUniform","_pilotHelmet","_pilotRig","_pilotGlasses","_crewUniform","_crewHelmet","_crewRig","_crewGlasses","_ghillieUniform","_ghillieHelmet","_ghillieRig","_ghillieGlasses","_sfuniform","_sfhelmet","_sfRig","_sfGlasses","_backpack","_typeofBackPack","_loadout","_COrifle","_mgrenade","_DC","_SLrifle","_JTACrifle","_ftlrifle","_grenrifle","_typeofunit","_jet","_jetUniform","_jetHelmet","_jetRig","_jetGlasses"];
private ["_lau_attach1","_lau_attachments","_attach1","_attach2","_silencer1","_silencer2","_scope1","_scope2","_scope3","_bipod1","_bipod2","_attachments","_silencer","_hg_silencer1","_hg_scope1","_hg_attachments","_rifle","_riflemag","_riflemag_tr","_carbine","_carbinemag","_carbinemag_tr","_shotgun","_shotgunmag1","_shotgunmag2","_smg","_smgmag","_smgmag_tr","_diverWep","_diverMag1","_diverMag2","_glrifle","_glriflemag","_glriflemag_tr","_glmag","_glsmokewhite","_glsmokegreen","_glsmokered","_glflarewhite","_glflarered","_glflareyellow","_glflaregreen","_pistol","_pistolmag","_grenade","_Mgrenade","_smokegrenade","_smokegrenadegreen","_smokegrenadeblue","_smokegrenadepurple","_firstaid","_medkit","_nvg","_uavterminal","_chemgreen","_chemred","_chemyellow","_chemblue","_bag","_bagLarge","_bagmediumdiver","_baguav","_baghmgg","_baghmgag","_baghatg","_baghatag","_bagmtrg","_bagmtrag","_baghsamg","_baghsamag","_bagRadio","_AR","_ARmag","_ARmag_tr","_MMG","_MMGmag","_MMGmag_tr","_Tracer","_DMrifle","_DMriflemag","_RAT","_RATmag1","_RATmag2","_MAT","_MATmag1","_MATmag2","_SAM","_SAMmag","_HAT","_HATmag1","_HATmag2","_SNrifle","_SNrifleMag","_ATmine","_satchel","_APmine1","_APmine2","_diver","_pilot","_crew","_ghillie","_specOp","_baseUniform","_baseHelmet","_baseGlasses","_lightRig","_mediumRig","_heavyRig","_diverUniform","_diverHelmet","_diverRig","_diverGlasses","_pilotUniform","_pilotHelmet","_pilotRig","_pilotGlasses","_crewUniform","_crewHelmet","_crewRig","_crewGlasses","_ghillieUniform","_ghillieHelmet","_ghillieRig","_ghillieGlasses","_sfuniform","_sfhelmet","_sfRig","_sfGlasses","_backpack","_typeofBackPack","_loadout","_COrifle","_mgrenade","_DC","_SLrifle","_JTACrifle","_ftlrifle","_grenrifle","_typeofunit","_jet","_jetUniform","_jetHelmet","_jetRig","_jetGlasses"];

// ====================================================================================

Expand Down