Compare commits
1 Commits
3.1.1
...
9fc926619e
| Author | SHA1 | Date | |
|---|---|---|---|
|
9fc926619e
|
15
CHANGELOG.md
15
CHANGELOG.md
@@ -4,21 +4,6 @@ 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).
|
||||
|
||||
## [3.1.1] - 2024-01-04
|
||||
|
||||
### Changed
|
||||
- Spelling Fixes
|
||||
- Update class binding for vehicle flag interaction
|
||||
|
||||
## [3.1.0] - 2023-12-17
|
||||
|
||||
### Added
|
||||
|
||||
- Vehicles now have an ace interaction to allow the mounting of flags onto them for identification. Contributed by IndigoFox
|
||||
- Added inventory validation checks
|
||||
- Added empty group removal code due to ownership issues on entity transfers
|
||||
- Added medical card visibility to medics for triage purposes
|
||||
|
||||
## [3.0.2] - 2023-10-14
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -33,14 +33,12 @@ class milsim
|
||||
class bindVehicleActions { postInit = 1; };
|
||||
class addClientStatsPFH {};
|
||||
class calculateClientStats {};
|
||||
class initVehicleFlags { postInit = 1; };
|
||||
class bindEmptyGroupGarbageCleanup { postInit = 1; };
|
||||
class medicalTriageState3D {postInit = 1;};
|
||||
};
|
||||
|
||||
class server {
|
||||
class addServerStatsPFH {};
|
||||
class calculateServerStats {};
|
||||
class logPlayerInventory {};
|
||||
};
|
||||
|
||||
class resupply {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
diag_log text format ["[MILSIM] (client) initializing empty group deletion PFH"];
|
||||
|
||||
_emptyGroupPFH = [
|
||||
{
|
||||
{
|
||||
if (local _x) then {
|
||||
if ((count units _x) == 0) then {
|
||||
deleteGroup _x;
|
||||
};
|
||||
};
|
||||
} forEach allGroups;
|
||||
},
|
||||
300,
|
||||
[],
|
||||
{ diag_log text format ["[MILSIM] (client) Empty Group Deletion PFH loaded"] },
|
||||
{ diag_log text format ["[MILSIM] (client) Empty Group Deletion"] },
|
||||
{ true },
|
||||
{ false },
|
||||
[]
|
||||
] call CBA_fnc_createPerFrameHandlerObject;
|
||||
|
||||
|
||||
|
||||
@@ -38,14 +38,6 @@ addMissionEventHandler ["HandleChatMessage",
|
||||
];
|
||||
|
||||
|
||||
["ace_arsenal_displayClosed", {
|
||||
player remoteExec["milsim_fnc_logPlayerInventory", 0];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[missionNamespace, "arsenalClosed", {
|
||||
player remoteExec["milsim_fnc_logPlayerInventory", 0];
|
||||
}] call BIS_fnc_addScriptedEventHandler;
|
||||
|
||||
diag_log text "[MILSIM] (client) event handlers bound";
|
||||
|
||||
nil;
|
||||
@@ -1,197 +0,0 @@
|
||||
milsim_vehicleflag_options = [
|
||||
["Chevron IDs", [
|
||||
["flag_chevron_id1", createHashMapFromArray [
|
||||
["Title", "Flag 1"],
|
||||
["Texture", "textures\flag_number\flag_id_1_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id2", createHashMapFromArray [
|
||||
["Title", "Flag 2"],
|
||||
["Texture", "textures\flag_number\flag_id_2_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id3", createHashMapFromArray [
|
||||
["Title", "Flag 3"],
|
||||
["Texture", "textures\flag_number\flag_id_3_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id4", createHashMapFromArray [
|
||||
["Title", "Flag 4"],
|
||||
["Texture", "textures\flag_number\flag_id_4_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id5", createHashMapFromArray [
|
||||
["Title", "Flag 5"],
|
||||
["Texture", "textures\flag_number\flag_id_5_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id6", createHashMapFromArray [
|
||||
["Title", "Flag 6"],
|
||||
["Texture", "textures\flag_number\flag_id_6_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id7", createHashMapFromArray [
|
||||
["Title", "Flag 7"],
|
||||
["Texture", "textures\flag_number\flag_id_7_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id8", createHashMapFromArray [
|
||||
["Title", "Flag 8"],
|
||||
["Texture", "textures\flag_number\flag_id_8_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id9", createHashMapFromArray [
|
||||
["Title", "Flag 9"],
|
||||
["Texture", "textures\flag_number\flag_id_9_co.paa"]
|
||||
]],
|
||||
["flag_chevron_id10", createHashMapFromArray [
|
||||
["Title", "Flag 10"],
|
||||
["Texture", "textures\flag_number\flag_id_10_co.paa"]
|
||||
]],
|
||||
["flag_chevron_hq", createHashMapFromArray [
|
||||
["Title", "Flag HQ"],
|
||||
["Texture", "textures\flag_number\flag_id_hq_co.paa"]
|
||||
]]
|
||||
]],
|
||||
["Simple Shapes", [
|
||||
["flag_simpleshape_greenoctagon", createHashMapFromArray [
|
||||
["Title", "Green Octagon"],
|
||||
["Texture", "textures\simple_shape\flag_simpleshape_greenoctagon_co.paa"]
|
||||
]],
|
||||
["flag_simpleshape_bluecircle", createHashMapFromArray [
|
||||
["Title", "Blue Circle"],
|
||||
["Texture", "textures\simple_shape\flag_simpleshape_bluecircle_co.paa"]
|
||||
]],
|
||||
["flag_simpleshape_orangesquare", createHashMapFromArray [
|
||||
["Title", "Orange Square"],
|
||||
["Texture", "textures\simple_shape\flag_simpleshape_orangesquare_co.paa"]
|
||||
]],
|
||||
["flag_simpleshape_pinktriangle", createHashMapFromArray[
|
||||
["Title", "Pink Triangle"],
|
||||
["Texture", "textures\simple_shape\flag_simpleshape_pinktriangle_co.paa"]
|
||||
]],
|
||||
["flag_simpleshape_redpentagon", createHashMapFromArray [
|
||||
["Title", "Red Pentagon"],
|
||||
["Texture", "textures\simple_shape\flag_simpleshape_redpentagon_co.paa"]
|
||||
]]
|
||||
]],
|
||||
["Miscellaneous", [
|
||||
["flag_17th_emblem", createHashMapFromArray [
|
||||
["Title", "17th Emblem"],
|
||||
["Texture", "textures\flags_misc\flag_17th_emblem_co.paa"]
|
||||
]],
|
||||
["flag_redcross", createHashMapFromArray [
|
||||
["Title", "Red Cross"],
|
||||
["Texture", "textures\flags_misc\flag_redcross_co.paa"]
|
||||
]]
|
||||
]]
|
||||
];
|
||||
|
||||
|
||||
private _appliedParentClasses = [
|
||||
"LandVehicle",
|
||||
"Helicopter"
|
||||
];
|
||||
|
||||
{
|
||||
private _parentClass = _x;
|
||||
[_parentClass, "InitPost", {
|
||||
private _flagActionID = "SetVehicleFlag";
|
||||
private _flagMasterAction = [
|
||||
_flagActionID, // id
|
||||
"Set Vehicle Flag", // displayed title
|
||||
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
|
||||
{true}, // statement
|
||||
{true}, // condition
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
private _flagActionID = _params#0;
|
||||
private _actions = [];
|
||||
{
|
||||
_x params ["_flagCategory", "_flagOptions"];
|
||||
// diag_log format ["NewFlagCategory: %1 %2", _flagCategory, _flagOptions];
|
||||
|
||||
private _flagCategoryOption = [
|
||||
_flagActionID + "_" + _flagCategory, // id
|
||||
_flagCategory, // displayed title
|
||||
(_flagOptions#0#1) get "Texture", // flag icon
|
||||
{true}, // statement
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
alive _target;
|
||||
// true;
|
||||
}, // condition
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
_params params ["_flagActionID", "_flagCategoryID", "_flagOptions"];
|
||||
private _categoryOptions = [];
|
||||
{
|
||||
_x params ["_flagOptionID", "_flagOptionData"];
|
||||
// diag_log format ["NewFlagOption: %1 %2", _flagOptionID, _flagOptionData];
|
||||
private _newFlagOption = [
|
||||
_flagActionID + "_" + _flagCategory + "_" + _flagOptionID, // id
|
||||
_flagOptionData get "Title", // displayed title
|
||||
_flagOptionData get "Texture", // flag icon
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
_target forceFlagTexture (_params select 2);
|
||||
}, // statement
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
alive _target;
|
||||
// true;
|
||||
}, // condition
|
||||
nil, // child code
|
||||
[_flagActionID, _flagCategoryID, getMissionPath (_flagOptionData get "Texture")], // params
|
||||
nil, // position
|
||||
4, // distance
|
||||
[false, false, false, false, false] // other params
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
_categoryOptions pushBack [_newFlagOption, [], _target];
|
||||
} forEach _flagOptions;
|
||||
_categoryOptions;
|
||||
}, // child code
|
||||
[_flagActionID, _flagCategoryID, _flagOptions], // params
|
||||
nil, // position
|
||||
4, // distance
|
||||
[false, false, false, false, false], // other params
|
||||
nil // modifier function code
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
_actions pushBack [_flagCategoryOption, [], _target];
|
||||
} forEach milsim_vehicleflag_options;
|
||||
|
||||
_actions;
|
||||
}, // child code
|
||||
[_flagActionID], // params
|
||||
nil, // position
|
||||
4, // distance
|
||||
[false, false, false, false, false], // other params
|
||||
nil // modifier function code
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
// add action to add flag
|
||||
[
|
||||
(_this select 0), // object
|
||||
0, // action 0 or self-action 1
|
||||
["ACE_MainActions"], // parent
|
||||
_flagMasterAction // action
|
||||
] call ace_interact_menu_fnc_addActionToObject;
|
||||
|
||||
|
||||
// add action to remove flag
|
||||
private _removeFlagAction = [
|
||||
_flagActionID + "_removeflag", // id
|
||||
"Remove Flag", // displayed title
|
||||
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
_target forceFlagTexture "";
|
||||
}, // statement
|
||||
{true}, // condition
|
||||
nil // child code
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
[
|
||||
(_this select 0), // object
|
||||
0, // action 0 or self-action 1
|
||||
["ACE_MainActions", _flagActionID], // parent
|
||||
_removeFlagAction // action
|
||||
] call ace_interact_menu_fnc_addActionToObject;
|
||||
|
||||
}, true, [], true] call CBA_fnc_addClassEventHandler;
|
||||
} forEach _appliedParentClasses;
|
||||
|
||||
nil;
|
||||
87
functions/client/fn_medicalTriageState3D.sqf
Normal file
87
functions/client/fn_medicalTriageState3D.sqf
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
|
||||
milsim_fnc_medicalTriageState3D
|
||||
|
||||
Author: IndigoFox
|
||||
|
||||
Description:
|
||||
Affects players with medical permissions. Will see a 3D colored dot over nearby (5-10m)
|
||||
unconscious players who are not in a vehicle
|
||||
which indicates their current ACE Triage Card status.
|
||||
Designed to increase efficiency of CCPs.
|
||||
|
||||
*/
|
||||
|
||||
// Add setting
|
||||
[
|
||||
"milsim_client_medState3D_enabled", // variable
|
||||
"CHECKBOX", // type
|
||||
["Enable 3D Triage Card State", "Draws a colored dot over units within 10m indicating current ACE Triage State"], // title
|
||||
"17th Batallion", // category
|
||||
true // default value
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
|
||||
// Force setting if CBA doesn't work?
|
||||
if (isNil "milsim_client_medState3D_enabled") then {
|
||||
milsim_client_medState3D_enabled = true;
|
||||
};
|
||||
|
||||
// List of units to draw icons for
|
||||
milsim_client_medState3D_drawTargets = [];
|
||||
// Range to draw icons for
|
||||
milsim_client_medState3D_drawRange = 10;
|
||||
|
||||
// ACE Triage colors, for consistency across UIs and functions
|
||||
// #define TRIAGE_COLOR_NONE 0.5, 0.5, 0.5, 0.1
|
||||
// #define TRIAGE_COLOR_MINIMAL 0, 0.5, 0, 0.9
|
||||
// #define TRIAGE_COLOR_DELAYED 1, 0.84, 0, 0.9
|
||||
// #define TRIAGE_COLOR_IMMEDIATE 1, 0, 0, 0.9
|
||||
// #define TRIAGE_COLOR_DECEASED 0, 0, 0, 0.9
|
||||
|
||||
// ACE Triage colors, for consistency across UIs and functions
|
||||
milsim_client_medState3D_colors = [
|
||||
[0, 0.5, 0, 0.9], // TRIAGE_COLOR_MINIMAL
|
||||
[1, 0.84, 0, 0.9], // TRIAGE_COLOR_DELAYED
|
||||
[1, 0, 0, 0.9], // TRIAGE_COLOR_IMMEDIATE
|
||||
[0, 0, 0, 0.9], // TRIAGE_COLOR_DECEASED
|
||||
[0.5, 0.5, 0.5, 0] // TRIAGE_COLOR_NONE
|
||||
];
|
||||
|
||||
// Per-frame handler to draw icons
|
||||
milsim_client_medState3D_pfh = [{
|
||||
// if disabled, skip processing
|
||||
if (!milsim_client_medState3D_enabled) exitWith {};
|
||||
// if no targets, skip processing
|
||||
if (count milsim_client_medState3D_drawTargets == 0) exitWith {};
|
||||
if !([player] call ace_medical_treatment_fnc_isMedic) exitWith {};
|
||||
{
|
||||
// distance within 10 meters
|
||||
if (player distance _x > milsim_client_medState3D_drawRange) then {continue};
|
||||
// check unit not null, not conscious, and not in a vehicle
|
||||
if (
|
||||
!(_x getVariable ["ACE_isUnconscious", false]) ||
|
||||
!isNull (objectParent _x)
|
||||
) then {continue};
|
||||
|
||||
// color based on triage level
|
||||
private _color = milsim_client_medState3D_colors select ((_x getVariable ["ace_medical_triageLevel", -1]) -1);
|
||||
// draw position, slightly above the prone unit
|
||||
private _drawPos = (visiblePosition _x) vectorAdd [0, 0, 0.5];
|
||||
// draw icon
|
||||
drawIcon3D [
|
||||
"\A3\ui_f\data\map\markers\military\dot_CA.paa", // icon texture
|
||||
_color, // color
|
||||
_drawPos, // position AGL
|
||||
1, // width
|
||||
1, // height
|
||||
0 // angle
|
||||
// further params optional, omitted
|
||||
];
|
||||
} forEach milsim_client_medState3D_drawTargets;
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
["Man", "InitPost", {
|
||||
params ["_unit"];
|
||||
milsim_client_medState3D_drawTargets pushBack _unit;
|
||||
}, true, [], true] call CBA_fnc_addClassEventHandler;
|
||||
@@ -1,40 +0,0 @@
|
||||
|
||||
params [
|
||||
["_player", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (!isPlayer _player) exitWith { diag_log("exitWith inventotry")};
|
||||
|
||||
_items = [];
|
||||
_items append uniformItems _player;
|
||||
_items append vestItems _player;
|
||||
_items append backpackItems _player;
|
||||
_items pushback hmd _player;
|
||||
_items pushback binocular _player;
|
||||
_items append primaryWeaponItems _player;
|
||||
|
||||
{
|
||||
_item = _x;
|
||||
_modes = getArray(configfile >> "CfgWeapons" >> _item >> "visionMode");
|
||||
|
||||
_subModes = [configfile >> "CfgWeapons" >> _item >> "ItemInfo" >> "OpticsModes", 1] call BIS_fnc_returnChildren;
|
||||
|
||||
{
|
||||
_modes append getArray( _x >> "visionMode" );
|
||||
} 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 {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has a restricted inventory item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
||||
} else if ((count _modes) isNotEqualTo 0) then {
|
||||
_modes = _modes apply { toLower _x };
|
||||
if ( "ti" in _modes ) then {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has an unlisted thermal item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
||||
};
|
||||
} else {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 inventory in compliance", name _player];
|
||||
}
|
||||
} forEach _items;
|
||||
|
||||
nil
|
||||
@@ -6,7 +6,7 @@
|
||||
"milsim_sideChat",
|
||||
"CHECKBOX",
|
||||
"Side Chat Text Enabled",
|
||||
["17th Battalion", "Side Chat"],
|
||||
["17th Batallion", "Side Chat"],
|
||||
false,
|
||||
true,
|
||||
{
|
||||
@@ -25,7 +25,7 @@
|
||||
"milsim_server_cps_enable",
|
||||
"CHECKBOX",
|
||||
"CPS Metrics Enabled",
|
||||
["17th Battalion", "Server Metrics"],
|
||||
["17th Batallion", "Server Metrics"],
|
||||
true,
|
||||
true,
|
||||
{
|
||||
@@ -40,7 +40,7 @@
|
||||
"milsim_server_cps_interval",
|
||||
"TIME",
|
||||
"Metrics Interval",
|
||||
["17th Battalion", "Server Metrics"],
|
||||
["17th Batallion", "Server Metrics"],
|
||||
[60,300,120],
|
||||
true,
|
||||
{
|
||||
@@ -71,7 +71,7 @@
|
||||
"milsim_client_cps_enable",
|
||||
"CHECKBOX",
|
||||
"CPS Metrics Enabled",
|
||||
["17th Battalion", "Client Metrics"],
|
||||
["17th Batallion", "Client Metrics"],
|
||||
true,
|
||||
true,
|
||||
{
|
||||
@@ -86,7 +86,7 @@
|
||||
"milsim_client_cps_interval",
|
||||
"TIME",
|
||||
"CPS Metrics Interval",
|
||||
["17th Battalion", "Client Metrics"],
|
||||
["17th Batallion", "Client Metrics"],
|
||||
[60,300,120],
|
||||
true,
|
||||
{
|
||||
|
||||
@@ -6,8 +6,6 @@ onLoadMission = "THIS APPEARS BELOW THE LOADING SCREEN IMAGE";
|
||||
briefingName = "THIS IS THE NAME ON THE #MISSIONS LIST";
|
||||
overviewText = "THIS IS WHERE YOU DESCRIBE THE MISSION IN THE #MISSION LIST";
|
||||
|
||||
missionSeries = "";
|
||||
|
||||
// activate via #ace-fortify west base 2000
|
||||
|
||||
class ACEX_Fortify_Presets {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user