-
Notifications
You must be signed in to change notification settings - Fork 755
Goggles - Add Contact DLC respirator self interactions #10925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JetfireBlack
wants to merge
52
commits into
acemod:master
Choose a base branch
from
JetfireBlack:Respirator-Toggle
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 19 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
fe21afe
Adding respirator functions
JetfireBlack ce5ff59
Adding respirator equipment self interactions
JetfireBlack 2adc0a6
Adding respirator functions to prep
JetfireBlack 1709738
Adding respirator stringtable entries
JetfireBlack 453560a
Updated function names
JetfireBlack 1bcc725
Updated respirator function names
JetfireBlack 8c503f8
Update and rename fnc_connectRespirator.sqf to fnc_respiratorConnect.sqf
JetfireBlack 52c9821
Update and rename fnc_checkRespiratorConditions.sqf to fnc_respirator…
JetfireBlack 4bf002f
Update and rename fnc_respiratorCondition.sqf to fnc_respiratorCondit…
JetfireBlack 30aeca2
Update and rename fnc_hideHose.sqf to fnc_respiratorDisconnect.sqf
JetfireBlack 08a5372
Update and rename fnc_toggleMask.sqf to fnc_respiratorFilter.sqf
JetfireBlack d5124fe
respiratorCondition -> respiratorConditions
JetfireBlack b10e252
respiratorCondition -> respiratorConditions
JetfireBlack efb91dd
Added self to contributors
JetfireBlack 9886d5e
Enclosed argument in array
JetfireBlack 35c68ab
Added comments
JetfireBlack 5c85015
Added comments
JetfireBlack c11bc6b
Added comments
JetfireBlack 19fe34c
Added comments
JetfireBlack 857472b
Update addons/goggles/CfgVehicles.hpp
JetfireBlack 7c10fad
Update addons/goggles/CfgVehicles.hpp
JetfireBlack 07e3496
Update addons/goggles/CfgVehicles.hpp
JetfireBlack 2a7b583
Update addons/goggles/functions/fnc_respiratorConditions.sqf
JetfireBlack f30826f
Update addons/goggles/functions/fnc_respiratorConditions.sqf
JetfireBlack 7dec5ca
Update addons/goggles/functions/fnc_respiratorConditions.sqf
JetfireBlack 28b02be
Update addons/goggles/functions/fnc_respiratorConnect.sqf
JetfireBlack 6ca42a6
Update addons/goggles/functions/fnc_respiratorDisconnect.sqf
JetfireBlack 575537b
Update addons/goggles/functions/fnc_respiratorFilter.sqf
JetfireBlack 92fe424
Changed argument and changed public to no
JetfireBlack ba4beba
Removed duplicate _showAction
JetfireBlack b6b5092
Reverting accidental undoing of changes
JetfireBlack 0732b03
Update fnc_respiratorConnect.sqf
JetfireBlack 686486f
Update fnc_respiratorDisconnect.sqf
JetfireBlack fb62d41
Update fnc_respiratorFilter.sqf
JetfireBlack b5f2108
Update fnc_respiratorConditions.sqf
JetfireBlack 639a644
Update fnc_respiratorConnect.sqf public
JetfireBlack 5473660
Update fnc_respiratorDisconnect.sqf public
JetfireBlack 34d0d7c
Update fnc_respiratorFilter.sqf public
JetfireBlack a2cea02
Update CfgVehicles.hpp tabs to spaces
JetfireBlack adeeffc
Update fnc_respiratorConditions.sqf tabs to spaces
JetfireBlack ca7b492
Update fnc_respiratorConnect.sqf tabs to spaces
JetfireBlack 01e0abd
Update fnc_respiratorDisconnect.sqf tabs to spaces
JetfireBlack 834ba55
Update fnc_respiratorFilter.sqf tabs to spaces
JetfireBlack 7c659f5
Update fnc_respiratorConditions.sqf array indentation
JetfireBlack 67ed5b4
CfgVehicles.hpp adding fallbacks for respirator backpacks
JetfireBlack 9eaea36
CfgGlasses.hpp adding configs for respirators
JetfireBlack 0b53a72
XEH_preInit.sqf declaring variables for respirator pair caching
JetfireBlack b5723c8
rewrite of fnc_respiratorConditions.sqf
JetfireBlack d10c97d
rewrite of fnc_respiratorConnect.sqf
JetfireBlack 299f749
rewrite of fnc_respiratorDisconnect.sqf
JetfireBlack ab1d357
rewrite of fnc_respiratorFilter.sqf
JetfireBlack 9fc526f
Forgot to make _fnc_checkHose private
JetfireBlack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: JetfireBlack | ||
| * Checks if respirator interactions should be shown based on equipment combinations | ||
| * | ||
| * Arguments: | ||
| * 0: mode <STRING> | ||
|
JetfireBlack marked this conversation as resolved.
Outdated
|
||
| * | ||
| * Return Value: | ||
| * Should interaction be shown? <BOOL> | ||
| * | ||
| * Example: | ||
| * ["combo"] call ace_goggles_fnc_respiratorConditions | ||
|
JetfireBlack marked this conversation as resolved.
Outdated
|
||
| * | ||
| * Public: yes | ||
|
JetfireBlack marked this conversation as resolved.
Outdated
|
||
| */ | ||
|
|
||
| private _unit = ACE_player; | ||
|
|
||
| if (!local _unit) exitWith {false}; | ||
|
|
||
| params ["_mode"]; | ||
|
JetfireBlack marked this conversation as resolved.
Outdated
|
||
|
|
||
| private _goggles = goggles _unit; | ||
| private _backpack = backpackContainer _unit; | ||
| private _backpackType = backpack _unit; | ||
| private _objectTextures = getObjectTextures _backpack; | ||
| private _showAction = false; | ||
|
|
||
| // Contact DLC respirators | ||
| private _allowedGoggles = [ | ||
| "G_AirPurifyingRespirator_01_F", | ||
| "G_AirPurifyingRespirator_01_nofilter_F", | ||
| "G_AirPurifyingRespirator_02_black_F", | ||
| "G_AirPurifyingRespirator_02_black_nofilter_F", | ||
| "G_AirPurifyingRespirator_02_olive_F", | ||
| "G_AirPurifyingRespirator_02_olive_nofilter_F", | ||
| "G_AirPurifyingRespirator_02_sand_F", | ||
| "G_AirPurifyingRespirator_02_sand_nofilter_F", | ||
| "G_RegulatorMask_F" | ||
| ]; | ||
| // Contact DLC respirator backpacks | ||
| private _allowedBackpacks = [ | ||
| "B_CombinationUnitRespirator_01_F", | ||
| "B_SCBA_01_F" | ||
| ]; | ||
|
|
||
| if (isNull _backpack || {!(_backpackType in _allowedBackpacks)}) then {_objectTextures = ["","","","",""]}; | ||
|
|
||
| switch _mode do { | ||
| // only show when appropriate respirator and backpack are worn | ||
| case "combo": { | ||
| if !(_goggles in _allowedGoggles) exitWith {}; | ||
| if !(_backpackType in _allowedBackpacks) exitWith {}; | ||
| if (_objectTextures#1 isNotEqualTo "" || _objectTextures#2 isNotEqualTo "") exitWith {}; | ||
| _showAction = true; | ||
| }; | ||
| // always show when wearing mask with filters | ||
| case "mask": { | ||
| if !(_goggles in (_allowedGoggles - ["G_RegulatorMask_F"])) exitWith {}; | ||
| if (_objectTextures#1 isNotEqualTo "" || _objectTextures#2 isNotEqualTo "") exitWith {}; | ||
| _showAction = true; | ||
| }; | ||
| // shown only when hose is present regardless of respirator (Arma does not dynamically remove the hose) | ||
| case "hose": { | ||
| if !(_backpackType in _allowedBackpacks) exitWith {}; | ||
| if !(_objectTextures#1 isNotEqualTo "" || _objectTextures#2 isNotEqualTo "") exitWith {}; | ||
| _showAction = true; | ||
| }; | ||
| default {_showAction = false}; | ||
| }; | ||
| _showAction; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: Bohemia Interactive, adapted to ACE by JetfireBlack | ||
| * Removes respirator filter if it has one and connects appropriate backpack hose | ||
| * | ||
| * Arguments: | ||
| * None | ||
| * | ||
| * Return Value: | ||
| * None | ||
| * | ||
| * Example: | ||
| * call ace_goggles_fnc_respiratorConnect | ||
| * | ||
| * Public: yes | ||
|
JetfireBlack marked this conversation as resolved.
Outdated
|
||
| */ | ||
|
|
||
| private _unit = ACE_player; | ||
|
|
||
| if (!local _unit) exitWith {}; | ||
|
|
||
| private _goggles = goggles _unit; | ||
| private _backpack = backpackContainer _unit; | ||
| private _backpackType = backpack _unit; | ||
| private _objectTextures = getObjectTextures _backpack; | ||
|
|
||
| // shows correct hoses and removes filters for each respirator+backpack combination | ||
| if (_objectTextures#1 isEqualTo "" && _objectTextures#2 isEqualTo "") then { | ||
| switch true do { | ||
| case (_goggles in ["G_AirPurifyingRespirator_01_F", "G_AirPurifyingRespirator_01_nofilter_F"]): { | ||
| switch true do { | ||
| case (_backpackType isEqualTo "B_CombinationUnitRespirator_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_01_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [3, ""]; | ||
| }; | ||
| case (_backpackType isEqualTo "B_SCBA_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_01_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, ""]; | ||
| }; | ||
| }; | ||
| }; | ||
| case (_goggles in ["G_AirPurifyingRespirator_02_black_F", "G_AirPurifyingRespirator_02_black_nofilter_F"]): { | ||
| switch true do { | ||
| case (_backpackType isEqualTo "B_CombinationUnitRespirator_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_black_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [3, ""]; | ||
| }; | ||
| case (_backpackType isEqualTo "B_SCBA_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_black_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, ""]; | ||
| }; | ||
| }; | ||
| }; | ||
| case (_goggles in ["G_AirPurifyingRespirator_02_olive_F", "G_AirPurifyingRespirator_02_olive_nofilter_F"]): { | ||
| switch true do { | ||
| case (_backpackType isEqualTo "B_CombinationUnitRespirator_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_olive_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [3, ""]; | ||
| }; | ||
| case (_backpackType isEqualTo "B_SCBA_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_olive_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, ""]; | ||
| }; | ||
| }; | ||
| }; | ||
| case (_goggles in ["G_AirPurifyingRespirator_02_sand_F", "G_AirPurifyingRespirator_02_sand_nofilter_F"]): { | ||
| switch true do { | ||
| case (_backpackType isEqualTo "B_CombinationUnitRespirator_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_sand_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [3, ""]; | ||
| }; | ||
| case (_backpackType isEqualTo "B_SCBA_01_F"): { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_sand_nofilter_F"; | ||
|
|
||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, ""]; | ||
| }; | ||
| }; | ||
| }; | ||
| case (_goggles isEqualTo "G_RegulatorMask_F"): { | ||
| switch true do { | ||
| case (_backpackType isEqualTo "B_CombinationUnitRespirator_01_F"): { | ||
| _backpack setObjectTextureGlobal [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| _backpack setObjectTextureGlobal [2, ""]; | ||
| _backpack setObjectTextureGlobal [3, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; | ||
| }; | ||
| case (_backpackType isEqualTo "B_SCBA_01_F"): { | ||
| _backpack setObjectTextureGlobal [1, ""]; | ||
| _backpack setObjectTextureGlobal [2, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| default {}; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: JetfireBlack | ||
| * Hides backpack hose and reattaches respirator filter if there is one | ||
| * | ||
| * Arguments: | ||
| * None | ||
| * | ||
| * Return Value: | ||
| * None | ||
| * | ||
| * Example: | ||
| * call ace_goggles_fnc_respiratorDisconnect | ||
| * | ||
| * Public: yes | ||
|
JetfireBlack marked this conversation as resolved.
Outdated
|
||
| */ | ||
|
|
||
| private _unit = ACE_player; | ||
|
|
||
| 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 {}; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| #include "..\script_component.hpp" | ||
| /* | ||
| * Author: JetfireBlack | ||
| * Toggles respirator filter | ||
| * | ||
| * Arguments: | ||
| * None | ||
| * | ||
| * Return Value: | ||
| * None | ||
| * | ||
| * Example: | ||
| * call ace_goggles_fnc_respiratorFilter | ||
| * | ||
| * Public: yes | ||
|
JetfireBlack marked this conversation as resolved.
Outdated
|
||
| */ | ||
|
|
||
| private _unit = ACE_player; | ||
|
|
||
| if (!local _unit) exitWith {}; | ||
|
|
||
| private _goggles = goggles _unit; | ||
|
|
||
| // toggle filters | ||
| switch _goggles do { | ||
| case "G_AirPurifyingRespirator_01_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_01_nofilter_F"; | ||
| }; | ||
| case "G_AirPurifyingRespirator_02_black_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_black_nofilter_F"; | ||
| }; | ||
| case "G_AirPurifyingRespirator_02_olive_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_olive_nofilter_F"; | ||
| }; | ||
| case "G_AirPurifyingRespirator_02_sand_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_sand_nofilter_F"; | ||
| }; | ||
| case "G_AirPurifyingRespirator_01_nofilter_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_01_F"; | ||
| }; | ||
| case "G_AirPurifyingRespirator_02_black_nofilter_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_black_F"; | ||
| }; | ||
| case "G_AirPurifyingRespirator_02_olive_nofilter_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_olive_F"; | ||
| }; | ||
| case "G_AirPurifyingRespirator_02_sand_nofilter_F": { | ||
| _unit linkItem "G_AirPurifyingRespirator_02_sand_F"; | ||
| }; | ||
| default {}; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.