mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Favbar added: Banned items list and reset favbar on every login
This commit is contained in:
parent
80329a9b16
commit
2f5fe0f149
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user