ready for dedi -- improvements to resupply, triageIcons too

This commit is contained in:
2024-02-06 17:36:01 -08:00
parent 0a64d9e170
commit 91b982e06e
44 changed files with 586 additions and 354 deletions

View File

@@ -22,29 +22,6 @@
[QGVARMAIN(sideChat), false] call CBA_settings_fnc_set;
//---------------------
// Medical Overlay
//---------------------
[
"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 Battalion", "Medical"], // category
true // default value
] call CBA_fnc_addSetting;
[
"milsim_client_medState3D_drawRange", // variable
"LIST", // type
["Range To Draw Icons", "Determines range at which dots are visible"], // title
["17th Battalion", "Medical"], // category
[[2, 4, 6, 8, 10], ["2", "4", "6", "8", "10"], 4] // option values, option labels, default index
] call CBA_fnc_addSetting;
diag_log text "[MILSIM] (settings) Custom CBA settings initialized";
nil;

View File

@@ -1,6 +1,6 @@
#include "..\script_component.hpp"
params [["_playerObj", objNull], ["_arrayToModify", [], [[]]]];
params [["_playerObj", objNull, [nil, objNull]], ["_arrayToModify", [], [[]]]];
if (isNull _playerObj) exitWith {_arrayToModify};
@@ -10,7 +10,7 @@ if (isNull _playerObj) exitWith {_arrayToModify};
["playerName", name _playerObj],
["playerUID", getPlayerUID _playerObj],
["playerGroup", groupId (group _playerObj)],
["playerNetID", [_playerObj] call BIS_fnc_netId]
["playerNetID", _playerObj call BIS_fnc_netId]
];
_arrayToModify;

View File

@@ -1,5 +1,5 @@
/*
Function: milsim_util_fnc_logPlayerInventory
Function: milsim_common_fnc_checkPlayerInventory
Description:
Checks a player's inventory for non-compliant items and logs results to all machines.
@@ -21,7 +21,7 @@ params [
if (!isPlayer _player) exitWith {
[
LEVEL_ERROR
LEVEL_ERROR,
QUOTE(COMPONENT),
"PARAM PLAYER IS NOT A PLAYER",
[["player", _player]]

View File

@@ -1,5 +1,5 @@
/*
Function: milsim_util_fnc_log
Function: milsim_common_fnc_log
Description:
Used to log messages to the server RPT file.
@@ -19,13 +19,13 @@ params [
["_data", [], [[]]]
];
if (_logLevel < LOG_LEVEL) exitWith {};
if (_logLevel < DEBUG_MODE) exitWith {};
private _hash = createHashMapFromArray _data;
// Replace square brackets with round brackets to avoid parsing issues.
_message regexReplace ["\[", "("];
_message regexReplace ["\]", ")"];
_message regexReplace ['(\[)', "("];
_message regexReplace ['(\])', ")"];
private _json = [_hash] call CBA_fnc_encodeJSON;
_log = format ["[%1] [%2] [%3] [%4] :: %5", QUOTE(PREFIX), _component, _fnc_scriptNameParent, _message, _json];

View File

@@ -1,6 +1,7 @@
#include "..\script_component.hpp"
[
LEVEL_INFO,
QUOTE(COMPONENT),
"MISSION INFO",
[