Resolve pending gameplay tickets
This commit is contained in:
parent
ec20778215
commit
c2ebbfaa2d
28 changed files with 618 additions and 188 deletions
|
|
@ -21,10 +21,10 @@ extends SceneTree
|
|||
# E. it types while the game is stopped, being the one node still running
|
||||
# F. the sci-fi part: the panel is drawn differently while decoding, and
|
||||
# settles when the line is complete
|
||||
# G. #168 - a KEY does exactly what a click does, both halves of it, since
|
||||
# the game is played on a desktop with WASD and a mouse and pressing
|
||||
# space at a dialog reached nothing at all. Modifiers alone and held-key
|
||||
# echoes are not presses, or a line would be run out by a held key.
|
||||
# G. #175 - keyboard presses do not finish or dismiss a dialog; only a
|
||||
# deliberate tap/click advances it
|
||||
# H. #178 - revealed text is seated at the left edge rather than growing
|
||||
# outward from the middle
|
||||
|
||||
var game_state: Node
|
||||
var scene: Node
|
||||
|
|
@ -90,6 +90,8 @@ func _process(delta: float) -> bool:
|
|||
return _fail("the label holds a partial string - the line will re-wrap as it types")
|
||||
if narration.label.visible_characters < 0:
|
||||
return _fail("the whole line is visible already")
|
||||
if narration.label.horizontal_alignment != HORIZONTAL_ALIGNMENT_LEFT:
|
||||
return _fail("dialog text is not left-aligned - partial text will grow from the middle")
|
||||
seen.append(narration.label.visible_characters)
|
||||
|
||||
# Hand-ticked, so the reveal is measured rather than raced. The
|
||||
|
|
@ -151,37 +153,34 @@ func _process(delta: float) -> bool:
|
|||
return _fail("dismissing landed on \"%s\"" % narration.current)
|
||||
print("the press after that moves on to \"%s\"" % narration.current)
|
||||
|
||||
# --- G. #168: a key is a press too -----------------------
|
||||
# --- G. #175: keys never advance a dialog ----------------
|
||||
narration.clear()
|
||||
narration.say(first_line, "TEST")
|
||||
narration.say("Second.", "TEST")
|
||||
if not narration.is_typing():
|
||||
return _fail("the fresh line was not arriving")
|
||||
# Not everything that reaches the banner is a press.
|
||||
_key(KEY_SHIFT)
|
||||
_key(KEY_SPACE, true)
|
||||
if not narration.is_typing():
|
||||
return _fail("a modifier or a held-key echo finished the line")
|
||||
# Still arriving: the key shows the whole of it, and no more.
|
||||
_key(KEY_SPACE)
|
||||
if narration.is_typing():
|
||||
return _fail("a key did not finish a line that was still arriving")
|
||||
if narration.current != first_line:
|
||||
return _fail("a key on an arriving line dismissed it - the next line would be skipped unread")
|
||||
# Whole: the key moves on, the same as a click.
|
||||
_key(KEY_SPACE)
|
||||
if narration.current != "Second.":
|
||||
return _fail("a key on a finished line landed on \"%s\"" % narration.current)
|
||||
# Any key, not one chosen key - the player has no reason to guess.
|
||||
_key(KEY_W)
|
||||
if narration.is_typing():
|
||||
return _fail("only some keys finish a line")
|
||||
_key(KEY_ENTER)
|
||||
if not narration.is_typing() or narration.current != first_line:
|
||||
return _fail("a keyboard press changed a dialog that was still arriving")
|
||||
narration.finish_typing()
|
||||
_key(KEY_W)
|
||||
_key(KEY_ENTER)
|
||||
if narration.current != first_line or narration.is_typing():
|
||||
return _fail("a keyboard press dismissed a complete dialog")
|
||||
_click()
|
||||
if narration.current != "Second.":
|
||||
return _fail("clicking after ignored keys did not reach the second line")
|
||||
narration.finish_typing()
|
||||
_click()
|
||||
if narration.is_speaking():
|
||||
return _fail("a key on the last line did not close the dialog")
|
||||
return _fail("clicking the last complete line did not close the dialog")
|
||||
if paused:
|
||||
return _fail("keying through every line left the game stopped")
|
||||
print("space, W and enter all finish then advance a line; shift and echoes do not")
|
||||
return _fail("clicking through every line left the game stopped")
|
||||
print("space, W and enter leave dialogs untouched; clicks still finish and advance")
|
||||
|
||||
print("TEST_DIALOG_TYPING: PASS")
|
||||
quit(0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue