code rework for entities current floor
This commit is contained in:
@@ -71,7 +71,7 @@ func update_entities():
|
||||
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
|
||||
entity_text = Globals.colorize(entity_name, "dark_red") + "\n\nCHARACTERISTICS" + "PLACEHOLDER\n" + entity_characteristics + "\nRECOMMENDED COURSE OF ACTION" + entity_course_of_action
|
||||
journal.entities_page.text += "\n\n" + entity_text
|
||||
|
||||
|
||||
|
||||
@@ -238,14 +238,15 @@ func next_patient() -> Dictionary: #Decides next patient ID
|
||||
next_id = generate_next_id(next_type)
|
||||
_:
|
||||
next_type = next_patient_type()
|
||||
next_id = generate_next_id(next_patient_type())
|
||||
|
||||
next_id = generate_next_id(next_type)
|
||||
print("NEXT SUBJECT CHARACTERISTICS - id: " + next_id, "type: " + next_type)
|
||||
return {"id": next_id, "type": next_type}
|
||||
|
||||
|
||||
#Randomizes next patient type (human, it, its)
|
||||
func next_patient_type():
|
||||
var type_list = []
|
||||
var next_type: String
|
||||
match Globals.floor_count:
|
||||
-1:
|
||||
return "patient"
|
||||
@@ -255,7 +256,9 @@ func next_patient_type():
|
||||
type_list.append("its")
|
||||
for i in range(Globals.diagnoses_quota - 1):
|
||||
type_list.append("patient")
|
||||
return type_list.pick_random()
|
||||
next_type = type_list.pick_random()
|
||||
print("Next subject type picked: " + str(next_type))
|
||||
return next_type
|
||||
_:
|
||||
for i in range(int(floor(Globals.diagnoses_quota/4))):
|
||||
type_list.append("its")
|
||||
@@ -263,7 +266,9 @@ func next_patient_type():
|
||||
type_list.append("entity")
|
||||
for i in range(int(floor(Globals.diagnoses_quota/2))):
|
||||
type_list.append("patient")
|
||||
return type_list.pick_random()
|
||||
next_type = type_list.pick_random()
|
||||
print("Next subject type picked: " + str(next_type))
|
||||
return next_type
|
||||
|
||||
|
||||
#Erases current patient ID from the corresponding patient list, so it can't be seen twice
|
||||
@@ -284,9 +289,10 @@ func update_list():
|
||||
print("Updated ITS list: " + str(its_list))
|
||||
"entity":
|
||||
entities_seen.append(id)
|
||||
if len(entities_list)>1:
|
||||
entities_list.erase(id)
|
||||
entities_list.erase(id)
|
||||
entities_current_floor.erase(id)
|
||||
print("Updated Entities list: " + str(entities_list))
|
||||
print("Updated Entities current floor list: " + str(entities_current_floor))
|
||||
|
||||
|
||||
#Randomly picks which entities will be present on the current floor
|
||||
@@ -298,3 +304,4 @@ func pick_floor_entities():
|
||||
if len(entities_list) > 0:
|
||||
entity = entities_list.pick_random()
|
||||
entities_current_floor.append(entity)
|
||||
print("Picked Entities current floor list: " + str(entities_current_floor))
|
||||
|
||||
Reference in New Issue
Block a user