Compare commits

..

19 Commits

Author SHA1 Message Date
hizumi
30e09b3bb7 Update CHANGELOG.md 2024-02-01 23:46:32 -06:00
hizumi
ca5ee22f04 Update README.md
document new folder structure
2024-02-01 23:27:15 -06:00
hizumi
75c13ce69b Update fn_initServer.sqf
update old no longer existing asset for fixed wing aircraft to currently used asset
2024-02-01 23:22:09 -06:00
29a04a1851 Merge pull request 'move-battalion-struct-to-missioncfg' (#15) from move-battalion-struct-to-missioncfg into main
Reviewed-on: https://17th-gs.iceberg-gaming.com:5443/hizumi/MissionTemplate/pulls/15
2024-02-01 23:19:35 -06:00
1e4a5a79a8 updates FBCB2, updates log fnc, adds comments 2024-02-01 20:52:10 -08:00
c7d9298987 Merge branch 'main' into move-battalion-struct-to-missioncfg 2024-02-01 15:20:25 -08:00
94b0d5becf Merge pull request 'inv_expan' (#13) from inv_expan into main
Reviewed-on: https://17th-gs.iceberg-gaming.com:5443/hizumi/MissionTemplate/pulls/13
2024-02-01 14:12:58 -06:00
bb388ecfb1 Merge branch 'main' into inv_expan 2024-02-01 14:12:10 -06:00
4677d54689 tested. moves defs to cfg where they should be, plus refactor of gather 2024-01-31 19:43:30 -08:00
dc33829751 changes logging, and eval inv on server only 2024-01-30 18:25:46 -08:00
dbff8d31d4 Merge branch 'main' into inv_expan 2024-01-30 17:03:36 -08:00
3e4b0c76b9 Merge pull request 'improve inventory check performance and logging' (#10) from #7-inventory-compliance-message into inv_expan
Reviewed-on: https://17th-gs.iceberg-gaming.com:5443/hizumi/MissionTemplate/pulls/10
2024-01-29 23:37:07 -06:00
072975c99e Merge pull request 'change logPlayerInventory to return lines, which handlers send to CBA ev' (#12) from #11-inventory-processed-on-every-machine into #7-inventory-compliance-message
Reviewed-on: https://17th-gs.iceberg-gaming.com:5443/hizumi/MissionTemplate/pulls/12
2024-01-29 23:36:41 -06:00
cada98e15a change logPlayerInventory to return lines, which handlers send to CBA ev 2024-01-29 13:48:35 -08:00
f77e418ac8 simplifies log types 2024-01-29 10:35:24 -08:00
93204f7d36 rework for structured logging and improvements 2024-01-29 10:18:01 -08:00
49fb1bb7fa fixes '_restricted' var references, uses find to identify if any non0 2024-01-28 22:44:49 -08:00
6eb598b660 Update fn_logPlayerInventory.sqf
Expanded the items arrays to check not only internal inventory items but primary slot inventory items.
2024-01-16 22:48:36 -06:00
7a1d0be6d6 Update 'functions/server/fn_logPlayerInventory.sqf'
Updated the fn_logPlayerInventory.sqf to do a check against a list of items that are "approved / rejected / restricted / and meme items in a players inventory
2024-01-15 21:44:40 -06:00
20 changed files with 566 additions and 132 deletions

View File

@@ -4,8 +4,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project badly attempts [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project badly attempts [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.1.3] - 2024-01-10 ## [3.2] - 2024-02-01
### Added
- Custom logging function to allow for external scripts to parse framework messages
- Transport request system for respawned players
- CBA settings for transport request enable/disable and timeout durations
- Added zeus mortar resupply boxes
- Added battalion layout definition file for use in FBCB2 system
### Changed
- Update fixed wing asset class type
- Update contents of zeus resupply boxes
- Update player inventory check functions
- Update FBCB2 callsign and radio frequency pages
## [3.1.3] - 2024-01-10
### Changed ### Changed
- Merge triage-status-draw3d to fix draw overlay for medics - Merge triage-status-draw3d to fix draw overlay for medics

View File

@@ -10,6 +10,7 @@ Once copied, the final structure should appear similar to the following:
├── images/ ├── images/
├── scripts/ ├── scripts/
├── sounds/ ├── sounds/
├── textures/
├── description.ext ├── description.ext
├── mission.jpg ├── mission.jpg
├── mission.sqm ├── mission.sqm
@@ -52,3 +53,7 @@ This directory is for organizational purposes for any custom scripts you wish to
This directory is for organizational purposes for any custom scripts you wish to use in your mission. This directory is for organizational purposes for any custom scripts you wish to use in your mission.
> **Note:** Using custom sounds require adding the proper CfgSounds codeblock into mission_settings.hpp > **Note:** Using custom sounds require adding the proper CfgSounds codeblock into mission_settings.hpp
## textures/
This directory is for organizational purposes for textures files used by mission scripts

View File

@@ -1,4 +1,4 @@
//-------------------------------------------DESCRIPTION.EXT----------------------------------------------------------------- //-------------------------------------------DESCRIPTION.EXT-----------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -17,6 +17,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "mission_settings.hpp" #include "mission_settings.hpp"
#include "functions\definitions\DisallowedEquipment.hpp"
#include "functions\definitions\BattalionInfo.hpp" #include "functions\definitions\BattalionInfo.hpp"
//-------------------------------------------MISSION INFO-------------------------------------------------------------------- //-------------------------------------------MISSION INFO--------------------------------------------------------------------

View File

@@ -21,7 +21,7 @@ class milsim
class processFBCB2RadioFrequencies {}; class processFBCB2RadioFrequencies {};
class processFBCB2SmokeColors {}; class processFBCB2SmokeColors {};
class processFBCB2Environment {}; class processFBCB2Environment {};
class messageFBCB2AssetStatus {}; class hintFBCB2AssetStatus {};
}; };
class fbcb2_util { class fbcb2_util {
file = "functions\fbcb2\util"; file = "functions\fbcb2\util";

View File

@@ -43,11 +43,11 @@ addMissionEventHandler ["HandleChatMessage",
["ace_arsenal_displayClosed", { ["ace_arsenal_displayClosed", {
player remoteExec["milsim_fnc_logPlayerInventory", 0]; [player] remoteExec ["milsim_fnc_logPlayerInventory", 2];
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
[missionNamespace, "arsenalClosed", { [missionNamespace, "arsenalClosed", {
player remoteExec["milsim_fnc_logPlayerInventory", 0]; [player] remoteExec ["milsim_fnc_logPlayerInventory", 2];
}] call BIS_fnc_addScriptedEventHandler; }] call BIS_fnc_addScriptedEventHandler;
diag_log text "[MILSIM] (client) event handlers bound"; diag_log text "[MILSIM] (client) event handlers bound";

View File

@@ -99,7 +99,7 @@ class BattalionInfo {
shortDescription = "Special Weapons Squad"; shortDescription = "Special Weapons Squad";
textColor = LVL2_TEXT_COLOR; textColor = LVL2_TEXT_COLOR;
frequencies[] = { frequencies[] = {
{"Contact", {}, {FREQ_BATTALION, FREQ_ECHO_FLIGHT_CAS}} {"Contact", {}, {FREQ_BATTALION}}
}; };
}; };
@@ -203,6 +203,7 @@ class BattalionInfo {
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, FLIGHT); callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, FLIGHT);
textColor = LVL3_TEXT_COLOR; textColor = LVL3_TEXT_COLOR;
frequencies[] = { frequencies[] = {
{"Contact", {}, {FREQ_BATTALION}},
{"Actual", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_BATTALION}}, {"Actual", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_BATTALION}},
{"CAS Support", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_ECHO_FLIGHT_CAS}}, {"CAS Support", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_ECHO_FLIGHT_CAS}},
{"Logistics", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_ECHO_FLIGHT_LOGISTICS}} {"Logistics", {}, {FREQ_ECHO_FLIGHT_INTERCOM, FREQ_ECHO_FLIGHT_LOGISTICS}}
@@ -213,6 +214,7 @@ class BattalionInfo {
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, GROUND); callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, GROUND);
textColor = LVL3_TEXT_COLOR; textColor = LVL3_TEXT_COLOR;
frequencies[] = { frequencies[] = {
{"Contact", {}, {FREQ_BATTALION}},
{"Actual", {}, {FREQ_ECHO_GROUND, FREQ_BATTALION}} {"Actual", {}, {FREQ_ECHO_GROUND, FREQ_BATTALION}}
}; };
@@ -220,6 +222,7 @@ class BattalionInfo {
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, LOGISTICS); callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, LOGISTICS);
textColor = LVL4_TEXT_COLOR; textColor = LVL4_TEXT_COLOR;
frequencies[] = { frequencies[] = {
{"Contact", {}, {FREQ_ECHO_GROUND}},
{"Actual", {}, {FREQ_ECHO_GROUND_LOGISTICS, FREQ_ECHO_GROUND}}, {"Actual", {}, {FREQ_ECHO_GROUND_LOGISTICS, FREQ_ECHO_GROUND}},
{"General", {}, {FREQ_ECHO_GROUND_LOGISTICS}}, {"General", {}, {FREQ_ECHO_GROUND_LOGISTICS}},
{"Convoy", {}, {FREQ_CONVOY}} {"Convoy", {}, {FREQ_CONVOY}}
@@ -230,6 +233,8 @@ class BattalionInfo {
callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, ATTACK); callsign = CALLSIGN_ELEMENT(ECHO_CALLSIGN, ATTACK);
textColor = LVL4_TEXT_COLOR; textColor = LVL4_TEXT_COLOR;
frequencies[] = { frequencies[] = {
{"Contact", {}, {FREQ_ECHO_GROUND, FREQ_ECHO_FLIGHT_CAS}},
{"Actual", {}, {FREQ_ECHO_GROUND}},
{"General", {}, {FREQ_ECHO_GROUND}}, {"General", {}, {FREQ_ECHO_GROUND}},
{"Convoy", {}, {FREQ_CONVOY}} {"Convoy", {}, {FREQ_CONVOY}}
}; };

View File

@@ -0,0 +1,223 @@
// To access these from SQF:
// to get an array of STRING with each subclass name:
// (missionConfigFile >> "DisallowedEquipment") call BIS_fnc_getCfgSubClasses
// To access a specific class' properties:
// (missionConfigFile >> "DisallowedEquipment" >> "blacklisted" >> "label") call BIS_fnc_getCfgData;
// (missionConfigFile >> "DisallowedEquipment" >> "blacklisted" >> "description") call BIS_fnc_getCfgData;
// (missionConfigFile >> "DisallowedEquipment" >> "blacklisted" >> "items") call BIS_fnc_getCfgDataArray;
class DisallowedEquipment {
class blacklisted {
label = "BLACKLISTED WEAPON OR ITEM";
description = "Items that NO member is allowed to use.";
items[] = {
"17BN_ANPVS14", // NVG AN/PVS-14
"ej_PVS15D", // NVG AN/PVS-15
"ej_VPS15", // NVG AN/PVS-15
"LMG_Mk200_black_F", //Mk200 Series
"LMG_Mk200_F", //Mk200 Series
"rhs_weap_g36c", // G36 Series
"rhs_weap_g36kv_ag36", // G36 Series
"rhs_weap_g36kv", // G36 Series
"rhs_weap_m14_d", // M14 Series
"rhs_weap_m14_fiberglass", // M14 Series
"rhs_weap_m14_rail_d", // M14 Series
"rhs_weap_m14_rail_fiberglass", // M14 Series
"rhs_weap_m14_rail_wd", // M14 Series
"rhs_weap_m14_rail", // M14 Series
"rhs_weap_m14_ris_d", // M14 Series
"rhs_weap_m14_ris_fiberglass", // M14 Series
"rhs_weap_m14_ris_wd", // M14 Series
"rhs_weap_m14_ris", // M14 Series
"rhs_weap_m14_socom_rail", // M14 Series
"rhs_weap_m14_socom", // M14 Series
"rhs_weap_m14_wd", // M14 Series
"rhs_weap_m14_weap_m14ebrri", // M14 Series
"rhs_weap_m14", // M14 Series
"rhs_weap_m16a4_carryhandle_M203", // M16 Series
"rhs_weap_m16a4_carryhandle", // M16 Series
"rhs_weap_m16a4_imod_M203", // M16 Series
"rhs_weap_m16a4_imod", // M16 Series
"rhs_weap_m16a4", // M16 Series
"rhs_weap_m27iar_grip", // M27 Series
"rhs_weap_m27iar", // M27 Series
"rhsusf_ANPVS_14", // NVG AN/PVS-14
"rhsusf_ANPVS_15", // NVG AN/PVS-15
"SMA_ACRREM", //Remington ACR 556+6.5
"SMA_ACRREMAFG", //Remington ACR 556+6.5
"SMA_ACRREMAFGblk", //Remington ACR 556+6.5
"SMA_ACRREMAFGCQB", //Remington ACR 556+6.5
"SMA_ACRREMAFGCQBblk", //Remington ACR 556+6.5
"SMA_ACRREMblk", //Remington ACR 556+6.5
"SMA_ACRREMCQBGL", //Remington ACR 556+6.5
"SMA_ACRREMGL_B", //Remington ACR 556+6.5
"SMA_ACRREMGL", //Remington ACR 556+6.5
"SMA_ACRREMMOE", //Remington ACR 556+6.5
"SMA_ACRREMMOEblk", //Remington ACR 556+6.5
"SMA_ACRREMMOECQB", //Remington ACR 556+6.5
"SMA_ACRREMMOECQBblk", //Remington ACR 556+6.5
"srifle_DMR_06_camo_F", // M14 Series
"srifle_DMR_06_hunter_F", // M14 Series
"srifle_DMR_06_olive_F", // M14 Series
"srifle_EBR_F", // Mk14 Series
"Tier1_SIG_CMX_115_Virtus_300BLK_Black", // MCX 300 Blackout
"Tier1_SIG_CMX_115_Virtus_300BLK_Desert", // MCX 300 Blackout
"Tier1_SIG_CMX_115_Virtus_300BLK_FDE", // MCX 300 Blackout
"Tier1_SIG_CMX_115_Virtus_300BLK", // MCX 300 Blackout
"UK3CB_AG36_MLIC", // G36 Series
"UK3CB_AG36_TAC_K", // G36 Series
"UK3CB_AG36A1", // G36 Series
"UK3CB_AG36E1", // G36 Series
"UK3CB_AG36V", // G36 Series
"UK3CB_FNFAL_FOREGRIP", // FN_FAL Series
"UK3CB_FNFAL_FULL_RAILS", // FN_FAL Series
"UK3CB_FNFAL_FULL", // FN_FAL Series
"UK3CB_FNFAL_OSW_GL", // FN_FAL Series
"UK3CB_FNFAL_OSW", // FN_FAL Series
"UK3CB_FNFAL_PARA_RAILS", // FN_FAL Series
"UK3CB_FNFAL_PARA", // FN_FAL Series
"UK3CB_FNFAL_STG58", // FN_FAL Series
"UK3CB_G36_KSK_K", // G36 Series
"UK3CB_G36_KSK", // G36 Series
"UK3CB_G36_LSW", // G36 Series
"UK3CB_G36_MLIC_C", // G36 Series
"UK3CB_G36_MLIC_K", // G36 Series
"UK3CB_G36_MLIC", // G36 Series
"UK3CB_G36_TAC_C", // G36 Series
"UK3CB_G36_TAC", // G36 Series
"UK3CB_G36A1_C", // G36 Series
"UK3CB_G36A1_K", // G36 Series
"UK3CB_G36A1", // G36 Series
"UK3CB_G36E1_C", // G36 Series
"UK3CB_G36E1_K", // G36 Series
"UK3CB_G36E1", // G36 Series
"UK3CB_G36V_C", // G36 Series
"UK3CB_G36V_K", // G36 Series
"UK3CB_G36V", // G36 Series
"UK3CB_M14_Railed", // M14 Series
"UK3CB_M14", // M14 Series
"UK3CB_M14DMR_BLK", // M14 Series
"UK3CB_M14DMR_Railed_BLK", // M14 Series
"UK3CB_M14DMR_Railed", // M14 Series
"UK3CB_M14DMR", // M14 Series
"UK3CB_M16_Carbine", // M16 Series
"UK3CB_M16A1_LSW", // M16 Series
"UK3CB_M16A1", // M16 Series
"UK3CB_M16A2_UGL", // M16 Series
"UK3CB_M16A2", // M16 Series
"UK3CB_M16A3", // M16 Series
"USP_PVS_14", // NVG AN/PVS-14
"USP_PVS_15" // NVG AN/PVS-15
};
};
class restrictedItems {
label = "RESTRICTED ITEM";
description = "Items that are allowed for specific USE Case (RRC / Marksman / etc.)";
items[] = {
"A3_GPNVG18_BLK_TI", // Thermal Quad
"A3_GPNVG18_REC_BLK_TI", // Thermal Quad
"A3_GPNVG18_REC_TI", // Thermal Quad
"A3_GPNVG18_TI", // Thermal Quad
"A3_GPNVG18b_BLK_TI", // Thermal Quad
"A3_GPNVG18b_REC_BLK_TI", // Thermal Quad
"A3_GPNVG18b_REC_TI", // Thermal Quad
"A3_GPNVG18b_TI", // Thermal Quad
"ACE_optic_LRPS_2D", //Nightforce Series Optic
"ACE_optic_LRPS_PIP", //Nightforce Series Optic
"NVGogglesB_blk_F", // ENVG
"NVGogglesB_grn_F", // ENVG
"NVGogglesB_gry_F", // ENVG
"optic_lrps_ghex_F", //Nightforce Series Optic
"optic_lrps_tna_F", //Nightforce Series Optic
"optic_lrps", //Nightforce Series Optic
"optic_Nightstalker", // Thermal Optic
"optic_tws_mg", // Thermal Optic
"optic_tws", // Thermal Optic
"rhsusf_acc_anpas13gv1", // Thermal Optic
"rhsusf_acc_anpvs27", // Thermal Optic
"Tier1_ANPVS10_Tan", // Thermal Optic
"Tier1_ATACR18_ADM_Black_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_ADM_Black", //Nightforce Series Optic
"Tier1_ATACR18_ADM_Desert_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_ADM_Desert", //Nightforce Series Optic
"Tier1_ATACR18_ADM_T1_Black_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_ADM_T1_Black", //Nightforce Series Optic
"Tier1_ATACR18_ADM_T1_Desert_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_ADM_T1_Desert", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Black_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Black", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Desert_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Desert", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Docter_Black_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Docter_Black", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Docter_Desert_Vanilla", //Nightforce Series Optic
"Tier1_ATACR18_Geissele_Docter_Desert" //Nightforce Series Optic
};
};
class tabbedItems { // Items that are allowed for individuals with Ranger Tab
label = "TABBED WEAPON";
description = "Items that are allowed for individuals with Ranger Tab.";
items[] = {
"arifle_MX_black_F", // MX Series
"arifle_MX_F", // MX Series
"arifle_MX_GL_black_F", // MX 3GL Series
"arifle_MX_GL_F", // MX 3GL Series
"arifle_MX_GL_khk_F", // MX 3GL Series
"arifle_MX_khk_F", // MX Series
"arifle_MX_SW_black_F", // MX LSW Series
"arifle_MX_SW_F", // MX LSW Series
"arifle_MX_SW_khk_F", // MX LSW Series
"arifle_MXC_black_F", // MXC Series
"arifle_MXC_F", // MXC Series
"arifle_MXC_khk_F", // MXC Series
"arifle_MXM_black_F", // MXM Series
"arifle_MXM_F", // MXM Series
"arifle_MXM_khk_F", // MXM Series
"arifle_SPAR_03_blk_F", // HK417 Series
"arifle_SPAR_03_khk_F", // HK417 Series
"arifle_SPAR_03_snd_F", // HK417 Series
"rhs_weap_SCARH_CQC", // Scar H Series
"rhs_weap_SCARH_FDE_CQC", // Scar H Series
"rhs_weap_SCARH_FDE_LB", // Scar H Series
"rhs_weap_SCARH_FDE_STD", // Scar H Series
"rhs_weap_SCARH_LB", // Scar H Series
"rhs_weap_SCARH_STD", // Scar H Series
"rhs_weap_SCARH_USA_CQC", // Scar H Series
"rhs_weap_SCARH_USA_LB", // Scar H Series
"rhs_weap_SCARH_USA_STD", // Scar H Series
"SMA_HK417_16in", // HK417 Series
"SMA_HK417", // HK417 Series
"SMA_HK417vfg", // HK417 Series
"SMA_Mk17_16_black", // Scar H Series
"SMA_Mk17_16_green", // Scar H Series
"SMA_Mk17_16", // Scar H Series
"SMA_Mk17_black", // Scar H Series
"SMA_Mk17_EGML_black", // Scar H Series
"SMA_Mk17_EGML_green", // Scar H Series
"SMA_Mk17_EGML", // Scar H Series
"SMA_Mk17_green", // Scar H Series
"SMA_Mk17", // Scar H Series
"Tier1_MK48_Mod0_Desert", // Mk48 Series
"Tier1_MK48_Mod0_Para_Desert", // Mk48 Series
"Tier1_MK48_Mod0_Para", // Mk48 Series
"Tier1_MK48_Mod0", // Mk48 Series
"Tier1_MK48_Mod1_Desert", // Mk48 Series
"Tier1_MK48_Mod1", // Mk48 Series
"Tier1_SR25_ec_tan", // SR-25 Series
"Tier1_SR25_ec", // SR-25 Series
"Tier1_SR25_tan", // SR-25 Series
"Tier1_SR25" // SR-25 Series
};
};
class memeItems {
label = "MEME ITEM";
description = "Items that serve no purpose other than to MEME.";
items[] = {
"ACE_Banana",
"UK3CB_Cocaine_Brick"
};
};
};

View File

@@ -7,6 +7,9 @@ milsim_fbcb2_recordTitleColor = "#ff6666";
milsim_fbcb2_recordTitleFont = "PuristaMedium"; milsim_fbcb2_recordTitleFont = "PuristaMedium";
milsim_fbcb2_recordTitleSize = 20; milsim_fbcb2_recordTitleSize = 20;
milsim_fbcb2_recordTextHeaderSize = 16;
milsim_fbcb2_recordTextBodySize = 14;
milsim_fbcb2_subjectStatusID = "FBCB2_Status"; milsim_fbcb2_subjectStatusID = "FBCB2_Status";
milsim_fbcb2_subjectIntelID = "FBCB2_Intel"; milsim_fbcb2_subjectIntelID = "FBCB2_Intel";
milsim_fbcb2_subjectMessagesID = "FBCB2_Messages"; milsim_fbcb2_subjectMessagesID = "FBCB2_Messages";

View File

@@ -1,27 +1,42 @@
private _recordTitle = "MDS - INTEL - ENVIRONMENT"; private _recordTitle = "MDS - INTEL - ENVIRONMENT";
private _text = [
_sunTimes = date call BIS_fnc_sunriseSunsetTime; format[
_text = format[
"<font size='%1' color='%2' face='%3'>%4</font><br/><br/>", "<font size='%1' color='%2' face='%3'>%4</font><br/><br/>",
milsim_fbcb2_recordTitleSize, milsim_fbcb2_recordTitleSize,
milsim_fbcb2_recordTitleColor, milsim_fbcb2_recordTitleColor,
milsim_fbcb2_recordTitleFont, milsim_fbcb2_recordTitleFont,
_recordTitle _recordTitle
]
]; ];
_text = _text + "
<font size='16' color='#4A86E8'>Local Sunrise</font>
<br/>
<font size='20' color='#FF0000'>" + ([_sunTimes select 0, "HH:MM"] call BIS_fnc_timeToString) + "</font>
<br/><br/>
<font size='16' color='#6AA84F'>Local Sunset</font>
<br/>
<font size='20' color='#FF0000'>" + ([_sunTimes select 1, "HH:MM"] call BIS_fnc_timeToString) + "</font>
<br/><br/>
";
player createDiaryRecord ["Status", ["MDS - INTEL - ENVIRONMENT", _text]]; private _sunriseColor = "#4A86E8";
private _sunsetColor = "#6AA84F";
private _whiteColor = "#FFFFFF";
private _sunTimes = date call BIS_fnc_sunriseSunsetTime;
_text pushBack format[
"<font size='%1' color='%2'>Local Sunrise</font><br/>
<font size='%3' color='%4'>%5</font><br/><br/>",
milsim_fbcb2_recordTextHeaderSize,
_sunriseColor,
milsim_fbcb2_recordTextBodySize,
_whiteColor,
([_sunTimes select 0, "HH:MM"] call BIS_fnc_timeToString)
];
_text pushBack format[
"<font size='%1' color='%2'>Local Sunset</font><br/>
<font size='%3' color='%4'>%5</font><br/><br/>",
milsim_fbcb2_recordTextHeaderSize,
_sunsetColor,
milsim_fbcb2_recordTextBodySize,
_whiteColor,
([_sunTimes select 1, "HH:MM"] call BIS_fnc_timeToString)
];
_text = _text joinString "";
[ [
milsim_fbcb2_subjectIntelID, milsim_fbcb2_subjectIntelID,

View File

@@ -1,4 +1,6 @@
_assetList = missionNamespace getVariable "milsim_var_fixedAssets"; private _recordTitle = "MDS - ASSETS - FIXED";
private _assetList = missionNamespace getVariable "milsim_var_fixedAssets";
_text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>"; _text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>";
@@ -14,6 +16,11 @@ _text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ----
} foreach _assetList; } foreach _assetList;
_text = _text + "<br/><br/><execute expression='[missionNamespace getVariable ""milsim_var_fixedAssets""] call milsim_fnc_messageFBCB2AssetStatus'>Run Report on local node?</execute>"; _text = _text + "<br/><br/><execute expression='[missionNamespace getVariable ""milsim_var_fixedAssets""] call milsim_fnc_hintFBCB2AssetStatus'>Run Report on local node?</execute>";
player createDiaryRecord ["Status", ["MDS - ASSETS - FIXED", _text]];
[
milsim_fbcb2_subjectStatusID,
_recordTitle,
_text
] call milsim_fnc_createOrUpdateDiaryRecord;

View File

@@ -1,16 +1,15 @@
// updated 2024-02-01 by IndigoFox // updated 2024-02-01 by IndigoFox
// now reads from the battalion config structure // now reads from the battalion config structure to generate the diary entries
private _addToAllText = {
params [["_lines", []]];
_allText pushBack (_lines joinString "<br/>");
};
//////////////////////////////////////// ////////////////////////////////////////
// Get info from missionConfigFile
////////////////////////////////////////
private _battalionInfoCfg = call milsim_fnc_getBattalionCfg; private _battalionInfoCfg = call milsim_fnc_getBattalionCfg;
private _battalionElementCfgs = [_battalionInfoCfg >> "Command"] call BIS_fnc_returnChildren; private _battalionElementCfgs = [_battalionInfoCfg >> "Command"] call BIS_fnc_returnChildren;
////////////////////////////////////////
// Define formatting constants
////////////////////////////////////////
private _ELEMENT_NAME_SIZE = 10; private _ELEMENT_NAME_SIZE = 10;
private _ELEMENT_NAME_FONT = "EtelkaMonospaceProBold"; private _ELEMENT_NAME_FONT = "EtelkaMonospaceProBold";
private _ELEMENT_FREQ_SIZE = 9; private _ELEMENT_FREQ_SIZE = 9;
@@ -18,21 +17,17 @@ private _ELEMENT_FREQ_FONT = "EtelkaMonospacePro";
private _FREQ_INDENT_CONSTANT = 6; private _FREQ_INDENT_CONSTANT = 6;
private _FREQ_PAD_LENGTH = 17; private _FREQ_PAD_LENGTH = 17;
private _FREQ_TEXT_COLOR = "#CCCCCC"; private _FREQ_TEXT_COLOR = "#CCCCCC";
// Note: Element colors are defined in the battalion config
////////////////////////////////////////
// ADD DIARY ENTRIES
////////////////////////////////////////
private _freqLeadingSpace = [ // First is all the battalion-level elements beneath command
format["<font size='%1' face='%2'>| ", _ELEMENT_NAME_SIZE, _ELEMENT_NAME_FONT] // To have the records listed in the order they appear in the battalion config, we need to reverse the array
]; // Since each entry is added to the top of the list, this will result in the entries being added in the correct order
for "_i" from 1 to _FREQ_INDENT_CONSTANT do {
_freqLeadingSpace pushBack " ";
};
_freqLeadingSpace pushBack "</font>";
_freqLeadingSpace = _freqLeadingSpace joinString "";
// reverse the list so diary records are filed in the correct order
reverse _battalionElementCfgs; reverse _battalionElementCfgs;
{ {
// recursively generate diary text for all child elements of battalion-level elements // recursively generate diary text for all child elements of battalion-level elements
private _diaryTitleText = [_x, true] call milsim_fnc_generateElementFrequencyRecordText; private _diaryTitleText = [_x, true] call milsim_fnc_generateElementFrequencyRecordText;
@@ -51,3 +46,5 @@ private _diaryTitleText = [_battalionInfoCfg >> "Command", false] call milsim_fn
_diaryTitleText#0, _diaryTitleText#0,
_diaryTitleText#1 _diaryTitleText#1
] call milsim_fnc_createOrUpdateDiaryRecord; ] call milsim_fnc_createOrUpdateDiaryRecord;
true;

View File

@@ -1,4 +1,6 @@
_assetList = missionNamespace getVariable "milsim_var_rotaryAssets"; private _recordTitle = "MDS - ASSETS - ROTARY";
_assetList = missionNamespace getVariable "milsim_var_rotaryAssets";
_text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>"; _text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>";
@@ -14,6 +16,11 @@ _text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ----
} foreach _assetList; } foreach _assetList;
_text = _text + "<br/><br/><execute expression='[missionNamespace getVariable ""milsim_var_rotaryAssets""] call milsim_fnc_messageFBCB2AssetStatus'>Run Report on local node?</execute>"; _text = _text + "<br/><br/><execute expression='[missionNamespace getVariable ""milsim_var_rotaryAssets""] call milsim_fnc_hintFBCB2AssetStatus'>Run Report on local node?</execute>";
player createDiaryRecord ["Status", ["MDS - ASSETS - ROTARY", _text]];
[
milsim_fbcb2_subjectStatusID,
_recordTitle,
_text
] call milsim_fnc_createOrUpdateDiaryRecord;

View File

@@ -1,30 +1,41 @@
private _recordTitle = "MDS - INTEL - SMOKES";
_text = " private _text = [
<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font> // Title
<br/><br/> format[
Smoke is a Guideline Not a Rule "<font size='%1' color='%2' face='%3'>%4</font>",
<br/><br/> milsim_fbcb2_recordTitleSize,
<font color='#FFFFFF' size='16'>WHITE</font><br/> milsim_fbcb2_recordTitleColor,
Concealment milsim_fbcb2_recordTitleFont,
<br/><br/> _recordTitle
<font color='#008800' size='16'>GREEN</font><br/> ]
Friendly Forces ];
<br/><br/>
<font color='#0000FF' size='16'>BLUE</font><br/>
LZ Markers
<br/><br/>
<font color='#FF0000' size='16'>RED</font><br/>
Enemy Location
<br/><br/>
<font color='#FFA500' size='16'>ORANGE</font><br/>
Resupply Marker
<br/><br/>
<font color='#FFFF00' size='16'>YELLOW</font><br/>
Medical Emergency
<br/><br/>
<font color='#800080' size='16'>PURPLE</font><br/>
Broken Arrow - 100m radius
<br/><br/>
";
player createDiaryRecord ["Status", ["MDS - INTEL - SMOKES", _text]]; private _smokeColors = [
["#FFFFFF", "WHITE", "Concealment"],
["#008800", "GREEN", "Friendly Forces"],
["#0000FF", "BLUE", "LZ Markers"],
["#FF0000", "RED", "Enemy Location"],
["#FFA500", "ORANGE", "Resupply Marker"],
["#FFFF00", "YELLOW", "Medical Emergency"],
["#800080", "PURPLE", "Broken Arrow - 100m radius"]
];
{
_x params ["_color", "_name", "_description"];
_text pushBack format[
"<font size='%1'><font color='%2'>%3</font> - %4</font>",
milsim_fbcb2_recordTextHeaderSize,
_color,
_name,
_description
];
} forEach _smokeColors;
_text = _text joinString "<br/><br/>";
[
milsim_fbcb2_subjectIntelID,
_recordTitle,
_text
] call milsim_fnc_createOrUpdateDiaryRecord;

View File

@@ -1,6 +1,9 @@
// called from milsim_fnc_processFBCB2RadioFrequencies // called from milsim_fnc_processFBCB2RadioFrequencies
params ["_cfg", ["_indentCount", 1, [5]]]; params ["_cfg", ["_indentCount", 1, [5]]];
//////////////////////////////////////////////////////
// Define leading space/hyphenation for element name
//////////////////////////////////////////////////////
private _leadingSpace = [ private _leadingSpace = [
format["<font size='%1' face='%2'>| ", _ELEMENT_NAME_SIZE, _ELEMENT_NAME_FONT] format["<font size='%1' face='%2'>| ", _ELEMENT_NAME_SIZE, _ELEMENT_NAME_FONT]
]; ];
@@ -9,7 +12,9 @@ for "_i" from 1 to _indentCount do {
}; };
_leadingSpace pushBack " | </font>"; _leadingSpace pushBack " | </font>";
// make header line /////////////////////////////////////////////////////////
// Create the header line for the provided config entry
/////////////////////////////////////////////////////////
private _lines = [ private _lines = [
format[ format[
"<font color='%1'>%2%3</font>", "<font color='%1'>%2%3</font>",
@@ -19,7 +24,11 @@ private _lines = [
] ]
]; ];
// make frequency lines ////////////////////////////////////////////////////////////
// Create the frequency lines for the provided config entry
////////////////////////////////////////////////////////////
// Generate leading space
private _freqLeadingSpace = [ private _freqLeadingSpace = [
format["<font size='%1' face='%2'>| ", _ELEMENT_NAME_SIZE, _ELEMENT_NAME_FONT] format["<font size='%1' face='%2'>| ", _ELEMENT_NAME_SIZE, _ELEMENT_NAME_FONT]
]; ];
@@ -29,6 +38,7 @@ for "_i" from 1 to _FREQ_INDENT_CONSTANT do {
_freqLeadingSpace pushBack "</font>"; _freqLeadingSpace pushBack "</font>";
_freqLeadingSpace = _freqLeadingSpace joinString ""; _freqLeadingSpace = _freqLeadingSpace joinString "";
// Process config values for frequencies
{ {
_x params ["_role", "_sr", "_lr"]; _x params ["_role", "_sr", "_lr"];
@@ -45,7 +55,7 @@ _freqLeadingSpace = _freqLeadingSpace joinString "";
_lrStr = "----"; _lrStr = "----";
}; };
// Add formatted line to the array
_lines pushBack format[ _lines pushBack format[
"%1<font size='%2' face='%3' color='%4'>- %5%6%7</font>", "%1<font size='%2' face='%3' color='%4'>- %5%6%7</font>",
_freqLeadingSpace, _freqLeadingSpace,
@@ -59,4 +69,5 @@ _freqLeadingSpace = _freqLeadingSpace joinString "";
} forEach (getArray (_cfg >> "frequencies")); } forEach (getArray (_cfg >> "frequencies"));
// diag_log text (_lines joinString endl); // diag_log text (_lines joinString endl);
// Return the formatted lines in ARRAY format
_lines; _lines;

View File

@@ -1,4 +1,5 @@
// called from milsim_fnc_processFBCB2RadioFrequencies // called from milsim_fnc_processFBCB2RadioFrequencies ONLY
// this function is called recursively to process all child elements of a battalion element in missionConfigFile
params [ params [
["_elementCfg", configNull, [configNull]], ["_elementCfg", configNull, [configNull]],
["_shouldProcessChildCfgs", true] ["_shouldProcessChildCfgs", true]
@@ -8,8 +9,10 @@ if (isNull _elementCfg) exitWith {
["_elementCfg parameter is NULL"] call BIS_fnc_error; ["_elementCfg parameter is NULL"] call BIS_fnc_error;
}; };
// change reference variable for clarity
private _battalionElement = _elementCfg; private _battalionElement = _elementCfg;
// Generate title from callsign and shortDescription
private _recordTitle = format[ private _recordTitle = format[
"%1 (%2)", "%1 (%2)",
getText(_battalionElement >> "callsign"), getText(_battalionElement >> "callsign"),
@@ -17,16 +20,33 @@ private _recordTitle = format[
]; ];
// systemChat _recordTitle; // systemChat _recordTitle;
//////////////////////////////////////////////////////////
// Generate frequency table header line's leading space
//////////////////////////////////////////////////////////
private _freqLeadingSpace = [
format["<font size='%1' face='%2'>| ", _ELEMENT_NAME_SIZE, _ELEMENT_NAME_FONT]
];
for "_i" from 1 to _FREQ_INDENT_CONSTANT do {
_freqLeadingSpace pushBack " ";
};
_freqLeadingSpace pushBack "</font>";
_freqLeadingSpace = _freqLeadingSpace joinString "";
//////////////////////////////////////////////////////////
// Generate header line and frequency table header line
//////////////////////////////////////////////////////////
private _headers = [ private _headers = [
format[ format[
"<font size='%1' color='%2' face='%3'>%4</font><br/><br/>", "<font size='%1' color='%2' face='%3'>%4</font>",
milsim_fbcb2_recordTitleSize, milsim_fbcb2_recordTitleSize,
milsim_fbcb2_recordTitleColor, milsim_fbcb2_recordTitleColor,
milsim_fbcb2_recordTitleFont, milsim_fbcb2_recordTitleFont,
_recordTitle _recordTitle
], ],
format[ format[
"%1<font size='%2' face='%3' color='%4'>- %5%6%7</font><br/><br/>", "%1<font size='%2' face='%3' color='%4'>- %5%6%7</font>",
_freqLeadingSpace, _freqLeadingSpace,
_ELEMENT_FREQ_SIZE, _ELEMENT_FREQ_SIZE,
_ELEMENT_FREQ_FONT, _ELEMENT_FREQ_FONT,
@@ -37,6 +57,10 @@ private _headers = [
] ]
]; ];
//////////////////////////////////////////////////////////
// Generate the list of element headers and frequencies
//////////////////////////////////////////////////////////
private _allText = []; private _allText = [];
// get all child elements recursively and format them // get all child elements recursively and format them
@@ -49,12 +73,15 @@ if (_shouldProcessChildCfgs) then {
_allText pushBack (_lines joinString "<br/>"); _allText pushBack (_lines joinString "<br/>");
}] call milsim_fnc_recurseSubclasses; }] call milsim_fnc_recurseSubclasses;
} else { } else {
// or if the param was false, just add the battalion element
private _lines = [_battalionElement, 1] call milsim_fnc_formatRadioElementForDiary; private _lines = [_battalionElement, 1] call milsim_fnc_formatRadioElementForDiary;
// private _lines = [_cfg, _indentCount] call t; // private _lines = [_cfg, _indentCount] call t;
_allText pushBack (_lines joinString "<br/>"); _allText pushBack (_lines joinString "<br/>");
}; };
// add headers, add all other lines and format them as monospace
_allText = format[
"%1<br/><br/><font face='EtelkaMonospaceProBold'>%2</font>", _headers joinString "<br/>", _allText joinString "<br/><br/>"];
_allText = format["%1<font face='EtelkaMonospaceProBold'>%2</font>", _headers joinString "<br/>", _allText joinString "<br/>"]; // return the title and all text
[_recordTitle, _allText]; [_recordTitle, _allText];

View File

@@ -1,5 +1,14 @@
if ( !hasInterface ) exitWith {}; if ( !hasInterface ) exitWith {};
if (!isServer) then {
["milsim_logText", {
params [["_strArray", [""], [[]]]];
{
diag_log text _x;
} forEach _strArray;
}] call CBA_fnc_addEventHandler;
};
// define milsim_resupply_crateDefinitions // define milsim_resupply_crateDefinitions
call milsim_fnc_crateDefinitions; call milsim_fnc_crateDefinitions;

View File

@@ -4,7 +4,7 @@ if (!isServer) exitWith {};
call milsim_fnc_crateDefinitions; call milsim_fnc_crateDefinitions;
_fixedAssets = [ _fixedAssets = [
["Ares", "USAF_A10", 0], ["Ares", "B_Plane_CAS_01_Cluster_F", 0],
["Odyssey", "RHSGREF_A29B_HIDF", 0], ["Odyssey", "RHSGREF_A29B_HIDF", 0],
["Hercules", "USAF_C130J", 0] ["Hercules", "USAF_C130J", 0]
@@ -58,7 +58,12 @@ publicVariable "milsim_var_rotaryAssets";
// Initializes the Dynamic Groups framework and groups // Initializes the Dynamic Groups framework and groups
["Initialize", [true]] call BIS_fnc_dynamicGroups; ["Initialize", [true]] call BIS_fnc_dynamicGroups;
["milsim_logText", {
params [["_strArray", [""], [[]]]];
{
diag_log text _x;
} forEach _strArray;
}] call CBA_fnc_addEventHandler;
missionNamespace setVariable ["milsim_complete", true]; missionNamespace setVariable ["milsim_complete", true];
diag_log text "[MILSIM] (initServer) milsim_complete: version 2.3"; diag_log text "[MILSIM] (initServer) milsim_complete: version 2.3";

View File

@@ -1,56 +1,144 @@
/*
Function: milsim_fnc_logPlayerInventory
Description:
Checks a player's inventory for non-compliant items and logs results to all machines.
Author: Hizumi, EagleTrooper, IndigoFox
Parameters:
0: _player - <OBJECT> - Player to check inventory of.
Returns:
<ARRAY> - Array of strings to be logged.
*/
params [ params [
["_player", objNull, [objNull]] ["_player", objNull, [objNull]]
]; ];
if (!isPlayer _player) exitWith { diag_log("exitWith logPlayerInventory")}; if (!isPlayer _player) exitWith {
[
"logPlayerInventory",
"PARAM PLAYER IS NOT A PLAYER",
[["player", _player]]
] call milsim_fnc_log;
};
_items = []; // testing
_items append uniformItems _player; // test_old = compile preprocessFileLineNumbers "testold.sqf";
_items append vestItems _player; // test_new = compile preprocessFileLineNumbers "testnew.sqf";
_items append backpackItems _player; // player addItem "A3_GPNVG18_BLK_TI";
_items pushback hmd _player; // player addWeapon "SMA_HK417_16in";
_items pushback binocular _player; // player addItem "ej_VPS15";
_items append primaryWeaponItems _player; // player addItem "ACE_Banana";
_noncompliant = []; // INSTANTIATE VARS
_unlisted = []; private _foundItemsKeyValue = [];
private _allFoundItemsSoFar = [];
{ // GET PLAYER ITEMS
_item = _x; private _playerItems = [
_modes = getArray(configfile >> "CfgWeapons" >> _item >> "visionMode"); _player, // Unit
true, // Include weapons, attachments, loaded magazines
true, // Include items in backpack
true, // Include items in vest
true, // Include items in uniform
true, // Include assigned items
true // Include not loaded magazines
] call CBA_fnc_uniqueUnitItems;
_subModes = [configfile >> "CfgWeapons" >> _item >> "ItemInfo" >> "OpticsModes", 1] call BIS_fnc_returnChildren; _playerItems pushBack (headgear _player);
_playerItems pushBack (uniform _player);
[
"logPlayerInventory",
"CHECKING PLAYER INVENTORY",
[_player] call milsim_fnc_addPlayerInfoToArray
] call milsim_fnc_log;
////////////////////////////////////////
// HARDCODED DISALLOWED ITEMS - see functions/definitions/DisallowedEquipment.hpp
// Get parent class
private _disallowedEquipmentCfg = (missionConfigFile >> "DisallowedEquipment");
// Get all subclasses
private _definitionCfgs = (_disallowedEquipmentCfg call BIS_fnc_getCfgSubClasses) apply {
(_disallowedEquipmentCfg >> _x)
};
// diag_log text format["DEFINITION CFGS: %1", _definitionCfgs];
// Check all items
{ // forEach _subclassesCfgs
private _definitionCfg = _x;
private _definitionLabel = (_definitionCfg >> "label") call BIS_fnc_getCfgData;
private _definitionItems = (_definitionCfg >> "items") call BIS_fnc_getCfgDataArray;
// diag_log text format["DEF ITEMS: %1", _definitionItems];
{ // forEach _playerItems
private _playerItem = _x;
// diag_log text format["PLAYER ITEM: %1", _playerItem];
if (_playerItem in _definitionItems && not (_playerItem in _allFoundItemsSoFar)) then {
// add under def label
[_foundItemsKeyValue, _definitionLabel, _playerItem] call BIS_fnc_addToPairs;
// add to all found items
_allFoundItemsSoFar pushBackUnique _playerItem;
};
} forEach _playerItems;
} forEach _definitionCfgs;
////////////////////////////////////////
// UNLISTED THERMAL - Any item with thermal capabilities that is not already in the list
// Identify thermal items in the player list
private _thermalItems = _playerItems select {
private _playerItem = _x;
private _modes = getArray(configfile >> "CfgWeapons" >> _playerItem >> "visionMode");
private _subModes = [configfile >> "CfgWeapons" >> _playerItem >> "ItemInfo" >> "OpticsModes", 1] call BIS_fnc_returnChildren;
{ {
_modes append getArray( _x >> "visionMode" ); _modes append getArray( _x >> "visionMode" );
} forEach _subModes; } forEach _subModes;
_restrictedItemList = ["A3_GPNVG18b_REC_TI","A3_GPNVG18_REC_TI","A3_GPNVG18b_TI","A3_GPNVG18_TI","A3_GPNVG18b_REC_BLK_TI","A3_GPNVG18_REC_BLK_TI","A3_GPNVG18b_BLK_TI","A3_GPNVG18_BLK_TI","NVGogglesB_gry_F","NVGogglesB_grn_F","NVGogglesB_blk_F","optic_Nightstalker","rhsusf_acc_anpas13gv1","Tier1_ANPVS10_Tan","rhsusf_acc_anpvs27","optic_tws_mg","optic_tws"];
if ( _x in _restrictedItemList ) then {
_noncompliant pushBackUnique _item;
};
if ((count _modes) isNotEqualTo 0) then { if ((count _modes) isNotEqualTo 0) then {
_modes = _modes apply { toLower _x }; // if the item has thermal capabilities and is not in the list anywhere else, include it
if ( "ti" in _modes ) then { "ti" in (_modes apply { toLower _x }) && not (_playerItem in _allFoundItemsSoFar);
_unlisted pushBackUnique _item; } else {
false;
}; };
};
} forEach _items;
{
diag_log text format["[MILSIM] (logPlayerInventory): %1 has a restricted inventory item: %2", name _player, getText( configfile >> "CfgWeapons" >> _x >> "displayName" )];
} forEach _noncompliant;
{
diag_log text format["[MILSIM] (logPlayerInventory): %1 has an unlisted thermal item: %2", name _player, getText( configfile >> "CfgWeapons" >> _x >> "displayName" )];
} forEach _unlisted;
if (((count _noncompliant) isEqualTo 0) && ((count _unlisted) isEqualTo 0)) then {
diag_log text format["[MILSIM] (logPlayerInventory): %1 inventory in compliance", name _player];
}; };
nil {
[_foundItemsKeyValue, "UNLISTED THERMAL", _x] call BIS_fnc_addToPairs;
} forEach _thermalItems;
// Only log compliance message if no non-compliant items were found
if (count _allFoundItemsSoFar isEqualTo 0) exitWith {
[
"logPlayerInventory",
"PLAYER INVENTORY IS COMPLIANT",
[_player] call milsim_fnc_addPlayerInfoToArray
] call milsim_fnc_log;
};
// Log all non-compliant items
{
_x params ["_categoryLabel", "_items"];
if (typeName _items isEqualTo "STRING") then {
_items = [_items];
};
{
private _itemClassName = _x;
private _itemConfig = _itemClassName call CBA_fnc_getItemConfig;
// Log to RPT
[
"logPlayerInventory",
"NON-COMPLIANT ITEM",
[_player, [
["category", _categoryLabel],
["className", _itemClassName],
["displayName", [_itemConfig] call BIS_fnc_displayName]
]] call milsim_fnc_addPlayerInfoToArray
] call milsim_fnc_log;
} forEach _items;
} forEach _foundItemsKeyValue;

View File

@@ -18,7 +18,11 @@ params [
private _hash = createHashMapFromArray _data; private _hash = createHashMapFromArray _data;
// Replace square brackets with round brackets to avoid parsing issues.
_message regexReplace ["\[", "("];
_message regexReplace ["\]", ")"];
private _json = [_hash] call CBA_fnc_encodeJSON; private _json = [_hash] call CBA_fnc_encodeJSON;
_log = format ["[milsim] (%1) (%2) (%3) :: %4", _component, _fnc_scriptNameParent, _message, _json]; _log = format ["[milsim] [%1] [%2] [%3] :: %4", _component, _fnc_scriptNameParent, _message, _json];
diag_log text _log; diag_log text _log;