entities WIP
This commit is contained in:
@@ -30,8 +30,9 @@ var og_patient_list : Array[Dictionary]
|
||||
var patient_list: Array[Dictionary]
|
||||
var og_its_list = ["its_01"]
|
||||
var its_list = []
|
||||
var og_entities_list = [["entity_01"]]
|
||||
var entities_list = [[]]
|
||||
var og_entities_list = ["entity_01"]
|
||||
var entities_list = []
|
||||
var entities_current_floor = []
|
||||
var patients_seen = []
|
||||
var its_seen = []
|
||||
var entities_seen = []
|
||||
@@ -216,7 +217,7 @@ func generate_next_id(patient_type: String):
|
||||
next_id = its_list.pick_random()
|
||||
print("ITS selected: " + str(next_id))
|
||||
"entity":
|
||||
next_id = entities_list[floor_index].pick_random()
|
||||
next_id = entities_current_floor.pick_random()
|
||||
print("Entity selected: " + str(next_id))
|
||||
|
||||
return next_id
|
||||
@@ -258,7 +259,8 @@ func next_patient_type():
|
||||
_:
|
||||
for i in range(int(floor(Globals.diagnoses_quota/4))):
|
||||
type_list.append("its")
|
||||
type_list.append("entity")
|
||||
if len(entities_current_floor) > 0:
|
||||
type_list.append("entity")
|
||||
for i in range(int(floor(Globals.diagnoses_quota/2))):
|
||||
type_list.append("patient")
|
||||
return type_list.pick_random()
|
||||
@@ -282,8 +284,17 @@ func update_list():
|
||||
print("Updated ITS list: " + str(its_list))
|
||||
"entity":
|
||||
entities_seen.append(id)
|
||||
for i in range(len(entities_list)):
|
||||
if len(entities_list[i]) > 1:
|
||||
entities_list[i].erase(id)
|
||||
for j in range(len(entities_list)):
|
||||
print("Updated Floor " + str(j) + " Entity list: " + str(entities_list[j]))
|
||||
if len(entities_list)>1:
|
||||
entities_list.erase(id)
|
||||
print("Updated Entities list: " + str(entities_list))
|
||||
|
||||
|
||||
#Randomly picks which entities will be present on the current floor
|
||||
func pick_floor_entities():
|
||||
|
||||
var entity
|
||||
|
||||
for i in range(int(floor(Globals.diagnoses_quota/4))):
|
||||
if len(entities_list) > 0:
|
||||
entity = entities_list.pick_random()
|
||||
entities_current_floor.append(entity)
|
||||
|
||||
Reference in New Issue
Block a user