From 2470d23f7cd0d0e9964aa57594dc8c7d731d561f Mon Sep 17 00:00:00 2001 From: BroBeans Date: Wed, 11 Dec 2024 22:28:43 +0800 Subject: [PATCH] Add skis to in-game customisation options (#469) * Revert "Feature/ace skis (#168)" This reverts commit 9b9075a304857b1c07d23f50be48cd76931d4115. * obsolete file * add ski interactions --- addons/uh60_misc/XEH_postInit.sqf | 22 +++--------- addons/uh60_misc/config/cfgAceInteract.hpp | 41 ---------------------- 2 files changed, 4 insertions(+), 59 deletions(-) delete mode 100644 addons/uh60_misc/config/cfgAceInteract.hpp diff --git a/addons/uh60_misc/XEH_postInit.sqf b/addons/uh60_misc/XEH_postInit.sqf index cb9ac662..abc49675 100644 --- a/addons/uh60_misc/XEH_postInit.sqf +++ b/addons/uh60_misc/XEH_postInit.sqf @@ -168,21 +168,7 @@ private _customizationOptions = [ ["vtx_h60_base",0,[],(_removeOption call ace_interact_menu_fnc_createAction), true] call ace_interact_menu_fnc_addActionToClass; } forEach _customizationOptions; -params ["_heli"]; -private _displayName = "Skis"; -private _condition = {true}; -private _statement = {}; -private _action = ["vtx_skis",_displayName, "", _statement, _condition] call ace_interact_menu_fnc_createAction; -["vtx_H60_base", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass; - -_displayName = "Install Skis"; -_condition = {((_this select 0) animationPhase "skis") == 0}; -_statement = {(_this select 0) animate ["skis", 1];}; -_action = ["vtx_skis",_displayName, "", _statement, _condition] call ace_interact_menu_fnc_createAction; -["vtx_H60_base", 0, ["ACE_MainActions","vtx_skis"], _action, true] call ace_interact_menu_fnc_addActionToClass; - -_displayName = "Uninstall Skis"; -_condition = {((_this select 0) animationPhase "skis") == 1}; -_statement = {(_this select 0) animate ["skis", 0];}; -_action = ["vtx_skis",_displayName, "", _statement, _condition] call ace_interact_menu_fnc_createAction; -["vtx_H60_base", 0, ["ACE_MainActions","vtx_skis"], _action, true] call ace_interact_menu_fnc_addActionToClass; +_action = ["vtx_skis_add","Install Skis", "", {(_target) animateSource ["skis_show", 1];}, {((_target) animationSourcePhase "skis_show") < 0.1}, nil, [parameters], [1.33319,2.8541,-1.6735]] call ace_interact_menu_fnc_createAction; +["vtx_H60_base", 0, [], _action, true] call ace_interact_menu_fnc_addActionToClass; +_action = ["vtx_skis_remove","Uninstall Skis", "", {(_target) animateSource ["skis_show", 0];}, {((_target) animationSourcePhase "skis_show") > 0.9}, nil, [parameters], [1.33319,2.8541,-1.6735]] call ace_interact_menu_fnc_createAction; +["vtx_H60_base", 0, [], _action, true] call ace_interact_menu_fnc_addActionToClass; diff --git a/addons/uh60_misc/config/cfgAceInteract.hpp b/addons/uh60_misc/config/cfgAceInteract.hpp deleted file mode 100644 index 3b7e50fd..00000000 --- a/addons/uh60_misc/config/cfgAceInteract.hpp +++ /dev/null @@ -1,41 +0,0 @@ -class AceInteract { - class cabindoor_R_Open { - displayName = "Open Door"; - condition = "(_target animationPhase ""cabindoor_L"") > 0 "; - statement = "_target animateSource [""cabindoor_R"", 0];"; - selection = "cabindoor_R_handle"; - exceptions[] = {"isNotInside", "isNotSwimming"}; - distance = 5; - }; // cabindoor_R - - class cabindoor_R_Close: cabindoor_R_Open { - displayName = "Close door"; - selection = "cabindoor_R_handle"; - condition = "(_target animationPhase ""cabindoor_R"") < 1 "; - statement = "_target animateSource [""cabindoor_R"", 1];"; - }; - - class cabindoor_L_Open: cabindoor_R_Open { - selection = "cabindoor_L_handle"; - condition = "(_target animationPhase ""cabindoor_L"") > 0 "; - statement = "_target animateSource [""cabindoor_L"", 0];"; - }; - - class cabindoor_L_Close: cabindoor_L_Open { - selection = "cabindoor_L_handle"; - condition = "(_target animationPhase ""cabindoor_L"") < 1 "; - statement = "_target animateSource [""cabindoor_L"", 1];"; - }; - - class set_skis : cabindoor_R_Open { - displayName = "Install Skis"; - condition = "(_target animationPhase ""skis"") < 1"; - statement = "_target animate [""skis"", 1];"; - }; - - class remove_skis : set_skis { - displayName = "Uninstall Skis"; - condition = "(_target animationPhase ""skis"") > 0"; - statement = "_target animate [""skis"", 0];"; - }; -}; \ No newline at end of file