Skip to content

Commit

Permalink
Merge pull request #1099 from zgmrvn/master
Browse files Browse the repository at this point in the history
CBA Settings implementation to replace removed userconfig file

Former-commit-id: fd1e5ef5e98d5961f16668d85db61a538d2fa890 [formerly bb732b97febb4d0db52114881a3a35645b105927] [formerly 4c4890e50da77b4df60e35bcc24c3df7de9421e9 [formerly 6702f1d15232563ca7aa5b3907e49e2e47eab517]] [formerly fc88ce76305c8110e8d5e0fa625f542979180261 [formerly 55b9f54ca7a4da6bca6fe601fdb15354b975b6dc] [formerly 555943a05a146c77e8a65574479d9047102aa214 [formerly c9f1569449b90796a48d51d909a1e3a840f5751f]]]
Former-commit-id: 36d8078f0c587d869d660defef96be40502ce993 [formerly 81e452d95368af261a78f808bdb3465e0a7fd0fc] [formerly 2a540029539c68cf254d7be65a1ce6c7c6b8599b [formerly 5091431750622fd4a9dcfd36cf8b5bda831b44d2]]
Former-commit-id: 646e0a09d0e3efdaa2f123bf3df01bb9ff76cdab [formerly dee6eea4cf7e43587c73eb08e7a8c1fe8862450e]
Former-commit-id: 8baf2b24c4103a12e606d0cff83dc86792b5f41f
  • Loading branch information
kavinsky authored Sep 20, 2016
2 parents 5c1e6d6 + 61e2dc6 commit 24c0c59
Show file tree
Hide file tree
Showing 6 changed files with 2,500 additions and 81 deletions.
2 changes: 1 addition & 1 deletion arma3/@task_force_radio/addons/task_force_radio/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class CfgPatches
units[] = {};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = { "CBA_Main", "task_force_radio_items"};
requiredAddons[] = { "CBA_Main", "cba_settings", "task_force_radio_items"};
author = "[TF]Nkey";
authorUrl = "https://github.com/michail-nikolaev/task-force-arma-3-radio";
url="https://github.com/michail-nikolaev/task-force-arma-3-radio";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// server
["TF_no_auto_long_range_radio", "CHECKBOX", localize "STR_radio_no_auto_long_range_radio", "Task Force Arrowhead Radio", true, true] call CBA_Settings_fnc_init;
["TF_give_personal_radio_to_regular_soldier", "CHECKBOX", localize "STR_radio_give_personal_radio_to_regular_soldier", "Task Force Arrowhead Radio", false, true] call CBA_Settings_fnc_init;
["TF_give_microdagr_to_soldier", "CHECKBOX", localize "STR_radio_give_microdagr_to_soldier", "Task Force Arrowhead Radio", true, true] call CBA_Settings_fnc_init;
["TF_same_sw_frequencies_for_side", "CHECKBOX", localize "STR_radio_same_sw_frequencies_for_side", "Task Force Arrowhead Radio", false, true] call CBA_Settings_fnc_init;
["TF_same_lr_frequencies_for_side", "CHECKBOX", localize "STR_radio_same_lr_frequencies_for_side", "Task Force Arrowhead Radio", false, true] call CBA_Settings_fnc_init;
["TF_same_dd_frequencies_for_side", "CHECKBOX", localize "STR_radio_same_dd_frequencies_for_side", "Task Force Arrowhead Radio", false, true] call CBA_Settings_fnc_init;
// client
["TF_default_radioVolume", "SLIDER", localize "STR_radio_default_radioVolume", "Task Force Arrowhead Radio", [1, 9, 9, 0]] call CBA_Settings_fnc_init;
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//#define DEBUG_MODE_FULL

// cba settings
#include "cba_settings.sqf"

if (isNil "tf_radio_channel_name") then {
tf_radio_channel_name = "TaskForceRadio";
};
Expand Down Expand Up @@ -130,27 +133,6 @@ disableSerialization;
#include "diary.sqf"

