The tutorial's sun waits for you (Gitea #5): the afternoon goes no later than 16:30 until the torch step brings dusk
This commit is contained in:
@@ -135,6 +135,23 @@ func _starts() -> void:
|
||||
"\"%s\" / \"%s\"" % [pn._chapter.text, pn._title.text])
|
||||
check(G.guide_name == "Old Tam" and pn._text.text.begins_with("Old Tam: \""), "Old Tam the hermit talks you through it: %s" % pn._text.text)
|
||||
check(G.find_marker() == Vector3.INF, "(no marker for that one)")
|
||||
# Gitea #5: the sun waits for you until the torch step brings dusk.
|
||||
var dn: Node = world.day_night
|
||||
var t0: float = dn.time
|
||||
dn.time = 19.0 / 24.0
|
||||
G.hold_daylight()
|
||||
check(absf(dn.time * 24.0 - G.DAYLIGHT_UNTIL) < 0.01, "early in the tutorial the afternoon goes no later than %.1f h (%.2f)" % [G.DAYLIGHT_UNTIL, dn.time * 24.0])
|
||||
var torch_i := -1
|
||||
for i in range(G.steps.size()):
|
||||
if String(G.steps[i].id) == "torch":
|
||||
torch_i = i
|
||||
var was_i: int = G.index
|
||||
G.index = torch_i
|
||||
dn.time = 19.0 / 24.0
|
||||
G.hold_daylight()
|
||||
check(torch_i > 0 and absf(dn.time * 24.0 - 19.0) < 0.01, "from the torch step on, night comes as usual")
|
||||
G.index = was_i
|
||||
dn.time = t0
|
||||
|
||||
func _chapter_one() -> void:
|
||||
print("1. look around")
|
||||
|
||||
Reference in New Issue
Block a user