Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- const oldSeeUnit = Team.prototype.canSeeUnit;
- let seeAllYes = false;
- let seeAllInterval = null;
- window.seeAll = function(yes) {
- if (typeof yes === 'undefined') {
- yes = !seeAllYes;
- }
- clearInterval(seeAllInterval);
- if (yes) {
- seeAllInterval = setInterval(() => game.buildings.forEach(b => {
- if (b.owner.team !== PLAYING_PLAYER.team && b.owner.team.number !== 0) {
- b.seenBy[PLAYING_PLAYER.team.number] = b.seenBy[b.owner.team.number];
- }
- }), 250);
- Team.prototype.canSeeUnit = () => true;
- } else {
- Team.prototype.canSeeUnit = oldSeeUnit;
- }
- seeAllYes = yes;
- }
- window.addEventListener('keydown', e => {
- if (e.keyCode === 115)
- seeAll();
- });
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement