Skip to content

Commit e4083a2

Browse files
committed
Small improvements
1 parent 86a0c40 commit e4083a2

11 files changed

Lines changed: 41 additions & 35 deletions

File tree

core/lib/FancyError.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class FancyError {
2626
<p>Remember you can always ask for more help if you need it at:</p>
2727
<p><b>Discord</b>: <a href='https://discord.gg/gWSeDTz' target='_blank'>https://discord.gg/gWSeDTz</a></p>
2828
<p><b>GitHub</b>: <a href='https://github.com/Monogatari/Monogatari/issues/' target='_blank'>https://github.com/Monogatari/Monogatari/issues/</a></p>
29-
<p><b>Email</b>: <a href='mailto:diego@hyuchia.com' target='_blank'>Send a mail to the creator</a></p>
29+
<p><b>Twitter</b>: <a href='https://twitter.com/monogatari' target='_blank'>https://twitter.com/monogatari</a></p>
3030
</div>
3131
<button>Ok</button>
3232
</div>
@@ -73,7 +73,7 @@ export class FancyError {
7373
<p>Remember you can always ask for more help if you need it at:</p>
7474
<p><b>Discord</b>: <a href='https://discord.gg/gWSeDTz' target='_blank'>https://discord.gg/gWSeDTz</a></p>
7575
<p><b>GitHub</b>: <a href='https://github.com/Monogatari/Monogatari/issues/' target='_blank'>https://github.com/Monogatari/Monogatari/issues/</a></p>
76-
<p><b>Email</b>: <a href='mailto:diego@hyuchia.com' target='_blank'>Send a mail to the creator</a></p>
76+
<p><b>Twitter</b>: <a href='https://twitter.com/monogatari' target='_blank'>https://twitter.com/monogatari</a></p>
7777
</div>
7878
<button>Ok</button>
7979
</div>

core/lib/actions/Conditional.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ export class Conditional extends Action {
5151
});
5252
}
5353

54-
// TODO: Conditionals are not reversible right now because there's no way to
55-
// tell what they actually did in all cases. And there's also no history on
56-
// what function was applied.
5754
willRevert () {
5855
if (Monogatari.history ('conditional').length > 0) {
5956
const conditional = Monogatari.history ('conditional')[Monogatari.history ('conditional').length - 1];
@@ -66,9 +63,7 @@ export class Conditional extends Action {
6663

6764
revert () {
6865
const conditional = Monogatari.history ('conditional')[Monogatari.history ('conditional').length - 1];
69-
return Monogatari.revert (this.statement[conditional], false).then (() => {
70-
//return Monogatari.run (this.statement);
71-
});
66+
return Monogatari.revert (this.statement[conditional], false);
7267
}
7368

7469
didRevert () {

core/lib/actions/Message.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,17 @@ export class Message extends Action {
100100
}
101101

102102
apply () {
103+
// Check if the old format is being use and translate it to the new one
104+
if (this.message.Title && this.message.Subtitle && this.message.Message) {
105+
this.message.title = this.message.Title;
106+
this.message.subtitle = this.message.Subtitle;
107+
this.message.body = this.message.Message;
108+
}
109+
103110
$_(`${Monogatari.selector} [data-screen="game"] #components`).append (Monogatari.component ('MESSAGE').render (this.message.title, this.message.subtitle, this.message.body));
104111

112+
$_(`${Monogatari.selector} [data-ui="messages"]`).addClass ('animated');
113+
105114
for (const newClass of this.classes) {
106115
$_(`${Monogatari.selector} [data-ui="messages"]`).addClass (newClass);
107116
}

core/style/monogatari.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,11 @@ input[type=range] {
775775
height: 3.5rem;
776776
}
777777

778+
[data-ui='quick-menu'] > button {
779+
width: auto;
780+
height: auto;
781+
}
782+
778783
.modal > * {
779784
width: 60%;
780785
}

debug/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ window.addEventListener('error', (event) => {
1717
'Line': lineno,
1818
'Help': {
1919
'_': 'This is most likely a scripting error, please check your script and JavaScript code for missing commas or incorrect syntax.',
20-
'_1': 'There may be additional information on your browser’s console.'
20+
'_1': 'There may be additional information on your browser’s console. You can open your console by pressing Ctrl + Shift + I'
2121
}
2222
}
2323
);

dist/engine/debug.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine/debug.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine/monogatari.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine/monogatari.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine/monogatari.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)