Skip to content
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

Interaction Menu - Fix house actions icon #8641

Merged
merged 1 commit into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};

_args set [0, (getPosASL ace_player)];
} else {
_houseBeingScaned = _housesToScanForActions deleteAt 0;
private _houseBeingScaned = _housesToScanForActions deleteAt 0;
private _typeOfHouse = typeOf _houseBeingScaned;
//Skip this house for now if we are outside of it's radius
//(we have to scan far out for the big houses, but we don't want to waste time adding actions on every little shack)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ private _memPointsActions = [];
//Get the offset for a memory point:
private _fnc_getMemPointOffset = {
params ["_memoryPoint"];
_memPointIndex = _memPoints find _memoryPoint;
_actionOffset = [0,0,0];
private _memPointIndex = _memPoints find _memoryPoint;
private _actionOffset = [0,0,0];
if (_memPointIndex == -1) then {
_memPoints pushBack _memoryPoint;
_memPointsActions pushBack [];
Expand Down Expand Up @@ -82,7 +82,7 @@ for "_index" from 0 to ((count _configPath) - 1) do {
private _actionStatement = getText (_actionPath >> "statement");
private _actionMaxDistance = getNumber (_actionPath >> "radius");

if (_actionDisplayName == "") then {_actionDisplayName = (configName _x);};
if (_actionDisplayName == "") then {_actionDisplayName = configName _actionPath;};
if (_actionPosition == "") then {ERROR("Bad Position");};
if (_actionCondition == "") then {_actionCondition = "true";};
if (_actionStatement == "") then {ERROR("No Statement");};
Expand All @@ -91,12 +91,12 @@ for "_index" from 0 to ((count _configPath) - 1) do {
_actionCondition = compile _actionCondition;
_actionMaxDistance = _actionMaxDistance + 0.1; //increase range slightly

private _iconImage = ((_actionDisplayNameDefault regexFind ["[\w\-\\\/]+.paa/gi", 0]) param [0, [""]]) select 0;
private _iconImage = ((_actionDisplayNameDefault regexFind ["[\w\-\\\/]+.paa/gi", 0]) param [0, []]) param [0, []] param [0, ""];

private _actionOffset = [_actionPosition] call _fnc_getMemPointOffset;
private _memPointIndex = _memPoints find _actionPosition;

_action = [(configName _actionPath), _actionDisplayName, _iconImage, _fnc_userAction_Statement, _fnc_userAction_Condition, {}, [_actionStatement, _actionCondition], _actionOffset, _actionMaxDistance, [false,false,false,false,true]] call EFUNC(interact_menu,createAction);
private _action = [(configName _actionPath), _actionDisplayName, _iconImage, _fnc_userAction_Statement, _fnc_userAction_Condition, {}, [_actionStatement, _actionCondition], _actionOffset, _actionMaxDistance, [false,false,false,false,true]] call EFUNC(interact_menu,createAction);
(_memPointsActions select _memPointIndex) pushBack _action;
};

Expand Down