Skip to content

Commit

Permalink
fixed whatsapp event as the link is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
prakharjain3 committed Mar 21, 2023
1 parent 465a966 commit b6fadd8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
10 changes: 7 additions & 3 deletions js/OverworldEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class OverworldEvent {
const obj = this.map.gameObjects[this.event.faceHero];
obj.direction = utils.oppositeDirection(this.map.gameObjects['hero'].direction);
}

const message = new TextMessage({
text: this.event.text,
onComplete: () => resolve()
Expand All @@ -76,8 +75,13 @@ class OverworldEvent {
}

redirectPerson(resolve) {
let link = this.event.link;
let newTab = this.event.newTab || false; // NOT WORKING. Always opening new tab
let link = this.event.link || true;

if(link === true) {
return ;
}

let newTab = this.event.newTab; // NOT WORKING. Always opening new tab
if(newTab) {
window.open(link, '_blank');
} else {
Expand Down
6 changes: 4 additions & 2 deletions js/OverworldMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,10 @@ window.OverworldMaps = {
linkedinPerson2: getRoute(38,39,"LinkedIn", "https://www.linkedin.com/company/acmvit/"),
facebookPerson1: getRoute(26,42,"Facebook", "https://www.facebook.com/acmvitchapter/"),
facebookPerson2: getRoute(25,42,"Facebook", "https://www.facebook.com/acmvitchapter/"),
whatsappPerson1: getRoute(45,32,"Kick Start Learn Program", "https://with.acmvit.in/ksl"),
whatsappPerson2: getRoute(46,32,"Kick Start Learn Program", "https://with.acmvit.in/ksl"),
// whatsappPerson1: getRoute(45,32,"Kick Start Learn Program", "https://with.acmvit.in/ksl"),
// whatsappPerson2: getRoute(46,32,"Kick Start Learn Program", "https://with.acmvit.in/ksl"),
// whatsappPerson1: getRoute(45,32,"", ""),
// whatsappPerson2: getRoute(46,32,"", ""),
mailboxPerson1: getRoute(39,27,"Email", "https://mail.google.com/mail/u/0/?view=cm&fs=1&tf=1&source=mailto&[email protected]"),
mailboxPerson2: getRoute(39,28,"Email", "https://mail.google.com/mail/u/0/?view=cm&fs=1&tf=1&source=mailto&[email protected]"),

Expand Down
3 changes: 3 additions & 0 deletions js/walls.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,7 @@ const WALLS = {
[utils.asGridCoord(21,45)]: true,
[utils.asGridCoord(-4,32)]: true,
[utils.asGridCoord(0,30)]: true,

[utils.asGridCoord(45,32)]: true,
[utils.asGridCoord(46,32)]: true,
};

0 comments on commit b6fadd8

Please sign in to comment.