mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
- added link to doublespeak
- added cross-promotion event for Penrose - removed dead Dropbox code
This commit is contained in:
+1
-1
@@ -247,7 +247,7 @@
|
||||
Engine.saveLanguage();
|
||||
Engine.travelTo(Room);
|
||||
|
||||
setTimeout(notifyAboutSound, 3000);
|
||||
setTimeout(notifyAboutSound, 3000);
|
||||
|
||||
},
|
||||
resumeAudioContext: function () {
|
||||
|
||||
+10
-1
@@ -21,7 +21,8 @@ var Events = {
|
||||
Events.EventPool = [].concat(
|
||||
Events.Global,
|
||||
Events.Room,
|
||||
Events.Outside
|
||||
Events.Outside,
|
||||
Events.Marketing
|
||||
);
|
||||
|
||||
Events.eventStack = [];
|
||||
@@ -995,6 +996,14 @@ var Events = {
|
||||
Notifications.notify(null, info.notification);
|
||||
}
|
||||
|
||||
info.onClick && info.onClick();
|
||||
|
||||
// Link
|
||||
if (info.link) {
|
||||
Events.endEvent();
|
||||
window.open(info.link);
|
||||
}
|
||||
|
||||
// Next Scene
|
||||
if(info.nextScene) {
|
||||
if(info.nextScene == 'end') {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
Module for triggering marketing messages
|
||||
@author mtownsend
|
||||
@since Jan 2021
|
||||
*/
|
||||
|
||||
Events.Marketing = [{
|
||||
/* Play Penrose! */
|
||||
title: _('Penrose'),
|
||||
isAvailable: () => !$SM.get('marketing.penrose'),
|
||||
scenes: {
|
||||
'start': {
|
||||
text: [
|
||||
_('a strange thrumming, pounding and crashing. visions of people and places, of a huge machine and twisting curves.'),
|
||||
_('inviting. it would be so easy to give in, completely.')
|
||||
],
|
||||
notification: _('a strange thrumming, pounding and crashing. and then gone.'),
|
||||
blink: true,
|
||||
buttons: {
|
||||
'give in': {
|
||||
text: _('give in'),
|
||||
onClick: () => {
|
||||
$SM.set('marketing.penrose', true);
|
||||
},
|
||||
link: 'https://penrose.doublespeakgames.com'
|
||||
},
|
||||
'ignore': {
|
||||
text: _('ignore it'),
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
audio: AudioLibrary.EVENT_NOISES_INSIDE
|
||||
}];
|
||||
Reference in New Issue
Block a user