-
Notifications
You must be signed in to change notification settings - Fork 1
/
BurnerPhone.gd
36 lines (33 loc) · 916 Bytes
/
BurnerPhone.gd
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
class_name BurnerPhone extends Node
@export var sh : ShellSpawner
@export var dia : Dialogue
func SendDialogue():
var sequence = sh.sequenceArray
var len = sequence.size()
var randindex
var firstpart = ""
var secondpart = ""
var fulldia = ""
if (len != 1):
randindex = randi_range(1, len - 1)
if(randindex == 8 or randindex == 7): randindex -= 1
if (sequence[randindex] == "blank"): secondpart = tr("BLANKROUND") % ""
else: secondpart = tr("LIVEROUND") % ""
match (randindex):
1:
firstpart = tr("SEQUENCE2")
2:
firstpart = tr("SEQUENCE3")
3:
firstpart = tr("SEQUENCE4")
4:
firstpart = tr("SEQUENCE5")
5:
firstpart = tr("SEQUENCE6")
6:
firstpart = tr("SEQUENCE7")
fulldia = tr(firstpart) + "\n" + "... " + tr(secondpart)
else: fulldia = tr("UNFORTUNATE")
dia.ShowText_Forever(fulldia)
await get_tree().create_timer(3, false).timeout
dia.HideText()