diff --git a/game/fogg.ink b/game/fogg.ink
deleted file mode 100644
index 7772ffe..0000000
--- a/game/fogg.ink
+++ /dev/null
@@ -1,19 +0,0 @@
-- I looked at Monsieur Fogg
-* ... and I could contain myself no longer.Continues the story.
- 'What is the purpose of our journey, Monsieur?'
- 'A wager,' he replied.
- * * 'A wager!'[] I returned.
- He nodded.
- * * * 'But surely that is foolishness!'
- * * * 'A most serious matter then!'
- - - - He nodded again.
- * * * 'But can we win?'
- 'That is what we will endeavour to find out,' he answered.
- * * * 'A modest wager, I trust?'
- 'Twenty thousand pounds,' he replied, quite flatly.
- * * * I asked nothing further of him then[.], and after a final, polite cough, he offered nothing more to me. <>
- * * 'Ah[.'],' I replied, uncertain what I thought.
- - - After that, <>
-* ... but I said nothingEnds the story[] and <>
-- we passed the day in silence.
-- -> END
diff --git a/game/game.ink b/game/game.ink
new file mode 100644
index 0000000..5d4748e
--- /dev/null
+++ b/game/game.ink
@@ -0,0 +1,14 @@
+Интересное дело: когда друзья просят меня о помощи, я готов им помочь. Когда я оказываюсь заперт в хижине пятнадцатилетнего маньяка, никто не хочет поднимать трубку.
+ ->beginning
+
+=== beginning ===
+
++ [ОсмотретьсяСсылки с символом паузы доступны всегда и не будут продвигать сюжет.]
+ Это милая комната, ничего так.
+ ->beginning
+* Кричать[]?
+ Это заброшенная деревня, здесь нет людей. Ну, кроме маньяка.
+ Но его лучше не призывать. -> beginning
+* А вообще, лучше начать историю чуть раньше…
+ (Пятью минутами ранее) МАНЬЯК
+ ->END
diff --git a/js/script.js b/js/script.js
index 2068436..89e458d 100644
--- a/js/script.js
+++ b/js/script.js
@@ -1,6 +1,6 @@
import jQuery from 'jquery'
const inkjs = require('inkjs').Story;
-const entryPoint = 'game/fogg.ink.json';
+const entryPoint = 'game/game.ink.json';
let continueToNextChoice, displayText, loadGame, saveChoice, s;
@@ -58,6 +58,7 @@ continueToNextChoice = function(s) {
choice = ref[j];
let text = choice.text.replace('', '');
text = text.replace('', '')
+ text = text.replace('', '⏸️ ');
jQuery("#options").append(`${text}`);
}
jQuery("#options").fadeIn(500);
@@ -71,13 +72,26 @@ continueToNextChoice = function(s) {
};
loadGame = function(s) {
- let index, j, len, ref, results;
+ let index, j, ref, results;
ref = window.progress;
results = [];
- for (j = 0, len = ref.length; j < len; j++) {
- index = ref[j];
+ const len = ref.length;
+ while(s.canContinue) {
displayText(s, false);
- results.push(s.ChooseChoiceIndex(index));
+ }
+ for (j = 0; j < len; j++) {
+ index = ref[j];
+ if (!index) {
+ continue
+ }
+ if (!s.currentChoices[index]) {
+ continue
+ }
+ displayText(s, false);
+ s.ChooseChoiceIndex(index)
+ while(s.canContinue) {
+ displayText(s, false);
+ }
}
return results;
};
@@ -114,7 +128,7 @@ jQuery(document).on('click', "#options li a", function() {
});
jQuery(document).on('click', "#options li", function() {
s.ChooseChoiceIndex(jQuery(this).find('a').data("index"));
- saveChoice(jQuery(this).data("index"));
+ saveChoice(jQuery(this).find('a').data("index"));
continueToNextChoice(s);
return false;
});
diff --git a/webpack.config.js b/webpack.config.js
index 98106d5..38fbcf7 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -15,7 +15,7 @@ module.exports = {
onBeforeRun: [
{
cmd: "inklecate",
- args: ["game/fogg.ink"],
+ args: ["game/game.ink"],
options: {
cwd: process.cwd()
}