Merge pull request #2344 from acemod/322hideclock

hide clock on map if no watch in inventory, #414
This commit is contained in:
commy2 2015-09-03 13:44:20 +02:00
commit 736be74c2b
2 changed files with 14 additions and 1 deletions

View File

@ -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);

View File

@ -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);