Merge pull request #13424 from Putnam3145/fix-cryo-objective-bull
Makes cryo pods no longer replace already-won objectives.
This commit is contained in:
@@ -355,23 +355,23 @@
|
||||
cryo_items -= I
|
||||
|
||||
//Update any existing objectives involving this mob.
|
||||
for(var/datum/objective/O in GLOB.objectives)
|
||||
for(var/i in GLOB.objectives)
|
||||
var/datum/objective/O = i
|
||||
// We don't want revs to get objectives that aren't for heads of staff. Letting
|
||||
// them win or lose based on cryo is silly so we remove the objective.
|
||||
if(istype(O,/datum/objective/mutiny) && O.target == mob_occupant.mind)
|
||||
qdel(O)
|
||||
else if(O.target && istype(O.target, /datum/mind))
|
||||
if(O.target == mob_occupant.mind)
|
||||
if(O.owner && O.owner.current)
|
||||
to_chat(O.owner.current, "<BR><span class='userdanger'>You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!</span>")
|
||||
O.target = null
|
||||
spawn(10) //This should ideally fire after the occupant is deleted.
|
||||
if(!O)
|
||||
return
|
||||
O.find_target()
|
||||
O.update_explanation_text()
|
||||
if(!(O.target))
|
||||
qdel(O)
|
||||
else if(O.target && istype(O.target, /datum/mind) && !O.check_completion())
|
||||
if(O.target == mob_occupant.mind && O.owner?.current)
|
||||
to_chat(O.owner.current, "<BR><span class='userdanger'>You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!</span>")
|
||||
O.target = null
|
||||
spawn(10) //This should ideally fire after the occupant is deleted.
|
||||
if(!O)
|
||||
return
|
||||
O.find_target()
|
||||
O.update_explanation_text()
|
||||
if(!(O.target))
|
||||
qdel(O)
|
||||
|
||||
if(mob_occupant.mind)
|
||||
//Handle job slot/tater cleanup.
|
||||
|
||||
Reference in New Issue
Block a user