Skip to content

Commit

Permalink
* Use fileExists command per CBATeam/CBA_A3#1410
Browse files Browse the repository at this point in the history
* Add more weapons to ai_rof
  • Loading branch information
Neviothr committed Mar 11, 2021
1 parent 2a3c692 commit 816e192
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 35 deletions.
82 changes: 66 additions & 16 deletions addons/ai_rof/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4264,23 +4264,73 @@ class CfgWeapons {
modes[] = {"Single", "Fullauto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_black: CUP_arifle_M4A1_BUIS_Base {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_ctrg: CUP_arifle_M4A1_SOMMOD_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_ctrgt: CUP_arifle_M4A1_SOMMOD_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_green;
class CUP_arifle_M4A1_SOMMOD_ELCAN_snds_green: CUP_arifle_M4A1_SOMMOD_green {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_Grip_black: CUP_arifle_M4A1_BUIS_Base {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_Grip_ctrg: CUP_arifle_M4A1_SOMMOD_Grip_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_Grip_ctrgt: CUP_arifle_M4A1_SOMMOD_Grip_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_Grip_green: CUP_arifle_M4A1_SOMMOD_Grip_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_Grip_hex: CUP_arifle_M4A1_SOMMOD_Grip_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_Grip_snow: CUP_arifle_M4A1_SOMMOD_Grip_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_Grip_tan;
class CUP_arifle_M4A1_SOMMOD_ELCAN_snds_tan: CUP_arifle_M4A1_SOMMOD_Grip_tan {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_hex {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_snow: CUP_arifle_M4A1_SOMMOD_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M4A1_SOMMOD_tan: CUP_arifle_M4A1_SOMMOD_black {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M16A1E1: CUP_arifle_XM16E1 {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
class CUP_arifle_M16A1E1GL: CUP_arifle_M16A1GL {
modes[] = {"Single", "FullAuto", "NEV_FullAuto"};
AI_ROF(FullAuto);
};
/*
CUP_arifle_M4A1_SOMMOD_black
CUP_arifle_M4A1_SOMMOD_ctrg
CUP_arifle_M4A1_SOMMOD_ctrgt
CUP_arifle_M4A1_SOMMOD_green
CUP_arifle_M4A1_SOMMOD_Grip_black
CUP_arifle_M4A1_SOMMOD_Grip_ctrg
CUP_arifle_M4A1_SOMMOD_Grip_ctrgt
CUP_arifle_M4A1_SOMMOD_Grip_green
CUP_arifle_M4A1_SOMMOD_Grip_hex
CUP_arifle_M4A1_SOMMOD_Grip_snow
CUP_arifle_M4A1_SOMMOD_Grip_tan
CUP_arifle_M4A1_SOMMOD_hex
CUP_arifle_M4A1_SOMMOD_snow
CUP_arifle_M4A1_SOMMOD_tan
CUP_arifle_M16A1E1
CUP_arifle_M16A1E1GL
CUP_arifle_Mk17_CQC_AFG
CUP_arifle_Mk17_CQC_AFG_black
CUP_arifle_Mk17_CQC_AFG_woodland
Expand Down
25 changes: 6 additions & 19 deletions addons/main/script_macros_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Macro: LOG()
------------------------------------------- */
#ifdef DEBUG_MODE_FULL

#define LOG(MESSAGE) LOG_SYS_FILELINENUMBERS('LOG',MESSAGE)
#define LOG(MESSAGE) LOG_SYS('LOG',MESSAGE)
#define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1))
#define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2))
#define LOG_3(MESSAGE,ARG1,ARG2,ARG3) LOG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3))
Expand Down Expand Up @@ -265,7 +265,7 @@ Macro: WARNING()
------------------------------------------- */
#ifdef DEBUG_MODE_NORMAL

#define WARNING(MESSAGE) LOG_SYS_FILELINENUMBERS('WARNING',MESSAGE)
#define WARNING(MESSAGE) LOG_SYS('WARNING',MESSAGE)
#define WARNING_1(MESSAGE,ARG1) WARNING(FORMAT_1(MESSAGE,ARG1))
#define WARNING_2(MESSAGE,ARG1,ARG2) WARNING(FORMAT_2(MESSAGE,ARG1,ARG2))
#define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) WARNING(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3))
Expand Down Expand Up @@ -304,7 +304,7 @@ Macro: ERROR()
Author:
Spooner
------------------------------------------- */
#define ERROR(MESSAGE) LOG_SYS_FILELINENUMBERS('ERROR',MESSAGE)
#define ERROR(MESSAGE) LOG_SYS('ERROR',MESSAGE)
#define ERROR_1(MESSAGE,ARG1) ERROR(FORMAT_1(MESSAGE,ARG1))
#define ERROR_2(MESSAGE,ARG1,ARG2) ERROR(FORMAT_2(MESSAGE,ARG1,ARG2))
#define ERROR_3(MESSAGE,ARG1,ARG2,ARG3) ERROR(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3))
Expand Down Expand Up @@ -1812,9 +1812,9 @@ Macro: IS_ADMIN_LOGGED

/* -------------------------------------------
Macro: FILE_EXISTS
Check if a file exists on machines with interface
Check if a file exists
Reports "false" if the file does not exist and throws an error in RPT.
Reports "false" if the file does not exist.
Parameters:
FILE - Path to the file
Expand All @@ -1828,17 +1828,4 @@ Macro: FILE_EXISTS
Author:
commy2
------------------------------------------- */
#define FILE_EXISTS(FILE) (call {\
private _return = false;\
isNil {\
private _control = (uiNamespace getVariable ["RscDisplayMain", displayNull]) ctrlCreate ["RscHTML", -1];\
if (isNull _control) then {\
_return = loadFile (FILE) != "";\
} else {\
_control htmlLoad (FILE);\
_return = ctrlHTMLLoaded _control;\
ctrlDelete _control;\
};\
};\
_return\
})
#define FILE_EXISTS(FILE) (fileExists (FILE))

0 comments on commit 816e192

Please sign in to comment.