-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathHidden Prompt.i7x
103 lines (80 loc) · 4.19 KB
/
Hidden Prompt.i7x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Version 1/210618 of Hidden Prompt by Daniel Stelzer begins here.
"Provides a simple way to hide the command prompt during long stretches of text."
"inspired by Command Prompt On Cue by Ron Newcomb"
[ Fixed typo in title and added version number -- Zed Lopez ]
Include Basic Screen Effects by Emily Short.
Include Command Preloading by Daniel Stelzer.
Section A
Hidden prompt is initially false.
The implicit hidden-prompt command is initially "wait".
The former prompt is initially "".
To say (X - number) as a key: (- print (char) {X}; -).
The hidden-prompt signal is initially "[close bracket] ".
Rule for reading a command when hidden prompt is true (this is the hidden prompt command rule):
say "[italic type][implicit hidden-prompt command][roman type][line break]";
change the text of the player's command to the implicit hidden-prompt command.
Section B1 (for use with Command Modification by Daniel Stelzer)
To hide the command prompt:
if the command override queue is not empty, stop;
if hidden prompt is true, stop;
now the former prompt is the command prompt;
now the command prompt is the hidden-prompt signal;
now hidden prompt is true.
To hide the command prompt with implicit command (T - text):
if the command override queue is not empty, stop;
if hidden prompt is true, stop;
now the implicit hidden-prompt command is T;
hide the command prompt.
To show the command prompt:
if the command override queue is not empty, stop;
if hidden prompt is false, stop;
now the command prompt is the former prompt;
now hidden prompt is false.
Section B2 (for use without Command Modification by Daniel Stelzer)
To hide the command prompt:
if hidden prompt is true, stop;
now the former prompt is the command prompt;
now the command prompt is the hidden-prompt signal;
now hidden prompt is true.
To hide the command prompt with implicit command (T - text):
if hidden prompt is true, stop;
now the implicit hidden-prompt command is T;
hide the command prompt.
To show the command prompt:
if hidden prompt is false, stop;
now the command prompt is the former prompt;
now hidden prompt is false.
Section C1 (for use with Command Preloading by Daniel Stelzer)
Before reading a command when hidden prompt is true (this is the hidden prompt interruption rule):
say "[hidden-prompt signal][run paragraph on]";
let X be the chosen letter;
unless X is 13 or X is 31 or X is 32 or X is -6 or X is 127:
preload the command "[X as a key]";
now the command prompt is the former prompt;
now hidden prompt is false.
Section C2 (for use without Command Preloading by Daniel Stelzer)
The saved first letter is initially "".
Before reading a command when hidden prompt is true (this is the hidden prompt interruption rule):
say "[hidden-prompt signal][run paragraph on]";
let X be the chosen letter;
unless X is 13 or X is 31 or X is 32 or X is -6 or X is 127:
now the saved first letter is "[X as a key]";
now the command prompt is "[former prompt][saved first letter]";
now hidden prompt is false.
Rule for printing a parser error when the latest parser error is I beg your pardon error and the saved first letter is not empty (this is the hidden prompt single-letter command failure rule):
now the command prompt is the former prompt;
now the saved first letter is "".
First after reading a command when hidden prompt is false and the saved first letter is not empty (this is the hidden prompt correct first keystroke rule):
now the command prompt is the former prompt;
change the text of the player's command to "[saved first letter][player's command]";
[say "(changed to [player's command])[command clarification break]";]
now the saved first letter is "".
Hidden Prompt ends here.
---- DOCUMENTATION ----
This works similarly to Command Prompt On Cue by Ron Newcomb, but is (almost) pure I7 and thus unlikely to break with new updates. The most important phrases are these:
hide the command prompt
This makes the command prompt invisible until the player attempts to type a command.
hide the command prompt with implicit command (T - text)
This is the same as the above, but supplies T instead of "wait" if the player doesn't type anything.
show the command prompt
If the player never interrupted, this ends the sequence.