diff --git a/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_draw.sqf b/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_draw.sqf index 08ef21b1..80d88b0d 100644 --- a/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_draw.sqf +++ b/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_draw.sqf @@ -20,6 +20,12 @@ params ["_action","_idx","_bidx","_mod"]; switch _action do { case "load": { + if (EPOCH_fav_resetOnLogin) then { + profileNamespace setVariable ["rmx_var_favBar_MNone",nil]; + profileNamespace setVariable ["rmx_var_favBar_MCtrl",nil]; + profileNamespace setVariable ["rmx_var_favBar_MShift",nil]; + profileNamespace setVariable ["rmx_var_favBar_MAlt",nil]; + }; rmx_var_favBar_MNone = profileNamespace getVariable ["rmx_var_favBar_MNone",["","","","",""]]; rmx_var_favBar_MCtrl = profileNamespace getVariable ["rmx_var_favBar_MCtrl",["","","","",""]]; rmx_var_favBar_MShift = profileNamespace getVariable ["rmx_var_favBar_MShift",["","","","",""]]; @@ -52,6 +58,7 @@ switch _action do { }; case "add": { + if (rmx_var_favBar_Item in EPOCH_fav_BannedItems) exitWith {"Item is not allowed in favorites!" call epoch_message; false}; if (rmx_var_favBar_Item in rmx_var_favBar_current) exitWith {"Item already exists in favorites!" call epoch_message; false}; //if duplicate _type = (rmx_var_favBar_Item call BIS_fnc_itemType) select 1; diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf index e8cb21bd..e5b2a0c8 100644 --- a/Sources/epoch_code/init/client_init.sqf +++ b/Sources/epoch_code/init/client_init.sqf @@ -69,7 +69,11 @@ EPOCH_fav_enableFavoriteBar = true; //If enabled, same slot weapons from favorites bar are equipped instantly, otherwise reload action is played (recommended for immersion) EPOCH_fav_FastWeaponSwitching = false; //If enabled and inventory full, equipped weapon will be dropped on ground in favor for the new selected weapon, otherwise action will fail with message and weapon will not be equipped -EPOCH_fav_DropIfOverflow = false; +EPOCH_fav_DropIfOverflow = false; +//Items that users are not allowed to pin +EPOCH_fav_BannedItems = ["FAK"]; //add items that can be abused here +//Reset all favorite items on every login (players will be required to re-add everything again). +EPOCH_fav_resetOnLogin = true; ["EPOCH_onEachFrame", "onEachFrame", EPOCH_onEachFrame] call BIS_fnc_addStackedEventHandler;