Skip to content

Commit

Permalink
removes duplicate entries from the crew manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Gboster-0 committed Jan 2, 2025
1 parent 4d9d9da commit bc484b4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,21 @@
if((rank in jobs) || (true_rank in jobs)) //Tegu edit - alt job titles
if(!manifest_out[department])
manifest_out[department] = list()
// LOBOTOMYCORPORATION ADDITION START
var/duplicate_found = FALSE
for(var/list/data as anything in manifest_out[department])
if(findtext(data["name"], name) && rank == data["rank"])
duplicate_found = TRUE
if(length(data) == 2)
data["count"] = 1
data["count"]++
data["name"] = "x[data["count"]] [name]"
continue

if(duplicate_found)
has_department = TRUE
continue
// LOBOTOMYCORPORATION ADDITION END
// Append to beginning of list if captain or department head
if (rank == "Captain" || (department != "Command" && (rank in heads)))
manifest_out[department] = list(list(
Expand Down

0 comments on commit bc484b4

Please sign in to comment.