<commit_before>#include "settings.sqf"

adm_settings_fnc_initSideRelations = {
    adm_sideRelations = [];
    {
        adm_sideRelations set [_forEachIndex, []];
    } foreach SIDE_ARRAY;
};

adm_settings_fnc_setDefaultSideRelations = {
    [SIDE_WEST, SIDE_EAST] call adm_settings_fnc_setEnemy;
    [SIDE_WEST, SIDE_IND] call adm_settings_fnc_setFriend;

    [SIDE_EAST, SIDE_WEST] call adm_settings_fnc_setEnemy;
    [SIDE_EAST, SIDE_IND] call adm_settings_fnc_setEnemy;

    [SIDE_IND, SIDE_WEST] call adm_settings_fnc_setFriend;
    [SIDE_IND, SIDE_EAST] call adm_settings_fnc_setEnemy;
};

adm_settings_fnc_setEnemy = {
    FUN_ARGS_2(_side,_enemySide);

    DECLARE(_sideEnemies) = adm_sideRelations select _side;
    if (!(_enemySide in _sideEnemies)) then {
        PUSH(_sideEnemies,_enemySide);
        (SIDE_ARRAY select _side) setFriend [(SIDE_ARRAY select _enemySide), 0];
    };
};

adm_settings_fnc_setFriend = {
    FUN_ARGS_2(_side,_friendlySide);

    private ["_sideEnemies", "_enemySideIndex"];
    _sideEnemies = adm_sideRelations select _side;
    _enemySideIndex = _sideEnemies find _friendlySide;
    if (_enemySideIndex >= 0) then {
        adm_sideRelations set [_side, _sideEnemies - [_friendlySide]];
    };
    (SIDE_ARRAY select _side) setFriend [(SIDE_ARRAY select _friendlySide), 1];
};

adm_settings_fnc_createCenters = {
    {
        createCenter _x;
    } foreach SIDE_ARRAY;
};

adm_settings_fnc_init = {
    [] call adm_settings_fnc_createCenters;
    [] call adm_settings_fnc_initSideRelations;
    [] call adm_settings_fnc_setDefaultSideRelations;
    [] call adm_settings_fnc_setSideRelations;
};<commit_msg>Added new loggin.<commit_after>#include "settings.sqf"

#include "log_macros.h"

adm_settings_fnc_initSideRelations = {
    adm_sideRelations = [];
    {
        adm_sideRelations set [_forEachIndex, []];
    } foreach SIDE_ARRAY;
    DEBUG("admiral.settings.siderelation","Initialized side relations.");
};

adm_settings_fnc_setDefaultSideRelations = {
    [SIDE_WEST, SIDE_EAST] call adm_settings_fnc_setEnemy;
    [SIDE_WEST, SIDE_IND] call adm_settings_fnc_setFriend;

    [SIDE_EAST, SIDE_WEST] call adm_settings_fnc_setEnemy;
    [SIDE_EAST, SIDE_IND] call adm_settings_fnc_setEnemy;

    [SIDE_IND, SIDE_WEST] call adm_settings_fnc_setFriend;
    [SIDE_IND, SIDE_EAST] call adm_settings_fnc_setEnemy;
    DEBUG("admiral.settings.siderelation","Set default side relations.");
};

adm_settings_fnc_setEnemy = {
    FUN_ARGS_2(_side,_enemySide);

    DECLARE(_sideEnemies) = adm_sideRelations select _side;
    if (!(_enemySide in _sideEnemies)) then {
        PUSH(_sideEnemies,_enemySide);
        (SIDE_ARRAY select _side) setFriend [(SIDE_ARRAY select _enemySide), 0];
        DEBUG("admiral.settings.siderelation",FMT_2("Side '%1' is hostile towards side '%2'.",SIDE_TEXT_ARRAY select _side,SIDE_TEXT_ARRAY select _enemySide));
    };
};

adm_settings_fnc_setFriend = {
    FUN_ARGS_2(_side,_friendlySide);

    private ["_sideEnemies", "_enemySideIndex"];
    _sideEnemies = adm_sideRelations select _side;
    _enemySideIndex = _sideEnemies find _friendlySide;
    if (_enemySideIndex >= 0) then {
        adm_sideRelations set [_side, _sideEnemies - [_friendlySide]];
    };
    (SIDE_ARRAY select _side) setFriend [(SIDE_ARRAY select _friendlySide), 1];
    DEBUG("admiral.settings.siderelation",FMT_2("Side '%1' is friendly towards side '%2'.",SIDE_TEXT_ARRAY select _side,SIDE_TEXT_ARRAY select _friendlySide));
};

adm_settings_fnc_createCenters = {
    {
        createCenter _x;
    } foreach SIDE_ARRAY;
    DEBUG("admiral.settings","AI centers have created.");
};

adm_settings_fnc_init = {
    [] call adm_settings_fnc_createCenters;
    [] call adm_settings_fnc_initSideRelations;
    [] call adm_settings_fnc_setDefaultSideRelations;
    [] call adm_settings_fnc_setSideRelations;
};
{'fraction_non_alphanumeric': 0.09826289862587503, 'fraction_numerical': 0.004148301788955146, 'mean_word_length': 4.83661119515885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '901361', 'n_tokens_mistral': 1427, 'n_tokens_neox': 1354, 'n_words': 233}