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

using cba settings #3733

Closed
wants to merge 17 commits into from
Closed
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
81 changes: 0 additions & 81 deletions addons/advanced_ballistics/ACE_Settings.hpp

This file was deleted.

70 changes: 70 additions & 0 deletions addons/advanced_ballistics/CBA_Settings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

class CBA_Setting_Boolean_base;
class CBA_Setting_Slider_base;
class CBA_Setting_Slider_2_base;

class CBA_Settings {
class ADDON {
displayName = CSTRING(DisplayName);

class GVAR(enabled): CBA_Setting_Boolean_base {
displayName = CSTRING(enabled_DisplayName);
tooltip = CSTRING(enabled_tooltip);
defaultValue = 0;
};
class GVAR(simulateForSnipers): CBA_Setting_Boolean_base {
displayName = CSTRING(simulateForSnipers_DisplayName);
tooltip = CSTRING(simulateForSnipers_tooltip);
defaultValue = 1;
};
class GVAR(simulateForGroupMembers): CBA_Setting_Boolean_base {
displayName = CSTRING(simulateForGroupMembers_DisplayName);
tooltip = CSTRING(simulateForGroupMembers_tooltip);
defaultValue = 0;
};
class GVAR(simulateForEveryone): CBA_Setting_Boolean_base {
displayName = CSTRING(simulateForEveryone_DisplayName);
tooltip = CSTRING(simulateForEveryone_tooltip);
defaultValue = 0;
};
class GVAR(disabledInFullAutoMode): CBA_Setting_Boolean_base {
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
tooltip = CSTRING(disabledInFullAutoMod_tooltip);
defaultValue = 0;
};
/* // TODO: We currently do not have firedEHs on vehicles
class GVAR(vehicleGunnerEnabled): CBA_Setting_Boolean_base {
displayName = "Enabled For Vehicle Gunners";
tooltip = "Enables advanced ballistics for vehicle gunners";
defaultValue = 0;
};
*/
class GVAR(ammoTemperatureEnabled): CBA_Setting_Boolean_base {
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
tooltip = CSTRING(ammoTemperatureEnabled_tooltip);
defaultValue = 1;
};
class GVAR(barrelLengthInfluenceEnabled): CBA_Setting_Boolean_base {
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
tooltip = CSTRING(barrelLengthInfluenceEnabled_tooltip);
defaultValue = 1;
};
class GVAR(bulletTraceEnabled): CBA_Setting_Boolean_base {
displayName = CSTRING(bulletTraceEnabled_DisplayName);
tooltip = CSTRING(bulletTraceEnabled_tooltip);
defaultValue = 1;
};
class GVAR(simulationInterval): CBA_Setting_Slider_2_base {
displayName = CSTRING(simulationInterval_DisplayName);
tooltip = CSTRING(simulationInterval_tooltip);
defaultValue = 0;
};
class GVAR(simulationRadius): CBA_Setting_Slider_base {
displayName = CSTRING(simulationRadius_DisplayName);
tooltip = CSTRING(simulationRadius_tooltip);
min = 200;
max = 10000;
defaultValue = 3000;
};
};
};
2 changes: 1 addition & 1 deletion addons/advanced_ballistics/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "RscTitles.hpp"
#include "ACE_Settings.hpp"
//#include "CBA_Settings.hpp"

class ACE_Extensions {
extensions[] += {"ace_advanced_ballistics"};
Expand Down
21 changes: 0 additions & 21 deletions addons/captives/ACE_Settings.hpp

This file was deleted.

28 changes: 28 additions & 0 deletions addons/captives/CBA_Settings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

class CBA_Setting_Boolean_base;
class CBA_Setting_List_base;

class CBA_Settings {
class ADDON {
//displayName = CSTRING(Module_DisplayName);
class GVAR(allowHandcuffOwnSide): CBA_Setting_Boolean_base {
displayName = CSTRING(ModuleSettings_handcuffSide_name);
tooltip = CSTRING(ModuleSettings_handcuffSide_description);
typeName = "BOOL";
defaultValue = 1;
};
class GVAR(requireSurrender): CBA_Setting_List_base {
displayName = CSTRING(ModuleSettings_requireSurrender_name);
tooltip = CSTRING(ModuleSettings_requireSurrender_description);
values[] = {0,1,2};
labels[] = {ECSTRING(common,Disabled), CSTRING(SurrenderOnly), CSTRING(SurrenderOrNoWeapon)};
defaultIndex = 1;
};
class GVAR(allowSurrender): CBA_Setting_Boolean_base {
displayName = CSTRING(ModuleSettings_allowSurrender_name);
tooltip = CSTRING(ModuleSettings_allowSurrender_description);
typeName = "BOOL";
defaultValue = 1;
};
};
};
10 changes: 4 additions & 6 deletions addons/captives/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#include "script_component.hpp"

["SettingsInitialized", {
// Hold on a little bit longer to ensure anims will work
[{
GVAR(captivityEnabled) = true;
}, [], 0.05] call EFUNC(common,waitAndExecute);
}] call EFUNC(common,addEventHandler);
// Hold on a little bit longer to ensure anims will work
[{
GVAR(captivityEnabled) = true;
}, [], 0.05] call EFUNC(common,waitAndExecute);

//Handles when someone starts escorting and then disconnects, leaving the captive attached
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
Expand Down
4 changes: 2 additions & 2 deletions addons/captives/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class CfgPatches {
};
};

