mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Code cleanup of Backpacks module
This commit is contained in:
parent
57d484d382
commit
5597b7e40c
@ -1,3 +1,3 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);
|
["backpackOpened", DFUNC(backpackOpened)] call EFUNC(common,addEventHandler);
|
||||||
|
@ -17,5 +17,6 @@ params ["_unit","_backpack"];
|
|||||||
_target = objNull;
|
_target = objNull;
|
||||||
{
|
{
|
||||||
if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"};
|
if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"};
|
||||||
} forEach nearestObjects [_unit, ["Man"],2];
|
} count nearestObjects [_unit, ["Man"], 5];
|
||||||
|
if (isNull _target) exitWith {ACE_Player};
|
||||||
_target
|
_target
|
||||||
|
@ -11,9 +11,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_backpack", "_config"];
|
private ["_config"];
|
||||||
|
params ["_backpack"];
|
||||||
_backpack = _this select 0;
|
|
||||||
|
|
||||||
if (typeName _backpack == "OBJECT") then {
|
if (typeName _backpack == "OBJECT") then {
|
||||||
_backpack = typeOf _backpack;
|
_backpack = typeOf _backpack;
|
||||||
|
Loading…
Reference in New Issue
Block a user