Skip to content

Commit

Permalink
rifle attachment restrictions
Browse files Browse the repository at this point in the history
assault rifles can only take the scope they spawned with, along with any
other commonly used scope for that faction. I had a look at the unmount
mod that just adds a timer to it so that I could read from that and add
non-repeatable zero to anyone that changes scopes, but it works on a
while true loop which isn't viable, this is easier and doesn't affect
performance
  • Loading branch information
Hobbnob committed Mar 28, 2019
1 parent 553df0d commit 1415b57
Show file tree
Hide file tree
Showing 5 changed files with 539 additions and 13 deletions.
50 changes: 48 additions & 2 deletions @twc_config_public/addons/twc_units_90/weapons.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
class asdg_FrontSideRail;
class asdg_OpticRail1913;

class cfgWeapons
{
class UK3CB_BAF_L85A2;
Expand Down Expand Up @@ -179,6 +182,16 @@ class cfgWeapons
item="UK3CB_BAF_SUSAT_3D";
};
};
class WeaponSlotsInfo
{
class asdg_OpticRail_UK3CB_BAF_L85: asdg_OpticRail1913 {
class compatibleItems {
UK3CB_BAF_SUSAT_3D = 1;
};
};
allowedslots[] = {901};
mass = 84;
};
};
class UK3CB_BAF_L110A2;
class TWC_UK3CB_BAF_L110A2_SUSAT: UK3CB_BAF_L110A2
Expand All @@ -194,6 +207,16 @@ class cfgWeapons
item="UK3CB_BAF_SUSAT";
};
};
class WeaponSlotsInfo
{
class asdg_OpticRail_UK3CB_BAF_L110A2: asdg_OpticRail1913 {
class compatibleItems {
UK3CB_BAF_SUSAT = 1;
};
};
allowedslots[] = {901};
mass = 176;
};
};

class UK3CB_BAF_L85A1:UK3CB_BAF_L85A2
Expand All @@ -202,7 +225,7 @@ class cfgWeapons
ACE_Overheating_JamChance[] = {0, 0.0012, 0.0018, 0.0033};
author="Jayman";
};
class UK3CB_BAF_L85A1_SUSAT3D:UK3CB_BAF_L85A2
class UK3CB_BAF_L85A1_SUSAT3D:UK3CB_BAF_L85A1
{
scope = 1;
displayName = "L85A1";
Expand All @@ -217,9 +240,20 @@ class cfgWeapons
item="UK3CB_BAF_SUSAT_3D";
};
};

class WeaponSlotsInfo
{
class asdg_OpticRail_UK3CB_BAF_L85: asdg_OpticRail1913 {
class compatibleItems {
UK3CB_BAF_SUSAT_3D = 1;
};
};
allowedslots[] = {901};
mass = 84;
};
};

class UK3CB_BAF_L85A1_SUSAT3D_Lazer:UK3CB_BAF_L85A2
class UK3CB_BAF_L85A1_SUSAT3D_Lazer:UK3CB_BAF_L85A1
{
scope = 1;
displayName = "L85A1";
Expand All @@ -239,6 +273,18 @@ class cfgWeapons
item="UK3CB_BAF_LLM_Flashlight_Black";
};
};


class WeaponSlotsInfo
{
class asdg_OpticRail_UK3CB_BAF_L85: asdg_OpticRail1913 {
class compatibleItems {
UK3CB_BAF_SUSAT_3D = 1;
};
};
allowedslots[] = {901};
mass = 84;
};
};

class UK3CB_BAF_L115A3;
Expand Down
108 changes: 107 additions & 1 deletion @twc_config_public/addons/twc_units_marines/weapons.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
class CUP_PicatinnyTopShortMount;
class CUP_PicatinnySideMount;
class UK3CB_underbarrel_rifle_slot;
class asdg_MuzzleSlot_762_L129_3CB;
class asdg_OpticRail1913_short;
class asdg_UnderSlot;
class rhs_western_rifle_scopes_slot_short;
class rhs_western_rifle_laser_slot_top;
class rhs_western_rifle_gripod_slot;
class rhs_western_rifle_underbarrel_slot;

