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

Flashlights - Nerf flashlight range #281

Merged
merged 5 commits into from
Jan 29, 2025
Merged
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
71 changes: 36 additions & 35 deletions addons/flashlight/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,61 @@ class CfgPatches {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {
QCLASS(ANPEQ_15_IR_Light_Black),
QCLASS(ANPEQ_15_IR_Light_OD),
QCLASS(ANPEQ_15_IR_Light_Tan),
QCLASS(ANPEQ_15_Laser_Black),
QCLASS(ANPEQ_15_Laser_OD),
QCLASS(ANPEQ_15_Laser_Tan),
QCLASS(ANPEQ_15_Light_Black),
QCLASS(ANPEQ_15_Light_OD),
QCLASS(ANPEQ_15_Light_Tan),
QCLASS(ANPEQ_15_Low_Light_Black),
QCLASS(ANPEQ_15_Low_Light_OD),
QCLASS(ANPEQ_15_Low_Light_Tan),
QCLASS(ANPEQ_15_Top_IR_Light_Black),
QCLASS(ANPEQ_15_Top_IR_Light_OD),
QCLASS(ANPEQ_15_Top_IR_Light_Tan),
QCLASS(ANPEQ_15_Top_Laser_Black),
QCLASS(ANPEQ_15_Top_Laser_OD),
QCLASS(ANPEQ_15_Top_Laser_Tan),
QCLASS(ANPEQ_15_Top_Light_Black),
QCLASS(ANPEQ_15_Top_Light_OD),
QCLASS(ANPEQ_15_Top_Light_Tan),
QCLASS(ANPEQ_15_Top_Low_Light_Black),
QCLASS(ANPEQ_15_Top_Low_Light_OD),
QCLASS(ANPEQ_15_Top_Low_Light_Tan),
QCLASS(ANPEQ_15_Top_IR_Light_Black),
QCLASS(ANPEQ_15_Top_Vis_Laser_Black),
QCLASS(ANPEQ_15_Top_Laser_OD),
QCLASS(ANPEQ_15_Top_Light_OD),
QCLASS(ANPEQ_15_Top_Low_Light_OD),
QCLASS(ANPEQ_15_Top_IR_Light_OD),
QCLASS(ANPEQ_15_Top_Vis_Laser_OD),
QCLASS(ANPEQ_15_Top_Laser_Tan),
QCLASS(ANPEQ_15_Top_Light_Tan),
QCLASS(ANPEQ_15_Top_Low_Light_Tan),
QCLASS(ANPEQ_15_Top_IR_Light_Tan),
QCLASS(ANPEQ_15_Top_Vis_Laser_Tan),
QCLASS(ANPEQ_15_Laser_Black),
QCLASS(ANPEQ_15_Light_Black),
QCLASS(ANPEQ_15_Low_Light_Black),
QCLASS(ANPEQ_15_IR_Light_Black),
QCLASS(ANPEQ_15_Vis_Laser_Black),
QCLASS(ANPEQ_15_Laser_OD),
QCLASS(ANPEQ_15_Light_OD),
QCLASS(ANPEQ_15_Low_Light_OD),
QCLASS(ANPEQ_15_IR_Light_OD),
QCLASS(ANPEQ_15_Vis_Laser_OD),
QCLASS(ANPEQ_15_Laser_Tan),
QCLASS(ANPEQ_15_Light_Tan),
QCLASS(ANPEQ_15_Low_Light_Tan),
QCLASS(ANPEQ_15_IR_Light_Tan),
QCLASS(ANPEQ_15_Vis_Laser_Tan),
QCLASS(CZ_M3X_Laser),
QCLASS(CZ_M3X_Light),
QCLASS(CZ_M3X_Vis_Laser),
QCLASS(LLM01_Laser_Black),
QCLASS(LLM01_Light_Black),
QCLASS(LLM01_Low_Light_Black),
QCLASS(LLM01_IR_Light_Black),
QCLASS(LLM01_Vis_Laser_Black),
QCLASS(LLM_Laser_Black),
QCLASS(LLM_Light_Black),
QCLASS(LLM_Low_Light_Black),
QCLASS(LLM_IR_Light_Black),
QCLASS(LLM_Vis_Laser_Black),
QCLASS(MLPLS_Laser),
QCLASS(MLPLS_Vis_Laser),
QCLASS(LLM01_Laser_Black),
QCLASS(LLM01_Light_Black),
QCLASS(LLM01_Low_Light_Black),
QCLASS(LLM01_IR_Light_Black),
QCLASS(LLM01_Vis_Laser_Black),
QCLASS(Surefire_Flashlight_Black),
QCLASS(Surefire_Flashlight_OD),
QCLASS(Surefire_Flashlight_Tan),
QCLASS(Surefire_Low_Flashlight_Black),
QCLASS(Surefire_Flashlight_OD),
QCLASS(Surefire_Low_Flashlight_OD),
QCLASS(Surefire_Flashlight_Tan),
QCLASS(Surefire_Low_Flashlight_Tan),
QCLASS(Surefire_XC1_Flashlight),
QCLASS(UTG_Flashlight),
QCLASS(UTG_Low_Flashlight)
QCLASS(UTG_Low_Flashlight),
// Handgun Lights
QCLASS(CZ_M3X_Laser),
QCLASS(CZ_M3X_Light),
QCLASS(CZ_M3X_Vis_Laser),
QCLASS(MLPLS_Laser),
QCLASS(MLPLS_Vis_Laser),
QCLASS(Surefire_XC1_Flashlight)
};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"tacgt_main", "CUP_Weapons_West_Attachments"};
Expand Down
179 changes: 104 additions & 75 deletions addons/flashlight/joint_rails.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,126 +2,155 @@
class asdg_SlotInfo;
class asdg_FrontSideRail: asdg_SlotInfo {
class compatibleItems {
CLASS(ANPEQ_15_IR_Light_Black) = 1;
CLASS(ANPEQ_15_IR_Light_OD) = 1;
CLASS(ANPEQ_15_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Laser_Black) = 1;
CLASS(ANPEQ_15_Laser_OD) = 1;
CLASS(ANPEQ_15_Laser_Tan) = 1;
CLASS(ANPEQ_15_Light_Black) = 1;
CLASS(ANPEQ_15_Light_OD) = 1;
CLASS(ANPEQ_15_Light_Tan) = 1;
CLASS(ANPEQ_15_Low_Light_Black) = 1;
CLASS(ANPEQ_15_Low_Light_OD) = 1;
CLASS(ANPEQ_15_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Black) = 1;
CLASS(ANPEQ_15_Top_IR_Light_OD) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Laser_Black) = 1;
CLASS(ANPEQ_15_Top_Laser_OD) = 1;
CLASS(ANPEQ_15_Top_Laser_Tan) = 1;
CLASS(ANPEQ_15_Top_Light_Black) = 1;
CLASS(ANPEQ_15_Top_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Low_Light_Black) = 1;
CLASS(ANPEQ_15_Top_Low_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Black) = 1;
CLASS(ANPEQ_15_Top_Vis_Laser_Black) = 1;

CLASS(ANPEQ_15_Top_Laser_OD) = 1;
CLASS(ANPEQ_15_Top_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Low_Light_OD) = 1;
CLASS(ANPEQ_15_Top_IR_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Vis_Laser_OD) = 1;

CLASS(ANPEQ_15_Top_Laser_Tan) = 1;
CLASS(ANPEQ_15_Top_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Vis_Laser_Tan) = 1;

CLASS(ANPEQ_15_Laser_Black) = 1;
CLASS(ANPEQ_15_Light_Black) = 1;
CLASS(ANPEQ_15_Low_Light_Black) = 1;
CLASS(ANPEQ_15_IR_Light_Black) = 1;
CLASS(ANPEQ_15_Vis_Laser_Black) = 1;

CLASS(ANPEQ_15_Laser_OD) = 1;
CLASS(ANPEQ_15_Light_OD) = 1;
CLASS(ANPEQ_15_Low_Light_OD) = 1;
CLASS(ANPEQ_15_IR_Light_OD) = 1;
CLASS(ANPEQ_15_Vis_Laser_OD) = 1;

CLASS(ANPEQ_15_Laser_Tan) = 1;
CLASS(ANPEQ_15_Light_Tan) = 1;
CLASS(ANPEQ_15_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Vis_Laser_Tan) = 1;
CLASS(LLM01_Laser_Black) = 1;
CLASS(LLM01_Light_Black) = 1;
CLASS(LLM01_Low_Light_Black) = 1;
CLASS(LLM01_IR_Light_Black) = 1;
CLASS(LLM01_Vis_Laser_Black) = 1;

CLASS(LLM_Laser_Black) = 1;
CLASS(LLM_Light_Black) = 1;
CLASS(LLM_Low_Light_Black) = 1;
CLASS(LLM_IR_Light_Black) = 1;
CLASS(LLM_Vis_Laser_Black) = 1;

CLASS(LLM01_Laser_Black) = 1;
CLASS(LLM01_Light_Black) = 1;
CLASS(LLM01_Low_Light_Black) = 1;
CLASS(LLM01_IR_Light_Black) = 1;
CLASS(LLM01_Vis_Laser_Black) = 1;

CLASS(Surefire_Flashlight_Black) = 1;
CLASS(Surefire_Flashlight_OD) = 1;
CLASS(Surefire_Flashlight_Tan) = 1;
CLASS(Surefire_Low_Flashlight_Black) = 1;

CLASS(Surefire_Flashlight_OD) = 1;
CLASS(Surefire_Low_Flashlight_OD) = 1;

CLASS(Surefire_Flashlight_Tan) = 1;
CLASS(Surefire_Low_Flashlight_Tan) = 1;

CLASS(UTG_Flashlight) = 1;
CLASS(UTG_Low_Flashlight) = 1;
};
};

