2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-03-20 02:32:44 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-03-20 02:32:44 +00:00
|
|
|
* Take full path and split it between parent path and action name
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Arguments:
|
2015-03-20 02:32:44 +00:00
|
|
|
* Full path of the action to remove <ARRAY>
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2015-03-20 02:32:44 +00:00
|
|
|
* 0: Parent path <ARRAY>
|
|
|
|
* 1: Action name <STRING>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [[path]] call ACE_interact_menu_fnc_splitPath
|
|
|
|
*
|
2015-03-20 02:32:44 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2016-01-08 04:43:37 +00:00
|
|
|
private _parentPath = [];
|
2024-05-22 01:18:32 +00:00
|
|
|
|
|
|
|
_parentPath append _this;
|
|
|
|
|
|
|
|
private _count = count _this;
|
|
|
|
|
|
|
|
private _actionName = if (_count > 0) then {
|
|
|
|
_parentPath deleteAt (_count - 1) // TODO: replace with _parentPath deleteAt [-1] and drop _count in 2.18
|
2015-03-21 12:37:01 +00:00
|
|
|
} else {
|
2015-04-06 16:22:43 +00:00
|
|
|
""
|
2015-03-21 12:37:01 +00:00
|
|
|
};
|
2015-03-20 02:32:44 +00:00
|
|
|
|
|
|
|
[_parentPath, _actionName]
|