class cfgWeapons
{
class rhs_weap_m4a1_m203;
Expand Down Expand Up @@ -37,14 +48,40 @@ class cfgWeapons
item="rhsusf_acc_anpeq15A";
};
};
class WeaponSlotsInfo
{
class CowsSlot: rhs_western_rifle_scopes_slot_short {
class compatibleItems {
rhsusf_acc_ACOG = 1;
rhsusf_acc_compm4 = 1;
};
};
class PointerSlot: rhs_western_rifle_laser_slot_top {
class compatibleItems {
rhsusf_acc_anpeq15A = 1;
};
};
allowedslots[] = {901};
mass = 102.96;
};
};


class twc_ana_m16a4: rhs_weap_m16a4_carryhandle
{

class WeaponSlotsInfo {
class CowsSlot { };
allowedslots[] = {901};
mass = 74.8;
};
};

class CUP_arifle_M16A4_Grip;
class CUP_TWC_arifle_M16A4_Grip_clean: CUP_arifle_M16A4_Grip
{
class WeaponSlotsInfo {
allowedslots[] = {901};
mass = 74.8;
};
};

Expand All @@ -64,6 +101,22 @@ class cfgWeapons
item="rhsusf_acc_anpeq15side_bk";
};
};
class WeaponSlotsInfo
{
class CowsSlot: rhs_western_rifle_scopes_slot_short {
class compatibleItems {
rhsusf_acc_ACOG_USMC = 1;
rhsusf_acc_compm4 = 1;
};
};
class PointerSlot: rhs_western_rifle_laser_slot_top {
class compatibleItems {
rhsusf_acc_anpeq15side_bk = 1;
};
};
allowedslots[] = {901};
mass = 74.8;
};
};

class twc_rhs_weap_m16a4_m203_acog_lazer: rhs_weap_m16a4_carryhandle_M203
Expand All @@ -81,6 +134,22 @@ class cfgWeapons
item="rhsusf_acc_anpeq15A";
};
};
class WeaponSlotsInfo
{
class CowsSlot: rhs_western_rifle_scopes_slot_short {
class compatibleItems {
rhsusf_acc_ACOG_USMC = 1;
rhsusf_acc_compm4 = 1;
};
};
class PointerSlot: rhs_western_rifle_laser_slot_top {
class compatibleItems {
rhsusf_acc_anpeq15A = 1;
};
};
allowedslots[] = {901};
mass = 104.72;
};
};

class twc_rhs_weap_m4a1_acog_lazer: rhs_weap_m4a1
Expand All @@ -98,6 +167,22 @@ class cfgWeapons
item="rhsusf_acc_anpeq15_bk_light";
};
};
class WeaponSlotsInfo
{
class CowsSlot: rhs_western_rifle_scopes_slot_short {
class compatibleItems {
rhsusf_acc_ACOG = 1;
rhsusf_acc_compm4 = 1;
};
};
class PointerSlot: rhs_western_rifle_laser_slot_top {
class compatibleItems {
rhsusf_acc_anpeq15_bk_light = 1;
};
};
allowedslots[] = {901};
mass = 73.04;
};
};

class twc_rhs_weap_m249_pip_L_mgo_lazer: rhs_weap_m249_pip_L
Expand Down Expand Up @@ -155,6 +240,27 @@ class cfgWeapons
item="bipod_01_F_blk";
};
};
class WeaponSlotsInfo
{
class CowsSlot: rhs_western_rifle_scopes_slot_short {
class compatibleItems {
rhsusf_acc_ACOG = 1;
rhsusf_acc_compm4 = 1;
};
};
class PointerSlot: rhs_western_rifle_laser_slot_top {
class compatibleItems {
rhsusf_acc_anpeq15_bk_light = 1;
};
};
class UnderBarrelSlot: rhs_western_rifle_underbarrel_slot {
class compatibleItems {
bipod_01_F_blk = 1;
};
};
allowedslots[] = {901};
mass = 79.2;
};
};

class rhs_weap_m4a1_d_grip2;
Expand Down
Loading

0 comments on commit 1415b57

Please sign in to comment.