class asdg_PistolUnderRail: asdg_SlotInfo {
class compatibleItems {
CLASS(CZ_M3X_Laser) = 1;
CLASS(CZ_M3X_Light) = 1;
CLASS(CZ_M3X_Vis_Laser) = 1;
CLASS(MLPLS_Laser) = 1;
CLASS(MLPLS_Vis_Laser) = 1;
CLASS(Surefire_XC1_Flashlight) = 1;
};
};

class PointerSlot;
class PointerSlot_Pistol: PointerSlot {
class compatibleItems {
tacgt_CZ_M3X_Laser = 1;
tacgt_MLPLS_Laser = 1;
tacgt_Surefire_XC1_Flashlight = 1;
};
};

class PointerSlot_Rail: PointerSlot {
class compatibleItems {
CLASS(ANPEQ_15_IR_Light_Black) = 1;
CLASS(ANPEQ_15_IR_Light_OD) = 1;
CLASS(ANPEQ_15_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Laser_Black) = 1;
CLASS(ANPEQ_15_Laser_OD) = 1;
CLASS(ANPEQ_15_Laser_Tan) = 1;
CLASS(ANPEQ_15_Light_Black) = 1;
CLASS(ANPEQ_15_Light_OD) = 1;
CLASS(ANPEQ_15_Light_Tan) = 1;
CLASS(ANPEQ_15_Low_Light_Black) = 1;
CLASS(ANPEQ_15_Low_Light_OD) = 1;
CLASS(ANPEQ_15_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Black) = 1;
CLASS(ANPEQ_15_Top_IR_Light_OD) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Laser_Black) = 1;
CLASS(ANPEQ_15_Top_Laser_OD) = 1;
CLASS(ANPEQ_15_Top_Laser_Tan) = 1;
CLASS(ANPEQ_15_Top_Light_Black) = 1;
CLASS(ANPEQ_15_Top_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Low_Light_Black) = 1;
CLASS(ANPEQ_15_Top_Low_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Black) = 1;
CLASS(ANPEQ_15_Top_Vis_Laser_Black) = 1;

CLASS(ANPEQ_15_Top_Laser_OD) = 1;
CLASS(ANPEQ_15_Top_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Low_Light_OD) = 1;
CLASS(ANPEQ_15_Top_IR_Light_OD) = 1;
CLASS(ANPEQ_15_Top_Vis_Laser_OD) = 1;

CLASS(ANPEQ_15_Top_Laser_Tan) = 1;
CLASS(ANPEQ_15_Top_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Top_Vis_Laser_Tan) = 1;

CLASS(ANPEQ_15_Laser_Black) = 1;
CLASS(ANPEQ_15_Light_Black) = 1;
CLASS(ANPEQ_15_Low_Light_Black) = 1;
CLASS(ANPEQ_15_IR_Light_Black) = 1;
CLASS(ANPEQ_15_Vis_Laser_Black) = 1;

CLASS(ANPEQ_15_Laser_OD) = 1;
CLASS(ANPEQ_15_Light_OD) = 1;
CLASS(ANPEQ_15_Low_Light_OD) = 1;
CLASS(ANPEQ_15_IR_Light_OD) = 1;
CLASS(ANPEQ_15_Vis_Laser_OD) = 1;

CLASS(ANPEQ_15_Laser_Tan) = 1;
CLASS(ANPEQ_15_Light_Tan) = 1;
CLASS(ANPEQ_15_Low_Light_Tan) = 1;
CLASS(ANPEQ_15_IR_Light_Tan) = 1;
CLASS(ANPEQ_15_Vis_Laser_Tan) = 1;
CLASS(LLM01_Laser_Black) = 1;
CLASS(LLM01_Light_Black) = 1;
CLASS(LLM01_Low_Light_Black) = 1;
CLASS(LLM01_IR_Light_Black) = 1;
CLASS(LLM01_Vis_Laser_Black) = 1;

CLASS(LLM_Laser_Black) = 1;
CLASS(LLM_Light_Black) = 1;
CLASS(LLM_Low_Light_Black) = 1;
CLASS(LLM_IR_Light_Black) = 1;
CLASS(LLM_Vis_Laser_Black) = 1;

CLASS(LLM01_Laser_Black) = 1;
CLASS(LLM01_Light_Black) = 1;
CLASS(LLM01_Low_Light_Black) = 1;
CLASS(LLM01_IR_Light_Black) = 1;
CLASS(LLM01_Vis_Laser_Black) = 1;

CLASS(Surefire_Flashlight_Black) = 1;
CLASS(Surefire_Flashlight_OD) = 1;
CLASS(Surefire_Flashlight_Tan) = 1;
CLASS(Surefire_Low_Flashlight_Black) = 1;

CLASS(Surefire_Flashlight_OD) = 1;
CLASS(Surefire_Low_Flashlight_OD) = 1;

CLASS(Surefire_Flashlight_Tan) = 1;
CLASS(Surefire_Low_Flashlight_Tan) = 1;

CLASS(UTG_Flashlight) = 1;
CLASS(UTG_Low_Flashlight) = 1;
};
};

