entities WIP

This commit is contained in:
Maurane
2026-03-12 20:43:25 +01:00
parent 08a5d3ec39
commit 3fa18e2b74
8 changed files with 70 additions and 32 deletions
+30 -2
View File
@@ -45,18 +45,46 @@ func _on_journal_pressed():
show()
func update_journal(floor_count:int):
func update_symptoms(floor_count:int):
var symptoms_page : String = ""
for i in range(-floor_count):
for symptom in symptoms_detailed[i]:
symptoms_page += "\n\n" + symptom
journal_symptoms.text = symptoms_page
journal.symptoms_page.text = symptoms_page
func update_entities():
journal.entities_page.clear()
if Patient.entities_current_floor.is_empty():
Patient.pick_floor_entities() #Picking floor entities unless a save was just loaded
var config := ConfigFile.new()
var entity_name: String = ""
var entity_characteristics: String = ""
var entity_course_of_action: String = ""
var entity_text: String = ""
for entity in Patient.entities_current_floor:
config.load("res://Dialogues/Entities/" + entity + "_file.cfg") #Loading Entity file
entity_name = config.get_value("", "entity_name")
entity_characteristics = config.get_value("", "entity_characteristics")
entity_course_of_action = config.get_value("", "entity_course_of_action")
entity_text = Globals.colorize(entity_name, "dark_red") + "\n\nCHARACTERISTICS" + entity_characteristics + "\nRECOMMENDED COURSE OF ACTION" + entity_course_of_action
journal.entities_page.text += "\n\n" + entity_text
#Resets to initial state
func reset():
hide()
update_symptoms(Globals.floor_count)
if Globals.floor_count <= -4:
update_entities()
if Globals.floor_count <= -4:
bookmarks.entities.show()
else:
bookmarks.entities.hide()
#Shows the rules tab