Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit c5bae2b

Browse files
authored
Update objective.dm (#22627)
1 parent 4a4273b commit c5bae2b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

code/game/gamemodes/objective.dm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,15 +1662,23 @@ GLOBAL_LIST_EMPTY(possible_items_special)
16621662
optional = TRUE
16631663

16641664
/datum/objective/gimmick/update_explanation_text()
1665-
var/selected_department = pick(list( //Select a department for department-based objectives
1665+
var/departments = list( //Select a department for department-based objectives
16661666
DEPT_SCIENCE,
16671667
DEPT_ENGINEERING,
16681668
DEPT_SECURITY,
16691669
DEPT_MEDICAL,
16701670
DEPT_SERVICE,
16711671
DEPT_SUPPLY,
16721672
DEPT_COMMAND
1673-
))
1673+
)
1674+
1675+
var/datum/job/J = SSjob.GetJob(owner.assigned_role)
1676+
1677+
for(var/department in J?.departments_list) //don't get departments to mess with that our our own department
1678+
var/datum/job_department/D = department
1679+
departments -= initial(D.department_name)
1680+
1681+
var/selected_department = pick(departments)
16741682

16751683
var/list/gimmick_list = world.file2list(GIMMICK_OBJ_FILE) //gimmick_objectives.txt is for objectives without a specific target/department/etc
16761684
gimmick_list.Add(world.file2list(DEPT_GIMMICK_OBJ_FILE))

0 commit comments

Comments
 (0)