#include "ACE_Settings.hpp"
//#include "CBA_Settings.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMoves.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgEden.hpp"
#include "CfgEden.hpp"
9 changes: 0 additions & 9 deletions addons/cargo/ACE_Settings.hpp

This file was deleted.

14 changes: 14 additions & 0 deletions addons/cargo/CBA_Settings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

class CBA_Setting_Boolean_base;

class CBA_Settings {
class GVARMAIN(OptionsMenu) {
displayName = ECSTRING(OptionsMenu,CategoryLogistics); //@todo replace

class GVAR(enable): CBA_Setting_Boolean_base {
displayName = CSTRING(ModuleSettings_enable);
tooltip = CSTRING(ModuleSettings_enable_Description);
value = 1;
};
};
};
2 changes: 1 addition & 1 deletion addons/cargo/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CfgPatches {
};
};

#include "ACE_Settings.hpp"
//#include "CBA_Settings.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "menu.hpp"
20 changes: 0 additions & 20 deletions addons/explosives/ACE_Settings.hpp

This file was deleted.

22 changes: 22 additions & 0 deletions addons/explosives/CBA_Settings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

class CBA_Setting_Boolean_base;

class CBA_Settings {
class PREFIX {
class GVAR(requireSpecialist): CBA_Setting_Boolean_base {
displayName = CSTRING(RequireSpecialist_DisplayName);
tooltip = CSTRING(RequireSpecialist_Description);
defaultValue = 0;
};
class GVAR(punishNonSpecialists): CBA_Setting_Boolean_base {
displayName = CSTRING(PunishNonSpecialists_DisplayName);
tooltip = CSTRING(PunishNonSpecialists_Description);
defaultValue = 1;
};
class GVAR(explodeOnDefuse): CBA_Setting_Boolean_base {
displayName = CSTRING(ExplodeOnDefuse_DisplayName);
tooltip = CSTRING(ExplodeOnDefuse_Description);
defaultValue = 1;
};
};
};
2 changes: 1 addition & 1 deletion addons/explosives/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CfgPatches {
};
};

#include "ACE_Settings.hpp"
//#include "CBA_Settings.hpp"

#include "CfgEventHandlers.hpp"

Expand Down
27 changes: 0 additions & 27 deletions addons/finger/ACE_Settings.hpp

This file was deleted.

33 changes: 33 additions & 0 deletions addons/finger/CBA_Settings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

class CBA_Setting_Boolean_base;
class CBA_Setting_Slider_base;
class CBA_Setting_Color_Alpha_base;

class CBA_Settings {
class PREFIX {
class GVAR(enabled): CBA_Setting_Boolean_base {
displayName = CSTRING(enabled_displayName);
defaultValue = 0;
serverOnly = 1;
};
class GVAR(maxRange): CBA_Setting_Slider_base {
typeName = "SCALAR";
displayName = CSTRING(maxRange_displayName);
tooltip = CSTRING(maxRange_description);
min = 0;
max = 100;
defaultValue = 4;
serverOnly = 1;
};
class GVAR(indicatorForSelf): CBA_Setting_Boolean_base {
displayName = CSTRING(indicatorForSelf_name);
tooltip = CSTRING(indicatorForSelf_description);
defaultValue = 1;
};
class GVAR(indicatorColor): CBA_Setting_Color_Alpha_base {
displayName = CSTRING(indicatorColor_name);
tooltip = CSTRING(indicatorColor_description);
defaultValue[] = {0.83, 0.68, 0.21, 0.75};
};
};
};
2 changes: 1 addition & 1 deletion addons/finger/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class CfgPatches {
};


#include "ACE_Settings.hpp"
//#include "CBA_Settings.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
Loading