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

hide clock on map if no watch in inventory, #414 #2344

Merged
merged 5 commits into from
Sep 3, 2015
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
12 changes: 11 additions & 1 deletion addons/map/XEH_postInitClient.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,14 @@ call FUNC(determineZoom);
}] call EFUNC(common,addEventHandler);
};
};
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);

// hide clock on map if player has no watch
GVAR(hasWatch) = true;

["playerInventoryChanged", {
if (isNull (_this select 0)) exitWith {
GVAR(hasWatch) = true;
};
GVAR(hasWatch) = "ItemWatch" in (_this select 1 select 17);
}] call EFUNC(common,addEventHandler);
3 changes: 3 additions & 0 deletions addons/map/functions/fnc_onDrawMap.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
#include "script_component.hpp"

((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates);

// hide clock when no watch in inventory, or whatever never ever
((_this select 0) displayCtrl 101) ctrlShow GVAR(hasWatch);