big refactor, WIP!

This commit is contained in:
2024-02-06 01:52:25 -08:00
parent f588ffa4a0
commit 0a64d9e170
74 changed files with 1024 additions and 701 deletions

View File

@@ -15,7 +15,9 @@ private _existingRecord = _subjectRecords getOrDefault [_recordTitle, diaryRecor
if (!isNull _existingRecord) then {
player setDiaryRecordText [[_subjectID, _existingRecord], [_recordTitle, _recordText, _recordIcon]];
systemChat format ["Updated diary record: %1", _recordTitle];
if (DEBUG_ENABLED) then {
systemChat format ["Updated diary record: %1", _recordTitle];
};
} else {
private _new = player createDiaryRecord [
_subjectID,

View File

@@ -64,8 +64,8 @@ _freqLeadingSpace = _freqLeadingSpace joinString "";
_ELEMENT_FREQ_SIZE,
_ELEMENT_FREQ_FONT,
_FREQ_TEXT_COLOR,
[_role, "right", " ", _FREQ_PAD_LENGTH] call EFUNC(util,padString),
[_srStr, "right", " ", _FREQ_PAD_LENGTH] call EFUNC(util,padString),
[_role, "right", " ", _FREQ_PAD_LENGTH] call EFUNC(common,padString),
[_srStr, "right", " ", _FREQ_PAD_LENGTH] call EFUNC(common,padString),
_lrStr
];
} forEach (getArray (_cfg >> "frequencies"));

View File

@@ -54,8 +54,8 @@ private _headers = [
_ELEMENT_FREQ_SIZE,
_ELEMENT_FREQ_FONT,
_FREQ_TEXT_COLOR,
["ROLE", "right", " ", _FREQ_PAD_LENGTH] call EFUNC(util,padString),
["SR", "right", " ", _FREQ_PAD_LENGTH] call EFUNC(util,padString),
["ROLE", "right", " ", _FREQ_PAD_LENGTH] call EFUNC(common,padString),
["SR", "right", " ", _FREQ_PAD_LENGTH] call EFUNC(common,padString),
"LR"
]
];
@@ -68,26 +68,27 @@ private _allText = [];
// get all child elements recursively and format them
if (_shouldProcessChildCfgs) then {
diag_log text format[
"[%1] <%2> Processing %3",
QUOTE(PREFIX),
_fnc_scriptName,
configName _battalionElement
];
[
LEVEL_TRACE,
QUOTE(COMPONENT),
"Processing child elements for battalion element %1"
] call EFUNC(common,log);
[_battalionElement, {
params ["_cfg", "_recurseCounter"];
// add config
private _lines = [_cfg, _recurseCounter+1] call FUNC(formatRadioElementForDiary);
// private _lines = [_cfg, _indentCount] call t;
_allText pushBack (_lines joinString "<br/>");
}] call EFUNC(util,recurseSubclasses);
}] call EFUNC(common,recurseSubclasses);
} else {
diag_log text format[
"[%1] <%2> Processing %3",
QUOTE(PREFIX),
_fnc_scriptName,
configName _battalionElement
];
[
LEVEL_TRACE,
QUOTE(COMPONENT),
"Skipping processing of child elements for battalion element %1",
[]
] call EFUNC(common,log);
// or if the param was false, just add the battalion element
private _lines = [_battalionElement, 1] call FUNC(formatRadioElementForDiary);
// private _lines = [_cfg, _indentCount] call t;