<commit_before>#include "hull3_macros.h"

#include "\userconfig\hull3\log\settings.h"
#include "logbook.h"


hull3_settings_fnc_preInit = {
    [] call hull3_settings_fnc_addEventHandlers;
    DEBUG("hull3.settings","Settings functions preInit finished.");
};

hull3_settings_fnc_init = {
    [] call hull3_settings_fnc_setNonStandardGeneralSettings;
    [] call hull3_settings_fnc_setModuleVariables;
};

hull3_settings_fnc_addEventHandlers = {
    ["player.initialized", hull3_settings_fnc_setPlayerSettings] call hull3_event_fnc_addEventHandler;
};

hull3_settings_fnc_setNonStandardGeneralSettings = {
    if (!(["General", "enableSaving"] call hull3_config_fnc_getBool)) then {
        enableSaving [false, false];
        DEBUG("hull3.settings","Saving is disabled.");
    };
};

hull3_settings_fnc_setPlayerSettings = {
    player addRating (["General", "addRating"] call hull3_config_fnc_getNumber);
    DEBUG("hull3.settings",FMT_2("Added '%1' rating to player. New rating is '%2'.",AS_ARRAY_2("General", "addRating") call hull3_config_fnc_getNumber,rating player));
    player setVariable ["BIS_noCoreConversations", ["General", "BIS_noCoreConversations"] call hull3_config_fnc_getBool];
    DEBUG("hull3.settings",FMT_1("Player variable 'BIS_noCoreConversations' is set to '%1'.",AS_ARRAY_2("General", "BIS_noCoreConversations") call hull3_config_fnc_getBool));
};

hull3_settings_fnc_setModuleVariables = {
    if (isNil {hull3_marker_isGroupEnabled}) then {
        hull3_marker_isGroupEnabled = ["Marker", "isGroupEnabled"] call hull3_config_fnc_getBool;
        DEBUG("hull3.settings.marker",FMT_1("Group marker module was not found. Setting Group Marker enabled from config to '%1'.",AS_ARRAY_2("Marker", "isGroupEnabled") call hull3_config_fnc_getBool));
    };
    if (isNil {hull3_marker_isFireTeamEnabled}) then {<commit_msg>Adding disableRemoteSenors to NonStandardGeneralSettings<commit_after>#include "hull3_macros.h"

#include "\userconfig\hull3\log\settings.h"
#include "logbook.h"


hull3_settings_fnc_preInit = {
    [] call hull3_settings_fnc_addEventHandlers;
    DEBUG("hull3.settings","Settings functions preInit finished.");
};

hull3_settings_fnc_init = {
    [] call hull3_settings_fnc_setNonStandardGeneralSettings;
    [] call hull3_settings_fnc_setModuleVariables;
};

hull3_settings_fnc_addEventHandlers = {
    ["player.initialized", hull3_settings_fnc_setPlayerSettings] call hull3_event_fnc_addEventHandler;
};

hull3_settings_fnc_setNonStandardGeneralSettings = {
    if (!(["General", "enableSaving"] call hull3_config_fnc_getBool)) then {
        enableSaving [false, false];
        DEBUG("hull3.settings","Saving is disabled.");
        disableRemoteSensors true;
        DEBUG("hull3.settings","RemoteSensors are disabled.");
    };
};

hull3_settings_fnc_setPlayerSettings = {
    player addRating (["General", "addRating"] call hull3_config_fnc_getNumber);
    DEBUG("hull3.settings",FMT_2("Added '%1' rating to player. New rating is '%2'.",AS_ARRAY_2("General", "addRating") call hull3_config_fnc_getNumber,rating player));
    player setVariable ["BIS_noCoreConversations", ["General", "BIS_noCoreConversations"] call hull3_config_fnc_getBool];
    DEBUG("hull3.settings",FMT_1("Player variable 'BIS_noCoreConversations' is set to '%1'.",AS_ARRAY_2("General", "BIS_noCoreConversations") call hull3_config_fnc_getBool));
};

hull3_settings_fnc_setModuleVariables = {
    if (isNil {hull3_marker_isGroupEnabled}) then {
        hull3_marker_isGroupEnabled = ["Marker", "isGroupEnabled"] call hull3_config_fnc_getBool;
        DEBUG("hull3.settings.marker",FMT_1("Group marker module was not found. Setting Group Marker enabled from config to '%1'.",AS_ARRAY_2("Marker", "isGroupEnabled") call hull3_config_fnc_getBool));
    };
    if (isNil {hull3_marker_isFireTeamEnabled}) then {
{'fraction_non_alphanumeric': 0.11667971808927173, 'fraction_numerical': 0.020099190811798485, 'mean_word_length': 6.383429672447013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4525928', 'n_tokens_mistral': 1314, 'n_tokens_neox': 1291, 'n_words': 216}