diff --git a/docs/HaloParachute/changelog.md b/docs/HaloParachute/changelog.md index 8caa68f..23006ca 100644 --- a/docs/HaloParachute/changelog.md +++ b/docs/HaloParachute/changelog.md @@ -1,6 +1,13 @@ #HaloParachute ## Changelog: +### 160510 18:00 . v0.7.4 +#### Added +* Feature - Customization for using key bindings instead of displayed addActions + +#### Deleted +* "mpmission\Exile.Altis\ExAdClient\HaloParachute\Functions\canDetachParachute.sqf + ### 160510 16:00 . v0.7.3 #### Fixed * Declaration of un custamized variables diff --git a/docs/HaloParachute/update.md b/docs/HaloParachute/update.md index 7c197ad..170a7b5 100644 --- a/docs/HaloParachute/update.md +++ b/docs/HaloParachute/update.md @@ -1,6 +1,12 @@ #HaloParachute ## Instructions: +### 160507 18:00 . v0.7.4 +#### Update +* Replace folder "mpmissions\Exile.\ExAdClient\HaloParachute\Functions" +* Replace file "mpmissions\Exile.\ExAdClient\HaloParachute\CfgFunctions.cpp" +* Replace file "mpmissions\Exile.\ExAdClient\HaloParachute\postInit.sqf" + ### 160507 16:00 . v0.7.3 #### Update * Replace "mpmissions\Exile.\ExAdClient\HaloParachute\postInit.sqf" diff --git a/docs/README.md b/docs/README.md index b5135f9..310a2c6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,14 @@ #Documentation -Each subfolder withholds the choosen dokumentation including installation instruction and examples on useage. +Each subfolder withholds the choosen documentation including installation instruction and examples on useage. + +To simplify the proccess for me, I've decided to simply devide everything and leave a changelog and update instructions in every subprojects documentation folder. This way you won't miss any information related to that subproject and it will be simple for me to keep the track off all changes with out skimming a general changelog. ## How to Update Since this project consist of multiple sub projects I've had some issues deciding how to structure the project for a simple update process. -To simplify the proccess for me, I've decided to simply devide everything and leave a changelog and update instructions in every subprojects client folder. This way you won't miss any information related to that subproject and it will be simple for me to keep the track off all changes with out skimming a general changelog. +#### Problems remember which version you have? +General update for all mods are to +* replace plugin specific server files +* Copy and save plugin specific customization file +* replace plugin client folder, e.g. "mpmission\Exile.\ExAdClient\HaloParachute" +* Compare old with new customize.sqf file - add extras \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/CfgFunctions.cpp index ed11310..59fa7c5 100644 --- a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/CfgFunctions.cpp +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/CfgFunctions.cpp @@ -20,7 +20,6 @@ class HaloParachute { file = "ExAdClient\HaloParachute\Functions"; - class canDetachParachute {}; class ejectPlayer {}; class parachutesafemode {}; class pullParachute {}; diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_canDetachParachute.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_canDetachParachute.sqf deleted file mode 100644 index ddb78d9..0000000 --- a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_canDetachParachute.sqf +++ /dev/null @@ -1,19 +0,0 @@ -/* - fn_showDetachParachute.sqf - - Copyright 2016 Jan Babor - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -((getPos player) select 2 > ExAd_ACTION_PARACHUTE_HEIGHT && vehicle player isKindOf "Steerable_Parachute_F") \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_pullParachute.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_pullParachute.sqf index 45bc451..6da370d 100644 --- a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_pullParachute.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/Functions/fn_pullParachute.sqf @@ -37,7 +37,7 @@ if(ExAd_HALOPARACHUTE_SAFE_MODE)then{ [ExAd_PARACHUTE_SAFE_THREAD] call ExileClient_system_thread_removeTask; }; -if(ExAd_HALOPARACHUTE_DETACH_PARACHUTE_MODE)then{ +if(ExAd_HALOPARACHUTE_USE_KEY_ACTIONS)then{ hint localize "STR_ExAd_HALOPARACHUTE_INFO_DETACH" }; diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/customize.sqf index 870bf85..0aef078 100644 --- a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/customize.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/customize.sqf @@ -17,7 +17,8 @@ */ ExAd_HALOPARACHUTE_SAFE_MODE = false; //BOOLEAN - Force pull parachute when player reaches ExAd_ACTION_PARACHUTE_HEIGHT if they ejected from vehicle -ExAd_HALOPARACHUTE_DETACH_PARACHUTE_MODE = false; //BOOLEAN - Allows player to detach himself from parachute +ExAd_HALOPARACHUTE_USE_ACTIONS = true; //BOOLEAN - Allows player to eject from all vehicles with a pressed key combination 'alt shift x' +ExAd_HALOPARACHUTE_USE_KEY_ACTIONS = true; //BOOLEAN - Show addActions on the screen ExAd_ACTION_PARACHUTE_HEIGHT = 10; //SCALAR - What is the minimum altitude a player can pull a parachute. |RECOMMENDED 30 meters when safe_mode activated -ExAd_ACTION_EJECT_HEIGHT = 100; //SCALAR - What is the minimum altitude a player can Halo/Eject from a vehicle. \ No newline at end of file +ExAd_ACTION_EJECT_HEIGHT = 100; //SCALAR - What is the minimum altitude a player can Halo/Eject from a vehicle. diff --git a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/postInit.sqf index 79d8a54..5eca15c 100644 --- a/mpmissions/Exile.Altis/ExAdClient/HaloParachute/postInit.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/HaloParachute/postInit.sqf @@ -17,12 +17,15 @@ */ +ExAd_HALOPARACHUTE_VERSION = "v0.7.4"; + execVM "ExAdClient\HaloParachute\customize.sqf"; if(isNil "ExAd_HALOPARACHUTE_SAFE_MODE"){ExAd_HALOPARACHUTE_SAFE_MODE = false;}; -if(isNil "ExAd_HALOPARACHUTE_DETACH_PARACHUTE_MODE"){ExAd_HALOPARACHUTE_DETACH_PARACHUTE_MODE = false;}; +if(isNil "ExAd_HALOPARACHUTE_USE_ACTIONS"){ExAd_HALOPARACHUTE_USE_ACTIONS = true;}; +if(isNil "ExAd_HALOPARACHUTE_USE_KEY_ACTIONS"){ExAd_HALOPARACHUTE_USE_KEY_ACTIONS = true;}; if(isNil "ExAd_ACTION_PARACHUTE_HEIGHT"){ExAd_ACTION_PARACHUTE_HEIGHT = 10;}; -if(isNil "ExAd_ACTION_EJECT_HEIGHT"){ExAd_ACTION_EJECT_HEIGHT = 100;}; +if(isNil "ExAd_ACTION_EJECT_HEIGHT"){ExAd_ACTION_EJECT_HEIGHT = 0;}; [] spawn { while {true} do { @@ -32,25 +35,33 @@ if(isNil "ExAd_ACTION_EJECT_HEIGHT"){ExAd_ACTION_EJECT_HEIGHT = 100;}; UISleep 0.1; waitUntil{alive player}; - ExAd_ACTION_PARACHUTE = player addaction [format["%1", localize "STR_ExAd_HALOPARACHUTE_ACTIONS_PARACHUTE"], {call ExAd_fnc_pullParachute}, [], 6, true, true, "", "call ExAd_fnc_showParachute"]; - ExAd_ACTION_EJECT = player addaction [format["%1", localize "STR_ExAd_HALOPARACHUTE_ACTIONS_HALO"], {call ExAd_fnc_ejectPlayer}, [], 6, false, true, "", "call ExAd_fnc_showEject;"]; + if(ExAd_HALOPARACHUTE_USE_ACTIONS)then{ + ExAd_ACTION_PARACHUTE = player addaction [format["%1", localize "STR_ExAd_HALOPARACHUTE_ACTIONS_PARACHUTE"], {call ExAd_fnc_pullParachute}, [], 6, true, true, "", "call ExAd_fnc_showParachute"]; + ExAd_ACTION_EJECT = player addaction [format["%1", localize "STR_ExAd_HALOPARACHUTE_ACTIONS_HALO"], {call ExAd_fnc_ejectPlayer}, [], 6, false, true, "", "call ExAd_fnc_showEject;"]; + }; - if(ExAd_HALOPARACHUTE_DETACH_PARACHUTE_MODE)then{ - ExAd_ACTION_PARACHUTE_DETACH = (findDisplay 46) displayAddEventHandler ["KeyDown",{ - if(call ExAd_fnc_canDetachParachute)then{ - if(_this select 1 == 45 && _this select 2 && _this select 4)then{ + if(ExAd_HALOPARACHUTE_USE_KEY_ACTIONS)then{ + ExAd_ACTION_HALOPARACHUTE_USE_KEY_ACTIONS = (findDisplay 46) displayAddEventHandler ["KeyDown",{ + if(_this select 1 == 45 && _this select 2 && _this select 4)then{ + if((getPos player) select 2 > ExAd_ACTION_EJECT_HEIGHT && vehicle player != player)then{ call ExAd_fnc_ejectPlayer - } + }else{ + if(ExAd_fnc_showParachute)then{ + call ExAd_fnc_pullParachute + } + } } }]; }; waitUntil{!alive player}; - player removeAction ExAd_ACTION_PARACHUTE; - player removeAction ExAd_ACTION_EJECT; + if(ExAd_HALOPARACHUTE_USE_ACTIONS)then{ + player removeAction ExAd_ACTION_PARACHUTE; + player removeAction ExAd_ACTION_EJECT; + }; - if(ExAd_HALOPARACHUTE_DETACH_PARACHUTE_MODE)then{ - (findDisplay 46) displayRemoveEventHandler ["KeyDown", ExAd_ACTION_PARACHUTE_DETACH]; + if(ExAd_HALOPARACHUTE_USE_KEY_ACTIONS)then{ + (findDisplay 46) displayRemoveEventHandler ["KeyDown", ExAd_ACTION_HALOPARACHUTE_USE_KEY_ACTIONS]; }; }; }; \ No newline at end of file