-
Notifications
You must be signed in to change notification settings - Fork 749
Expand file tree
/
Copy pathfnc_respiratorDisconnect.sqf
More file actions
55 lines (50 loc) · 1.64 KB
/
fnc_respiratorDisconnect.sqf
File metadata and controls
55 lines (50 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "..\script_component.hpp"
/*
* Author: JetfireBlack
* Hides backpack hose and reattaches respirator filter if there is one
*
* Arguments:
* 0: Optional unit <OBJECT> (default: ACE_player)
*
* Return Value:
* None
*
* Examples:
* [player] call ace_goggles_fnc_respiratorDisconnect
* call ace_goggles_fnc_respiratorDisconnect
*
* Public: Yes
*/
params [["_unit", ACE_player, [objNull]]];
if (!local _unit) exitWith {};
private _goggles = goggles _unit;
private _backpack = backpackContainer _unit;
private _backpackType = backpack _unit;
// remove hoses
switch _backpackType do {
case "B_CombinationUnitRespirator_01_F": {
_backpack setObjectTextureGlobal [1, ""];
_backpack setObjectTextureGlobal [2, ""];
_backpack setObjectTextureGlobal [3, ""];
};
case "B_SCBA_01_F": {
_backpack setObjectTextureGlobal [1, ""];
_backpack setObjectTextureGlobal [2, ""];
};
};
// add filters back
switch true do {
case (_goggles in ["G_AirPurifyingRespirator_01_F", "G_AirPurifyingRespirator_01_nofilter_F"]): {
_unit linkItem "G_AirPurifyingRespirator_01_F";
};
case (_goggles in ["G_AirPurifyingRespirator_02_black_F", "G_AirPurifyingRespirator_02_black_nofilter_F"]): {
_unit linkItem "G_AirPurifyingRespirator_02_black_F";
};
case (_goggles in ["G_AirPurifyingRespirator_02_olive_F", "G_AirPurifyingRespirator_02_olive_nofilter_F"]): {
_unit linkItem "G_AirPurifyingRespirator_02_olive_F";
};
case (_goggles in ["G_AirPurifyingRespirator_02_sand_F", "G_AirPurifyingRespirator_02_sand_nofilter_F"]): {
_unit linkItem "G_AirPurifyingRespirator_02_sand_F";
};
default {};
};