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

Joint Rails - Add GM compat #1730

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions addons/jr/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ class CfgWeapons {
};
};

class launch_RPG7_F: Launcher_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class CowsSlot: asdg_OpticSideRail_RPG7 {
iconPosition[] = {0.45,0.38};
iconScale = 0.2;
};
};
};

class EBR_base_F: Rifle_Long_Base_F {
class WeaponSlotsInfo;
};
Expand Down
32 changes: 32 additions & 0 deletions addons/jr/compat_gm/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include "script_component.hpp"

class CfgPatches {
class SUBADDON {
name = CSTRING(component);
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"cba_jr",
"gm_weapons_attachments_optics_feroz24",
"gm_weapons_attachments_optics_c79",
"gm_weapons_attachments_optics_lsscope",
"gm_weapons_attachments_optics_lightscope",
"gm_weapons_attachments_optics_rv",
"gm_weapons_attachments_optics_zf10x42",
"gm_weapons_attachments_optics_nspu",
"gm_weapons_attachments_optics_pgo7",
"gm_weapons_attachments_optics_pka",
"gm_weapons_attachments_optics_zfk4x25",
"gm_weapons_attachments_optics_zln1k",
"gm_weapons_attachments_optics_pso1"
};
author = "$STR_CBA_Author";
authors[] = {};
url = "$STR_CBA_URL";
skipWhenMissingDependencies = 1;
VERSION_CONFIG;
};
};

#include "jr_classes.hpp"
60 changes: 60 additions & 0 deletions addons/jr/compat_gm/jr_classes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
class asdg_OpticRail;

class asdg_OpticRail1913: asdg_OpticRail {
class compatibleItems {
gm_blits_ris_blk = 1;
gm_c79a1_blk = 1;
gm_c79a1_oli = 1;
gm_feroz24_ris_blk = 1;
gm_feroz51_ris_oli = 1;
gm_ls1500_ir_ris_blk = 1;
gm_ls1500_red_ris_blk = 1;
gm_ls45_ir_ris_blk = 1;
gm_ls45_red_ris_blk = 1;
gm_lsminiv_ir_ris_blk = 1;
gm_lsminiv_red_ris_blk = 1;
gm_maglite_3d_ris_blk = 1;
gm_rv_ris_blk = 1;
gm_streamlight_sl20_ris_blk = 1;
gm_streamlight_sl20_ris_brn = 1;
gm_zf10x42_ris_blk = 1;
gm_zf10x42_ris_oli = 1;
};
};

class asdg_OpticSideMount: asdg_OpticRail {
class compatibleItems {};
};

class asdg_OpticSideRail_AK: asdg_OpticSideMount {
class compatibleItems: compatibleItems {
gm_nspu_dovetail_blk = 1;
gm_nspu_dovetail_gry = 1;
gm_pgo7v_blk = 1;
gm_pka_dovetail_blk = 1;
gm_pka_dovetail_gry = 1;
gm_zfk4x25_blk = 1;
gm_zln1k_grn_dovetail_blk = 1;
gm_zln1k_grn_dovetail_gry = 1;
gm_zln1k_ir_dovetail_blk = 1;
gm_zln1k_ir_dovetail_gry = 1;
};
};
class asdg_OpticSideRail_SVD: asdg_OpticSideMount {
class compatibleItems: compatibleItems {
gm_nspu_dovetail_blk = 1;
gm_nspu_dovetail_gry = 1;
gm_pka_dovetail_blk = 1;
gm_pka_dovetail_gry = 1;
gm_pso6x36_1_dovetail_blk = 1;
gm_pso6x36_1_dovetail_gry = 1;
gm_pso1_dovetail_blk = 1;
gm_pso1_dovetail_gry = 1;
};
};

class asdg_OpticSideRail_RPG7: asdg_OpticSideMount {
class compatibleItems: compatibleItems {
gm_pgo7v_blk = 1;
};
};
2 changes: 2 additions & 0 deletions addons/jr/compat_gm/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define SUBCOMPONENT gm
#include "..\script_component.hpp"
6 changes: 6 additions & 0 deletions addons/jr/jr_classes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ class asdg_OpticSideRail_AKSVD: asdg_OpticSideMount {
};
};

class asdg_OpticSideRail_RPG7: asdg_OpticSideMount {
class compatibleItems: compatibleItems {
// side plate that fits RPG-7
};
};

// Muzzle slots

class asdg_MuzzleSlot_762: asdg_MuzzleSlot { // for 7.62x51 universal mount suppressors
Expand Down