Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private _holdActionID = 0;
- private _holdActionIDs = [];
- {
- private _textInfo = getText (_x >> "text");
- private _actioniconInfo = getText (_x >> "icon");
- private _idleiconInfo = getText (_x >> "icon");
- private _modelInfo = getArray (_x >> "models");
- private _objectsList = missionNamespace getVariable ["ExileClientSavengedObjects", []];
- private _playerCursorTarget = [];
- private _playerCursorTargetParams = [];
- private _parent = [];
- _playerCursorTarget = lineIntersectsSurfaces [
- AGLToASL positionCameraToWorld [0,0,0],
- AGLToASL positionCameraToWorld [0,0,5],
- player,
- objNull,
- true,
- 1,
- "GEOM",
- "NONE"
- ];
- _playerCursorTargetParams = (_playerCursorTarget select 0);
- _parent = (_playerCursorTargetParams select 3);
- _modelInfoTarget = str (getModelInfo _parent select 0);
- _condition = format ["((%1 in %2) && !(%1 in (missionNamespace getVariable ['ExileClientSavengedObjects', []])) && (player getVariable ['CanScavenge', true]) && (vehicle player == player))", _modelInfoTarget, _modelInfo];
- private _configClassName = configName _x;
- _holdActionID =
- [
- player, _textInfo, _actioniconInfo, _idleiconInfo, _condition, "_caller distance _target < 5", {},
- {
- private _progressTick = _this select 4;
- if (_progressTick % 2 == 0) exitwith {};
- playsound3d [((getarray (configfile >> "CfgSounds" >> "Orange_Action_Wheel" >> "sound")) param [0,""]) + ".wss",player,false,getposasl player,1,0.9 + 0.2 * _progressTick / 24];
- },
- {
- _configClassName = (_this select 3) select 0;
- [_configClassName] call ExileExpansionClient_system_scavenge_action_conditionEvents;
- },
- {},
- [_configClassName], 0.5, 0, false
- ] call ExileExpansionClient_gui_holdActionAdd;
- _holdActionIDs pushBack _holdActionID;
- } forEach ("true" configClasses (missionConfigFile >> "CfgExileScavenge"));
- player setVariable ["ExileScavangeActionIDs", _holdActionIDs];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement