Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logistics - Move to CBA settings and organize in subcategories #6284

Merged
merged 1 commit into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions addons/cargo/ACE_Settings.hpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
class ACE_Settings {
class GVAR(enable) {
displayName = CSTRING(ModuleSettings_enable);
description = CSTRING(ModuleSettings_enable_Description);
typeName = "BOOL";
value = 1;
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(paradropTimeCoefficent) {
displayName = CSTRING(paradropTimeCoefficent);
description = CSTRING(paradropTimeCoefficent_description);
typeName = "SCALAR";
value = 2.5;
category = ECSTRING(OptionsMenu,CategoryLogistics);
sliderSettings[] = {0, 10, 2.5, 1};
movedToSQF = 1;
};
};
2 changes: 2 additions & 0 deletions addons/cargo/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

#include "initSettings.sqf"

GVAR(initializedItemClasses) = [];
GVAR(initializedVehicleClasses) = [];
GVAR(cargoHolderTypes) = ["Car", "Air", "Tank", "Ship", "Cargo_base_F", "Land_PaperBox_closed_F"];
Expand Down
19 changes: 19 additions & 0 deletions addons/cargo/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// CBA Settings [ADDON: ace_cargo]:

[
QGVAR(enable), "CHECKBOX",
[LSTRING(ModuleSettings_enable), LSTRING(ModuleSettings_enable_Description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(openMenu)],
true, // default value
true, // isGlobal
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(paradropTimeCoefficent), "SLIDER",
[LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(openMenu)],
[0,10,2.5,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(paradropTimeCoefficent), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
26 changes: 13 additions & 13 deletions addons/optionsmenu/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@
<Chinese>顯示新聞消息於主選單</Chinese>
</Key>
<Key ID="STR_ACE_OptionsMenu_CategoryLogistics">
<English>Logistics</English>
<German>Logistik</German>
<Polish>Logistyka</Polish>
<Portuguese>Logística</Portuguese>
<Russian>Логистика</Russian>
<Czech>Logistika</Czech>
<Spanish>Logística</Spanish>
<Italian>Logistica</Italian>
<French>Logistique</French>
<Japanese>ロジスティクス</Japanese>
<Korean>보급</Korean>
<Chinesesimp>后勤设定</Chinesesimp>
<Chinese>後勤設定</Chinese>
<English>ACE Logistics</English>
<German>ACE Logistik</German>
<Polish>ACE Logistyka</Polish>
<Portuguese>ACE Logística</Portuguese>
<Russian>ACE Логистика</Russian>
<Czech>ACE Logistika</Czech>
<Spanish>ACE Logística</Spanish>
<Italian>ACE Logistica</Italian>
<French>ACE Logistique</French>
<Japanese>ACE ロジスティクス</Japanese>
<Korean>ACE 보급</Korean>
<Chinesesimp>ACE 后勤设定</Chinesesimp>
<Chinese>ACE 後勤設定</Chinese>
</Key>
<Key ID="STR_ACE_OptionsMenu_Hide">
<English>Hide</English>
Expand Down
14 changes: 2 additions & 12 deletions addons/rearm/ACE_Settings.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
class ACE_Settings {
class GVAR(level) {
category = CSTRING(DisplayName);
displayName = CSTRING(RearmSettings_level_DisplayName);
description = CSTRING(RearmSettings_level_Description);
value = 0;
typeName = "SCALAR";
values[] = {CSTRING(RearmSettings_vehicle), CSTRING(RearmSettings_magazine), CSTRING(RearmSettings_caliber)};
movedToSQF = 1;
};
class GVAR(supply) {
category = CSTRING(DisplayName);
displayName = CSTRING(RearmSettings_supply_DisplayName);
description = CSTRING(RearmSettings_supply_Description);
value = 0;
typeName = "SCALAR";
values[] = {CSTRING(RearmSettings_unlimited), CSTRING(RearmSettings_limited), CSTRING(RearmSettings_magazineSupply)};
movedToSQF = 1;
};
};
2 changes: 2 additions & 0 deletions addons/rearm/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

#include "initSettings.sqf"

ADDON = true;
19 changes: 19 additions & 0 deletions addons/rearm/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// CBA Settings [ADDON: ace_rearm]:

[
QGVAR(level), "LIST",
[LSTRING(RearmSettings_level_DisplayName), LSTRING(RearmSettings_level_Description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(DisplayName)],
[[0,1,2],[LSTRING(RearmSettings_vehicle), LSTRING(RearmSettings_magazine), LSTRING(RearmSettings_caliber)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(level), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(supply), "LIST",
[LSTRING(RearmSettings_supply_DisplayName), LSTRING(RearmSettings_supply_Description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(DisplayName)],
[[0,1,2],[LSTRING(RearmSettings_unlimited), LSTRING(RearmSettings_limited), LSTRING(RearmSettings_magazineSupply)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(supply), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
13 changes: 2 additions & 11 deletions addons/refuel/ACE_Settings.hpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
class ACE_Settings {
class GVAR(rate) {
category = ECSTRING(OptionsMenu,CategoryLogistics);
displayName = CSTRING(RefuelSettings_speed_DisplayName);
description = CSTRING(RefuelSettings_speed_Description);
value = 1;
typeName = "SCALAR";
sliderSettings[] = {0, 25, 1, 1};
movedToSQF = 1;
};
class GVAR(hoseLength) {
category = ECSTRING(OptionsMenu,CategoryLogistics);
displayName = CSTRING(RefuelSettings_hoseLength_DisplayName);
value = 12;
typeName = "SCALAR";
sliderSettings[] = {0, 50, 12, 1};
movedToSQF = 1;
};
};
2 changes: 2 additions & 0 deletions addons/refuel/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

#include "initSettings.sqf"

ADDON = true;
19 changes: 19 additions & 0 deletions addons/refuel/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// CBA Settings [ADDON: ace_refuel]:

[
QGVAR(rate), "SLIDER",
[LSTRING(RefuelSettings_speed_DisplayName), LSTRING(RefuelSettings_speed_Description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_refuel"],
[0,25,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(rate), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(hoseLength), "SLIDER",
[LSTRING(RefuelSettings_hoseLength_DisplayName)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_refuel"],
[0,50,12,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(hoseLength), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
76 changes: 12 additions & 64 deletions addons/repair/ACE_Settings.hpp
Original file line number Diff line number Diff line change
@@ -1,89 +1,37 @@
// Warning: do not remove without handling wheelRepairRequiredItems's _values config on line 32 [used in repair/canRepair]
class ACE_Settings {
class GVAR(displayTextOnRepair) {
displayName = CSTRING(SettingDisplayTextName);
description = CSTRING(SettingDisplayTextDesc);
typeName = "BOOL";
isClientSettable = 1;
value = 1;
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(engineerSetting_repair) {
displayName = CSTRING(engineerSetting_Repair_name);
description = CSTRING(engineerSetting_Repair_description);
typeName = "SCALAR";
value = 1;
values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_AdvancedOnly)};
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(engineerSetting_wheel) {
displayName = CSTRING(engineerSetting_Wheel_name);
description = CSTRING(engineerSetting_Wheel_description);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_AdvancedOnly)};
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(repairDamageThreshold) {
displayName = CSTRING(repairDamageThreshold_name);
description = CSTRING(repairDamageThreshold_description);
typeName = "SCALAR";
value = 0.6;
category = ECSTRING(OptionsMenu,CategoryLogistics);
sliderSettings[] = {0, 1, 0.6, 2};
movedToSQF = 1;
};
class GVAR(repairDamageThreshold_engineer) {
displayName = CSTRING(repairDamageThreshold_Engineer_name);
description = CSTRING(repairDamageThreshold_Engineer_description);
typeName = "SCALAR";
value = 0.4;
category = ECSTRING(OptionsMenu,CategoryLogistics);
sliderSettings[] = {0, 1, 0.4, 2};
movedToSQF = 1;
};
class GVAR(consumeItem_toolKit) {
displayName = CSTRING(consumeItem_ToolKit_name);
description = CSTRING(consumeItem_ToolKit_description);
typeName = "SCALAR";
value = 0;
values[] = {ECSTRING(common,No), ECSTRING(common,Yes)};
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(fullRepairLocation) {
displayName = CSTRING(fullRepairLocation);
description = CSTRING(fullRepairLocation_description);
typeName = "SCALAR";
value = 2;
values[] = {CSTRING(useAnywhere), CSTRING(repairVehicleOnly), CSTRING(repairFacilityOnly), CSTRING(vehicleAndFacility), ECSTRING(common,Disabled)};
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(engineerSetting_fullRepair) {
displayName = CSTRING(engineerSetting_fullRepair_name);
description = CSTRING(engineerSetting_fullRepair_description);
typeName = "SCALAR";
value = 2;
values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_AdvancedOnly)};
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(addSpareParts) {
displayName = CSTRING(addSpareParts_name);
description = CSTRING(addSpareParts_description);
typeName = "BOOL";
value = 1;
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
class GVAR(wheelRepairRequiredItems) {
displayName = CSTRING(wheelRepairRequiredItems_name);
description = CSTRING(wheelRepairRequiredItems_description);
category = ECSTRING(OptionsMenu,CategoryLogistics);
typeName = "SCALAR";
value = 0;
values[] = {"None", "ToolKit"};
movedToSQF = 1;
_values[] = {{}, {"ToolKit"}};
};
class GVAR(autoShutOffEngineWhenStartingRepair) {
displayName = CSTRING(autoShutOffEngineWhenStartingRepair_name);
description = CSTRING(autoShutOffEngineWhenStartingRepair_description);
typeName = "BOOL";
value = 0;
category = ECSTRING(OptionsMenu,CategoryLogistics);
movedToSQF = 1;
};
};
2 changes: 2 additions & 0 deletions addons/repair/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

#include "initSettings.sqf"

["ACE_RepairItem_Base", "killed", {
params ["_object"];

Expand Down
100 changes: 100 additions & 0 deletions addons/repair/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// CBA Settings [ADDON: ace_repair]:

[
QGVAR(displayTextOnRepair), "CHECKBOX",
[LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
true, // default value
false, // isGlobal
{[QGVAR(displayTextOnRepair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(engineerSetting_repair), "LIST",
[LSTRING(engineerSetting_Repair_name), LSTRING(engineerSetting_Repair_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],1], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(engineerSetting_repair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(engineerSetting_wheel), "LIST",
[LSTRING(engineerSetting_Wheel_name), LSTRING(engineerSetting_Wheel_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(engineerSetting_wheel), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(repairDamageThreshold), "SLIDER",
[LSTRING(repairDamageThreshold_name), LSTRING(repairDamageThreshold_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[0,1,0.6,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(repairDamageThreshold), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(repairDamageThreshold_engineer), "SLIDER",
[LSTRING(repairDamageThreshold_Engineer_name), LSTRING(repairDamageThreshold_Engineer_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[0,1,0.4,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(repairDamageThreshold_engineer), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(consumeItem_toolKit), "LIST", // fnc_repair expects number
[LSTRING(consumeItem_ToolKit_name), LSTRING(consumeItem_ToolKit_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[[0,1],[ELSTRING(common,No), ELSTRING(common,Yes)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(consumeItem_toolKit), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(fullRepairLocation), "LIST",
[LSTRING(fullRepairLocation), LSTRING(fullRepairLocation_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[[0,1,2,3,4],[LSTRING(useAnywhere), LSTRING(repairVehicleOnly), LSTRING(repairFacilityOnly), LSTRING(vehicleAndFacility), ELSTRING(common,Disabled)],2], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(fullRepairLocation), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(engineerSetting_fullRepair), "LIST",
[LSTRING(engineerSetting_fullRepair_name), LSTRING(engineerSetting_fullRepair_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],2], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(engineerSetting_fullRepair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(addSpareParts), "CHECKBOX",
[LSTRING(addSpareParts_name), LSTRING(addSpareParts_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
true, // default value
true, // isGlobal
{[QGVAR(addSpareParts), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(wheelRepairRequiredItems), "LIST",
[LSTRING(wheelRepairRequiredItems_name), LSTRING(wheelRepairRequiredItems_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
[[0,1],["None", "ToolKit"],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(wheelRepairRequiredItems), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;

[
QGVAR(autoShutOffEngineWhenStartingRepair), "CHECKBOX",
[LSTRING(autoShutOffEngineWhenStartingRepair_name), LSTRING(autoShutOffEngineWhenStartingRepair_description)],
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"],
false, // default value
true, // isGlobal
{[QGVAR(autoShutOffEngineWhenStartingRepair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;