class asdg_PistolUnderRail: asdg_SlotInfo {
class compatibleItems {
CLASS(CZ_M3X_Laser) = 1;
CLASS(CZ_M3X_Light) = 1;
CLASS(CZ_M3X_Vis_Laser) = 1;

CLASS(MLPLS_Laser) = 1;
CLASS(MLPLS_Vis_Laser) = 1;

CLASS(Surefire_XC1_Flashlight) = 1;
};
};

class PointerSlot_Pistol: PointerSlot {
class compatibleItems {
CLASS(CZ_M3X_Laser) = 1;
CLASS(CZ_M3X_Light) = 1;
CLASS(CZ_M3X_Vis_Laser) = 1;

CLASS(MLPLS_Laser) = 1;
CLASS(MLPLS_Vis_Laser) = 1;

CLASS(Surefire_XC1_Flashlight) = 1;
};
};
2 changes: 1 addition & 1 deletion addons/flashlight/lights/AN_PEQ_Top.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CLASS(ANPEQ_15_Top_Low_Light_Black): CLASS(ANPEQ_15_Top_Laser_Black) {
MACRO_RED_FLASHLIGHT;
};
};
MRT_SwitchItemNextClass = QCLASS(ANPEQ_15_Top_Low_Light_Black);
MRT_SwitchItemNextClass = QCLASS(ANPEQ_15_Top_IR_Light_Black);
MRT_SwitchItemPrevClass = QCLASS(ANPEQ_15_Top_Light_Black);
MRT_SwitchItemHintText = "Visible Red";
};
Expand Down
16 changes: 8 additions & 8 deletions addons/flashlight/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
scopeArsenal = 1

#define MACRO_FLASHLIGHT \
direction = "flash"; \
position = "flash dir"; \
ambient[] = {6, 9, 9}; \
color[] = {185, 190, 199}; \
coneFadeCoef = 150; \
coneFadeCoef = 80; \
dayLight = 1; \
direction = "flash"; \
flareMaxDistance = 600; \
flareMaxDistance = 150; \
flareSize = 1; \
innerAngle = 15; \
intensity = 100; \
outerAngle = 120; \
position = "flash dir"; \
size = 1; \
useFlare = 1; \
class Attenuation { \
Expand All @@ -33,17 +33,17 @@
scale [] = {0}

#define MACRO_FLASHLIGHT_NIARMS \
direction = "flash dir"; \
position = "flash"; \
ambient[] = {6, 9, 9}; \
color[] = {185, 190, 199}; \
coneFadeCoef = 150; \
coneFadeCoef = 80; \
dayLight = 1; \
direction = "flash dir"; \
flareMaxDistance = 600; \
flareMaxDistance = 150; \
flareSize = 1; \
innerAngle = 15; \
intensity = 100; \
outerAngle = 120; \
position = "flash"; \
size = 1; \
useFlare = 1; \
class Attenuation { \
Expand Down