Checkgear additions/tweaks after merge
This commit is contained in:
parent
1d00c8e1b0
commit
3792f097ce
|
@ -1,19 +1,19 @@
|
|||
/*
|
||||
F_checkGear
|
||||
F_checkGear
|
||||
|
||||
File: F_kp_checkGear.sqf
|
||||
Author: Wyqer - https://github.com/Wyqer
|
||||
Date: 2017-11-22
|
||||
Last Update: 2017-11-22
|
||||
File: F_kp_checkGear.sqf
|
||||
Author: Wyqer - https://github.com/Wyqer
|
||||
Date: 2017-11-22
|
||||
Last Update: 2019-07-23
|
||||
|
||||
Description:
|
||||
Checks the players gear for blacklisted items and report these items. Also returns if the player check was fine (true) or if he had bad items (false).
|
||||
Description:
|
||||
Checks the players gear for blacklisted items and report these items. Also returns if the player check was fine (true) or if he had bad items (false).
|
||||
|
||||
Parameter(s):
|
||||
0: STRING - Backpack classname of the players backpack as he entered the arsenal / load a loadout. (Default "")
|
||||
Parameter(s):
|
||||
0: STRING - Backpack classname of the players backpack as he entered the arsenal / load a loadout. (Default "")
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
|
||||
params [["_backpack", ""]];
|
||||
|
@ -51,7 +51,7 @@ _playerItems = _playerItems apply {toLower _x};
|
|||
_removedItems pushBack _x;
|
||||
player unassignItem _x;
|
||||
player removeItems _x;
|
||||
} forEach (((_playerItems arrayIntersect _playerItems) - KP_liberation_allowed_items) select { !(_x call F_isRadio) });
|
||||
} forEach (((_playerItems arrayIntersect _playerItems) - KP_liberation_allowed_items) select {!([_x] call F_isRadio)});
|
||||
|
||||
private _playerMagazines = ((getMagazineCargo (uniformContainer player)) select 0);
|
||||
_playerMagazines append ((getMagazineCargo (vestContainer player)) select 0);
|
||||
|
@ -99,10 +99,10 @@ _weaponItems = _weaponItems apply {toLower _x};
|
|||
|
||||
_removedItems = (_removedItems arrayIntersect _removedItems) - [""];
|
||||
if !(_removedItems isEqualTo []) then {
|
||||
private _text = format ["[KP LIBERATION] [BLACKLIST] Found %1 at Player %2", (_removedItems), name player];
|
||||
_text remoteExec ["diag_log",2];
|
||||
hint format [localize "STR_BLACKLISTED_ITEM_FOUND", _removedItems joinString "\n"];
|
||||
_return = false;
|
||||
private _text = format ["[KP LIBERATION] [BLACKLIST] Found %1 at Player %2", (_removedItems), name player];
|
||||
_text remoteExec ["diag_log",2];
|
||||
hint format [localize "STR_BLACKLISTED_ITEM_FOUND", _removedItems joinString "\n"];
|
||||
_return = false;
|
||||
};
|
||||
|
||||
_return
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
/*
|
||||
F_isRadio
|
||||
F_isRadio
|
||||
|
||||
File: F_kp_isRadio.sqf
|
||||
Author: Zharf
|
||||
Date: 2019-07-07
|
||||
Last Update: 2019-07-07
|
||||
File: F_kp_isRadio.sqf
|
||||
Author: Zharf - https://github.com/zharf
|
||||
Date: 2019-07-07
|
||||
Last Update: 2019-07-23
|
||||
|
||||
Description:
|
||||
Returns whether the provided item is a radio or not
|
||||
Description:
|
||||
Returns whether the provided item is a radio or not
|
||||
|
||||
Parameter(s):
|
||||
0: STRING - a class name to check
|
||||
Parameter(s):
|
||||
0: STRING - Classname to check. (Default "")
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
params ["_item"];
|
||||
|
||||
private _ret = false;
|
||||
if ((isClass (configFile >> "CfgPatches" >> "tfar_core")) || (isClass (configFile >> "CfgPatches" >> "task_force_radio"))) then {
|
||||
_ret = _item call TFAR_fnc_isRadio;
|
||||
} else {
|
||||
if (isClass (configFile >> "CfgPatches" >> "acre_api")) then {
|
||||
_ret = [_item] call acre_api_fnc_isRadio;
|
||||
};
|
||||
params [
|
||||
["_item", "", [""]]
|
||||
];
|
||||
|
||||
if ((isClass (configFile >> "CfgPatches" >> "tfar_core")) || (isClass (configFile >> "CfgPatches" >> "task_force_radio"))) exitWith {
|
||||
_item call TFAR_fnc_isRadio
|
||||
};
|
||||
|
||||
_ret
|
||||
if (isClass (configFile >> "CfgPatches" >> "acre_api")) exitWith {
|
||||
[_item] call acre_api_fnc_isRadio
|
||||
};
|
||||
|
||||
false
|
||||
|
|
|
@ -194,6 +194,7 @@ class Missions
|
|||
* Tweaked: Changes in elite vehicles in presets are now also applied during a running campaign.
|
||||
* Tweaked: Player lead squads are now also saved near FOBs. (but still needs to be reassigned via zeus after load, of course)
|
||||
* Tweaked: Weather is now only handled by the server.
|
||||
* Tweaked: Gear check after leaving the arsenal or load a loadout improved to not strip you completely. Thanks to [Zharf](https://github.com/zharf)
|
||||
* Fixed: Intel value could get corrupted if leaving the secondary dialog directly after starting a mission.
|
||||
* Fixed: "All is red" for first player after a server restart. (just a visual bug, doesn't affect gameplay)
|
||||
|
||||
|
|
Loading…
Reference in New Issue