updates FBCB2, updates log fnc, adds comments

This commit is contained in:
2024-02-01 20:48:30 -08:00
parent c7d9298987
commit dab96b8813
12 changed files with 171 additions and 84 deletions

View File

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