spy mechanics WIP
This commit is contained in:
@@ -4,6 +4,7 @@ extends Node
|
||||
var dialog_tree: Dictionary
|
||||
var marker: Array[int]
|
||||
var dialogue_resource: Resource
|
||||
var dialogue_start: String
|
||||
|
||||
#Patient attributes
|
||||
var texture := TextureRect.new()
|
||||
@@ -13,6 +14,8 @@ var emotions : Dictionary
|
||||
var abnormal: bool
|
||||
var id : String
|
||||
var type: String
|
||||
var age: String
|
||||
var symptoms: Array
|
||||
|
||||
#Patient file
|
||||
var file_text : String
|
||||
@@ -41,10 +44,12 @@ var patients_seen = []
|
||||
var its_seen = []
|
||||
var ite_seen = []
|
||||
|
||||
|
||||
#Supervisor file path
|
||||
var supervisor_name = "siveyan"
|
||||
|
||||
#Spy
|
||||
var spy: Node
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -56,10 +61,14 @@ 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
|
||||
ite_list = og_ite_list
|
||||
|
||||
original_color = texture.modulate #Saving original modulation color to reset it after modification
|
||||
|
||||
#Adding the spy
|
||||
spy = Spy.new()
|
||||
add_child(spy)
|
||||
|
||||
|
||||
func build_dialog_tree(tree_model: Array[int]) -> Dictionary: #Builds the dialog tree for each dialogue
|
||||
|
||||
@@ -101,11 +110,15 @@ func load_patient(patient_info: Dictionary): #Loads new patient
|
||||
|
||||
#Setting up Patient File
|
||||
var patient_name = config.get_value("", "name")
|
||||
var age = config.get_value("", "age")
|
||||
age = config.get_value("", "age")
|
||||
var profession = config.get_value("", "profession")
|
||||
var psychiatric_assessment = config.get_value("", "psychiatric_assessment")
|
||||
file_text = "NAME: " + patient_name + "\nAGE: " + age + "\n\nPROFESSION: " + profession + "\n\nPRE-SCREENING PSYCHIATRIC ASSESSMENT:\n\n" + "[color=orange_red]" + psychiatric_assessment + "[/color]"
|
||||
|
||||
var symptom_list = config.get_value("", "psychiatric_assessment").split("\n", false)
|
||||
symptoms = symptom_list
|
||||
symptom_list = config.get_value("", "abnormal_symptoms").split("\n", false)
|
||||
symptoms.append_array(symptom_list)
|
||||
#Randomizing abnormal status if required
|
||||
var status = config.get_value("", "status")
|
||||
match status:
|
||||
@@ -234,6 +247,7 @@ func next_patient() -> Dictionary: #Decides next patient ID
|
||||
var next_id: String
|
||||
var next_type: String
|
||||
|
||||
dialogue_start = "start"
|
||||
match Globals.floor_count:
|
||||
-2:
|
||||
if Globals.patient_count == 0:
|
||||
@@ -254,8 +268,9 @@ func next_patient() -> Dictionary: #Decides next patient ID
|
||||
next_id = generate_next_id(next_type)
|
||||
-5:
|
||||
if Globals.patient_count == 0:
|
||||
next_id = "patient_51"
|
||||
next_id = "patient_spy"
|
||||
next_type = "patient"
|
||||
dialogue_start = "encounter_1"
|
||||
else:
|
||||
next_type = next_patient_type()
|
||||
next_id = generate_next_id(next_type)
|
||||
|
||||
Reference in New Issue
Block a user