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

Map Tools - Fix tools showing after item is dropped out of inventory #9749

Merged
merged 2 commits into from
Jan 22, 2024
Merged
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
13 changes: 3 additions & 10 deletions addons/maptools/functions/fnc_updateMapToolMarkers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,8 @@ if (GVAR(plottingBoard_Shown) == 0) then {
_y set [4, 0];
};
} forEach GVAR(plottingBoard_markers);
};

if (((GVAR(mapTool_Shown) == 0) && {GVAR(plottingBoard_Shown) == 0}) || {
private _uniqueItems = ACE_player call EFUNC(common,uniqueItems);

!(("ACE_MapTools" in _uniqueItems) || {"ACE_PlottingBoard" in _uniqueItems})
}) exitWith {};

if (GVAR(plottingBoard_Shown) > 0) then {
} else {
if !([ACE_player, "ACE_PlottingBoard"] call EFUNC(common,hasItem)) exitWith {};
if (GVAR(plottingBoard_moveToMouse)) then {
GVAR(plottingBoard_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition;
GVAR(plottingBoard_moveToMouse) = false; // we only need to do this once after opening the map tool
Expand Down Expand Up @@ -97,7 +90,7 @@ if (GVAR(plottingBoard_Shown) > 0) then {
} forEach GVAR(plottingBoard_markers);
};

if (GVAR(mapTool_Shown) > 0) then {
if ((GVAR(mapTool_Shown) > 0) && {[ACE_player, "ACE_MapTools"] call EFUNC(common,hasItem)}) then {
// Open map tools in center of screen when toggled to be shown
if (GVAR(mapTool_moveToMouse)) then {
GVAR(mapTool_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition;
Expand Down