waitUntil {sleep 0.2;time > 0};
if (isNil "tf_no_auto_long_range_radio") then {
if (!isNil "tf_no_auto_long_range_radio_server") then {
tf_no_auto_long_range_radio = tf_no_auto_long_range_radio_server;
}else{
tf_no_auto_long_range_radio = true;
};
};
if (isNil "TF_give_personal_radio_to_regular_soldier") then {
if (!isNil "TF_give_personal_radio_to_regular_soldier_server") then {
TF_give_personal_radio_to_regular_soldier = TF_give_personal_radio_to_regular_soldier_server;
}else{
TF_give_personal_radio_to_regular_soldier = false;
};
};
if (isNil "TF_give_microdagr_to_soldier") then {
if (!isNil "TF_give_microdagr_to_soldier_server") then {
TF_give_microdagr_to_soldier = TF_give_microdagr_to_soldier_server;
}else{
TF_give_microdagr_to_soldier = true;
};
};
waitUntil {sleep 0.1;!(isNull player)};
TFAR_currentUnit = call TFAR_fnc_currentUnit;
[parseText(localize ("STR_init")), 5] call TFAR_fnc_ShowHint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,11 @@
#define MAX_RADIO_COUNT 1000
private ["_variableName", "_radio_request", "_responseVariableName", "_response", "_task_force_radio_used", "_last_check", "_allUnits"];

// cba settings
#include "cba_settings.sqf"

TF_server_addon_version = TF_ADDON_VERSION;
publicVariable "TF_server_addon_version";

if (isNumber (ConfigFile >> "task_force_radio_settings" >> "tf_no_auto_long_range_radio")) then {
tf_no_auto_long_range_radio_server = getNumber (ConfigFile >> "task_force_radio_settings" >> "tf_no_auto_long_range_radio") == 1;
} else {
tf_no_auto_long_range_radio_server = true;
};
publicVariable "tf_no_auto_long_range_radio_server";
if (isNumber (ConfigFile >> "task_force_radio_settings" >> "TF_give_personal_radio_to_regular_soldier")) then {
TF_give_personal_radio_to_regular_soldier_server = getNumber (ConfigFile >> "task_force_radio_settings" >> "TF_give_personal_radio_to_regular_soldier") == 1;
} else {
TF_give_personal_radio_to_regular_soldier_server = false;
};
publicVariable "TF_give_personal_radio_to_regular_soldier_server";
if (isNumber (ConfigFile >> "task_force_radio_settings" >> "tf_same_sw_frequencies_for_side")) then {
tf_same_sw_frequencies_for_side_server = getNumber (ConfigFile >> "task_force_radio_settings" >> "tf_same_sw_frequencies_for_side") == 1;
} else {
tf_same_sw_frequencies_for_side_server = false;
};
publicVariable "tf_same_sw_frequencies_for_side_server";
if (isNumber (ConfigFile >> "task_force_radio_settings" >> "tf_same_lr_frequencies_for_side")) then {
tf_same_lr_frequencies_for_side_server = getNumber (ConfigFile >> "task_force_radio_settings" >> "tf_same_lr_frequencies_for_side") == 1;
} else {
tf_same_lr_frequencies_for_side_server = false;
};
publicVariable "tf_same_lr_frequencies_for_side_server";
if (isNumber (ConfigFile >> "task_force_radio_settings" >> "tf_same_dd_frequencies_for_side")) then {
tf_same_dd_frequencies_for_side_server = getNumber (ConfigFile >> "task_force_radio_settings" >> "tf_same_dd_frequencies_for_side") == 1;
} else {
tf_same_dd_frequencies_for_side_server = false;
};
publicVariable "tf_same_dd_frequencies_for_side_server";


if (isNumber (ConfigFile >> "task_force_radio_settings" >> "TF_give_microdagr_to_soldier")) then {
TF_give_microdagr_to_soldier_server = getNumber (ConfigFile >> "task_force_radio_settings" >> "TF_give_microdagr_to_soldier") == 1;
} else {
TF_give_microdagr_to_soldier_server = true;
};
publicVariable "TF_give_microdagr_to_soldier_server";

waitUntil {sleep 0.1;time > 0};

Expand Down
2,485 changes: 2,484 additions & 1 deletion arma3/@task_force_radio/addons/task_force_radio/stringtable.xml

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions arma3/userconfig/task_force_radio/radio_settings.hpp

This file was deleted.

0 comments on commit 24c0c59

Please sign in to comment.