Skip to content

Commit

Permalink
bugfix: fix objective removed proc (#4244)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimach authored Jan 20, 2024
1 parent 5e7b16a commit 64e619b
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,6 @@ GLOBAL_LIST_EMPTY(admin_objective_list)
checking_timer = addtimer(CALLBACK(src, PROC_REF(target_check)), 30 SECONDS, TIMER_UNIQUE | TIMER_LOOP | TIMER_STOPPABLE | TIMER_DELETE_ME)


/datum/objective/pain_hunter/Destroy()
deltimer(checking_timer)
checking_timer = null
. = ..()


/datum/objective/pain_hunter/find_target(list/target_blacklist)
..()
if(target && ishuman(target.current))
Expand Down Expand Up @@ -430,7 +424,10 @@ GLOBAL_LIST_EMPTY(admin_objective_list)
obj_process_color = "green"
checking_timer = null
update_explain_text()
owner.announce_objectives()
for(var/datum/mind/user in get_owners())
var/list/messages = list()
messages.Add(user.prepare_announce_objectives(FALSE))
to_chat(user.current, chat_box_red(messages.Join("<br>")))
else
..()

Expand All @@ -444,18 +441,22 @@ GLOBAL_LIST_EMPTY(admin_objective_list)
target = null
find_target(existing_targets_blacklist())
alarm_changes()
owner.announce_objectives()
for(var/datum/mind/user in get_owners())
var/list/messages = list()
messages.Add(user.prepare_announce_objectives(FALSE))
to_chat(user.current, chat_box_red(messages.Join("<br>")))
else
if((world.time - start_of_completing) >= 10 MINUTES)
if(target && ishuman(target.current) && target.current.stat != DEAD)
completed = TRUE
obj_process_color = "green"
update_explain_text()
owner.announce_objectives()
else
obj_process_color = "red"
update_explain_text()
owner.announce_objectives()
update_explain_text()
for(var/datum/mind/user in get_owners())
var/list/messages = list()
messages.Add(user.prepare_announce_objectives(FALSE))
to_chat(user.current, chat_box_red(messages.Join("<br>")))
deltimer(checking_timer)
checking_timer = null

Expand Down

0 comments on commit 64e619b

Please sign in to comment.