ite dialogue start

This commit is contained in:
Maurane
2026-04-29 16:50:24 +02:00
parent 63245b55f8
commit 939fb88b14
23 changed files with 495 additions and 26 deletions
+46 -21
View File
@@ -28,13 +28,16 @@ var symptoms_arrays: Array[Array] = [
#Lists of possible patients sorted by floor
var og_patient_list : Array[Dictionary]
var patient_list: Array[Dictionary]
var og_its_list = ["its_01", "its_02"]
var og_its_list = ["its_01", "its_02", "its_03", "its_04"]
var its_list = []
var og_ite_list = []
var ite_list = []
var og_entities_list = ["entity_01"]
var entities_list = []
var entities_current_floor = []
var patients_seen = []
var its_seen = []
var ite_seen = []
var entities_seen = []
@@ -52,6 +55,7 @@ func _ready() -> void:
og_patient_list.resize(len(symptoms_arrays))
patient_list.resize(len(symptoms_arrays))
its_list = og_its_list
ite_list = og_ite_list
entities_list = og_entities_list
original_color = texture.modulate #Saving original modulation color to reset it after modification
@@ -84,6 +88,8 @@ func load_patient(patient_info: Dictionary): #Loads new patient
file_path = "Patients/"
"its":
file_path = "ITS/"
"ite":
file_path = "ITE/"
"entity":
file_path = "Entities/"
"supervisor":
@@ -124,11 +130,11 @@ func load_emotions(config, patient_path):
var emotion_branch: Dictionary
var emotion_list = ["neutral", "peaceful", "praying", "puzzled", "suspicious",
"sadsmiling", "crazysmiling", "shockedcrying", "smiling",
"laughing", "happy", "elated", "maniac", "ecstatic",
"aroused", "laughing", "happy", "elated", "maniac", "ecstatic",
"irritated", "angry", "furious",
"sad", "depressed", "crying", "surprised",
"worried", "scared", "shocked", "panicked", "terrified",
"itthatsmiles1", "itthatsmiles2",
"itthatsmiles1", "itthatsmiles2", "itthateats1", "itthateats2",
"abnormal", "abnormal1", "abnormal2", "abnormal3", "special"]
emotions.clear() #Clearing previous patient emotions
@@ -216,6 +222,9 @@ func generate_next_id(patient_type: String):
"its":
next_id = its_list.pick_random()
print("ITS selected: " + str(next_id))
"ite":
next_id = ite_list.pick_random()
print("ITE selected: " + str(next_id))
"entity":
next_id = entities_current_floor.pick_random()
print("Entity selected: " + str(next_id))
@@ -244,6 +253,10 @@ func next_patient() -> Dictionary: #Decides next patient ID
next_type = next_patient_type()
next_id = generate_next_id(next_type)
-4:
if Globals.patient_count == 0:
next_id = "ite_00"
next_type = "ite"
else:
next_type = next_patient_type()
next_id = generate_next_id(next_type)
_:
@@ -260,31 +273,39 @@ func next_patient_type():
var next_type: String
match Globals.floor_count:
-1:
return "patient"
type_list.append("patient")
-2:
return "patient"
type_list.append("patient")
-3:
if len(its_list) > 0:
type_list.append("its")
for i in range(Globals.diagnoses_quota - 1):
type_list.append("patient")
print("Type List generated: " + str(type_list))
next_type = type_list.pick_random()
print("Next subject type picked: " + str(next_type))
return next_type
for i in range(int(Globals.diagnoses_quota)):
if len(its_list) > 0:
type_list.append("its")
-4:
for i in range(int(Globals.diagnoses_quota)):
if len(its_list) > 0:
type_list.append("its")
-5:
for i in range(int(Globals.diagnoses_quota)):
if len(its_list) > 0:
type_list.append("its")
if len(ite_list) > 0:
type_list.append("ite")
_:
for i in range(int(floor(Globals.diagnoses_quota/4))):
type_list.append("its")
for i in range(int(Globals.diagnoses_quota)):
if len(entities_current_floor) > 0:
type_list.append("entity")
if len(its_list) > 0:
type_list.append("its")
for i in range(int(floor(Globals.diagnoses_quota/2))):
type_list.append("patient")
print("Type List generated: " + str(type_list))
next_type = type_list.pick_random()
print("Next subject type picked: " + str(next_type))
return next_type
if len(ite_list) > 0:
type_list.append("ite")
for i in range(2*int(Globals.diagnoses_quota)):
type_list.append("patient")
print("Type List generated: " + str(type_list))
next_type = type_list.pick_random()
print("Next subject type picked: " + str(next_type))
return next_type
#Erases current subject ID from the corresponding subject list, so it can't be seen twice
@@ -302,6 +323,10 @@ func update_list():
its_seen.append(id)
its_list.erase(id)
print("Updated ITS list: " + str(its_list))
"ite":
ite_seen.append(id)
ite_list.erase(id)
print("Updated ITE list: " + str(ite_list))
"entity":
entities_seen.append(id)
entities_list.erase(id)