Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
OverlordZorn committed Dec 4, 2024
2 parents fc12797 + 5286517 commit 1dca848
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
17 changes: 9 additions & 8 deletions addons/core/XEH/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,29 @@ private _code = {


// Auto-Detect Possible Cig Packs (including suckers)
private _cfgs = Q(getNumber (_x >> QQPVAR(isLigher)) == 1) configClasses (configFile >> "CfgMagazines");
private _cfgs = Q(getNumber (_x >> QQPVAR(isLighter)) == 1 && { getNumber (_x >> QQ(scope)) == 2 }) configClasses (configFile >> "CfgMagazines");
private _array_lighters = [ _cfgs apply { configName _x }, _cfgs apply _code, 0 ];


[
QSET(sp_addLighter), // _setting - Unique setting name. Matches resulting variable name <STRING>
"CHECKBOX", // _settingType - Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
SETLSTRING(sp_addLighter),
// _title - Display name or display name + tooltip (optional, default: same as setting name) <STRING, ARRAY>
[LSTRING(set_cat_main),LSTRING(set_cat_sp)], // _category - Category for the settings menu + optional sub-category <STRING, ARRAY>
false, // _valueInfo - Extra properties of the setting depending of _settingType. See examples below <ANY>
true, // _valueInfo - Extra properties of the setting depending of _settingType. See examples below <ANY>
2, // _isGlobal - 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <NUMBER>
{}, // _script - Script to execute when setting is changed. (optional) <CODE>
false // _needRestart - Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_fnc_addSetting;

[
QSET(sp_addLighter_type), // _setting - Unique setting name. Matches resulting variable name <STRING>
"CHECKBOX", // _settingType - Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
["",""],
"LIST", // _settingType - Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
SETLSTRING(sp_addLighter_type),
// _title - Display name or display name + tooltip (optional, default: same as setting name) <STRING, ARRAY>
SETLSTRING(sp_addLighter_type), // _category - Category for the settings menu + optional sub-category <STRING, ARRAY>
true, // _valueInfo - Extra properties of the setting depending of _settingType. See examples below <ANY>
[LSTRING(set_cat_main),LSTRING(set_cat_sp)], // _category - Category for the settings menu + optional sub-category <STRING, ARRAY>
_array_lighters, // _valueInfo - Extra properties of the setting depending of _settingType. See examples below <ANY>
2, // _isGlobal - 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <NUMBER>
{}, // _script - Script to execute when setting is changed. (optional) <CODE>
false // _needRestart - Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
Expand All @@ -69,7 +70,7 @@ private _array_lighters = [ _cfgs apply { configName _x }, _cfgs apply _code, 0


// Auto-Detect Possible Cig Packs (including suckers)
private _cfgs = Q(getNumber (_x >> QQPVAR(isPack)) == 1) configClasses (configFile >> "CfgMagazines");
private _cfgs = Q(getNumber (_x >> QQPVAR(isPack)) == 1 && {getNumber (_x >> QQ(scope)) == 2}) configClasses (configFile >> "CfgMagazines");
private _array_packs = [ _cfgs apply { configName _x }, _cfgs apply { getText ( _x >> "displayName" ) }, 0 ];

[
Expand All @@ -82,4 +83,4 @@ private _array_packs = [ _cfgs apply { configName _x }, _cfgs apply { getText (
2, // _isGlobal - 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <NUMBER>
{}, // _script - Script to execute when setting is changed. (optional) <CODE>
false // _needRestart - Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_fnc_addSetting;
] call CBA_fnc_addSetting;
6 changes: 3 additions & 3 deletions addons/legacy/CfgMagazines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ class CfgMagazines {
class PVAR(lighter);
class murshun_cigs_lighter : PVAR(lighter)
{
scope = 2;
scope = _DEBUG_SCOPE_;
displayName = "DEPRECATED";
};

class PVAR(matches);
class murshun_cigs_matches : PVAR(matches)
{
scope = 2;
scope = _DEBUG_SCOPE_;
displayName = "DEPRECATED";
};

class EGVAR(morley,cigpack);
class murshun_cigs_cigpack : EGVAR(morley,cigpack)
{
scope = 2;
scope = _DEBUG_SCOPE_;
displayName = "DEPRECATED";
};
};
2 changes: 1 addition & 1 deletion addons/main/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Mod Specific Macros

#ifdef __A3_DEBUG__
#define _DEBUG_SCOPE_ 2
#define _DEBUG_SCOPE_ 1
#else
#define _DEBUG_SCOPE_ 1
#endif

0 comments on commit 1dca848

Please sign in to comment.