spiderbot objective fix (#21372)

This commit is contained in:
Contrabang
2023-06-28 10:29:47 -04:00
committed by GitHub
parent 5dcd23f17c
commit 3922e9d462
+12 -10
View File
@@ -129,6 +129,12 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
for(var/datum/mind/M in owners)
M.announce_objectives()
// Borgs, brains, AIs, etc count as dead for traitor objectives
/datum/objective/proc/is_special_dead(mob/target_current, check_silicon = TRUE)
if(check_silicon && issilicon(target_current))
return TRUE
return isbrain(target_current) || istype(target_current, /mob/living/simple_animal/spiderbot)
/datum/objective/assassinate
name = "Assassinate"
martyr_compatible = 1
@@ -145,7 +151,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
if(target && target.current)
if(target.current.stat == DEAD)
return TRUE
if(issilicon(target.current) || isbrain(target.current)) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
if(is_special_dead(target.current)) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
return TRUE
if(!target.current.ckey)
return TRUE
@@ -198,9 +204,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
return TRUE
if(!target.current.ckey)
return TRUE
if(issilicon(target.current))
return TRUE
if(isbrain(target.current))
if(is_special_dead(target.current))
return TRUE
var/turf/T = get_turf(target.current)
if(is_admin_level(T.z))
@@ -261,9 +265,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
if(target.current)
if(target.current.stat == DEAD)
return FALSE
if(issilicon(target.current))
return FALSE
if(isbrain(target.current))
if(is_special_dead(target.current))
return FALSE
return TRUE
return FALSE
@@ -359,7 +361,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
var/list/owners = get_owners()
for(var/datum/mind/M in owners)
// These are mandatory conditions, they should come before the freebie conditions below.
if(QDELETED(M.current) || M.current.stat == DEAD || issilicon(M.current) || isbrain(M.current))
if(QDELETED(M.current) || M.current.stat == DEAD || is_special_dead(M.current))
return FALSE
if(SSticker.force_ending) // This one isn't their fault, so lets just assume good faith.
@@ -458,7 +460,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
/datum/objective/die/check_completion()
for(var/datum/mind/M in get_owners())
if(QDELETED(M.current) || M.current.stat == DEAD || isbrain(M.current))
if(QDELETED(M.current) || M.current.stat == DEAD || is_special_dead(M.current, check_silicon = FALSE))
continue
if(issilicon(M.current) && !M.is_original_mob(M.current))
continue
@@ -474,7 +476,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
/datum/objective/survive/check_completion()
for(var/datum/mind/M in get_owners())
if(QDELETED(M.current) || M.current.stat == DEAD || isbrain(M.current))
if(QDELETED(M.current) || M.current.stat == DEAD || is_special_dead(M.current, check_silicon = FALSE))
return FALSE
if(issilicon(M.current) && !M.is_original_mob(M.current))
return FALSE