- Fixes #294, #296.
- Purges use of 2 instead of DEAD when checking for stat in objective.dm
This commit is contained in:
DZD
2015-02-11 17:20:22 -05:00
parent 72ef4f38d5
commit 017c63dfa2
3 changed files with 25 additions and 15 deletions
@@ -15,7 +15,7 @@
user << "<span class='notice'>We feel a minute twitch in our eyes, and darkness creeps away.</span>"
else
user << "<span class='notice'>Our vision dulls. Shadows gather.</span>"
user.sight -= SEE_MOBS
user.sight &= ~SEE_MOBS
while(active)
user.see_in_dark = 8
user.see_invisible = 2
@@ -37,8 +37,6 @@
if(H.species.flags & IS_SYNTHETIC)
user << "<span class='warning'>This won't work on synthetics.</span>"
return
if(H.species.flags & NO_SCAN) //Prevents transforming slimes and killing them instantly
user << "<span class='warning'>This won't work on a creature with abnormal genetic material.</span>"
if(!isturf(user.loc))
return
if(get_dist(user, target) > (user.mind.changeling.sting_range))
@@ -87,6 +85,11 @@
if((M_HUSK in target.mutations) || (!ishuman(target) && !ismonkey(target)))
user << "<span class='warning'>Our sting appears ineffective against its DNA.</span>"
return 0
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.species.flags & NO_SCAN) //Prevents transforming slimes and killing them instantly
user << "<span class='warning'>This won't work on a creature with abnormal genetic material.</span>"
return 0
return 1
/obj/effect/proc_holder/changeling/sting/transformation/sting_action(var/mob/user, var/mob/target)
+19 -12
View File
@@ -30,7 +30,7 @@ datum/objective
proc/find_target()
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2))
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD))
possible_targets += possible_target
if(possible_targets.len > 0)
target = pick(possible_targets)
@@ -38,7 +38,7 @@ datum/objective
proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) && (possible_target.current.stat != 2) )
if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) && (possible_target.current.stat != DEAD) )
possible_targets += possible_target
if(possible_targets.len > 0)
target = pick(possible_targets)
@@ -47,7 +47,7 @@ datum/objective
proc/find_target_with_special_role(role)
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && ishuman(possible_target.current) && (role && possible_target.special_role == role || !role && possible_target.special_role) && (possible_target.current.stat != 2) )
if((possible_target != owner) && ishuman(possible_target.current) && (role && possible_target.special_role == role || !role && possible_target.special_role) && (possible_target.current.stat != DEAD) )
possible_targets += possible_target
if(possible_targets.len > 0)
target = pick(possible_targets)
@@ -385,7 +385,7 @@ datum/objective/block
for(var/mob/living/player in player_list)
if(player.type in protected_mobs) continue
if (player.mind)
if (player.stat != 2)
if (player.stat != DEAD)
if (get_turf(player) in shuttle)
return 0
return 1
@@ -451,7 +451,14 @@ datum/objective/escape/escape_with_identity
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
find_target()
target = ..()
var/list/possible_targets = list() //Copypasta because NO_SCAN races, yay for snowflakes.
for(var/datum/mind/possible_target in ticker.minds)
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD))
var/mob/living/carbon/human/H = possible_target.current
if(!(H.species.flags & NO_SCAN))
possible_targets += possible_target
if(possible_targets.len > 0)
target = pick(possible_targets)
if(target && target.current)
target_real_name = target.current.real_name
explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [target.assigned_role] while wearing their identification card."
@@ -658,7 +665,7 @@ datum/objective/download
check_completion()
if(!ishuman(owner.current))
return 0
if(!owner.current || owner.current.stat == 2)
if(!owner.current || owner.current.stat == DEAD)
return 0
if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized))
return 0
@@ -685,25 +692,25 @@ datum/objective/capture
var/captured_amount = 0
var/area/ninja/holding/A = locate()
for(var/mob/living/carbon/human/M in A)//Humans.
if(M.stat==2)//Dead folks are worth less.
if(M.stat == DEAD)//Dead folks are worth less.
captured_amount+=0.5
continue
captured_amount+=1
for(var/mob/living/carbon/monkey/M in A)//Monkeys are almost worthless, you failure.
captured_amount+=0.1
for(var/mob/living/carbon/alien/larva/M in A)//Larva are important for research.
if(M.stat==2)
if(M.stat == DEAD)
captured_amount+=0.5
continue
captured_amount+=1
for(var/mob/living/carbon/alien/humanoid/M in A)//Aliens are worth twice as much as humans.
if(istype(M, /mob/living/carbon/alien/humanoid/queen))//Queens are worth three times as much as humans.
if(M.stat==2)
if(M.stat == DEAD)
captured_amount+=1.5
else
captured_amount+=3
continue
if(M.stat==2)
if(M.stat == DEAD)
captured_amount+=1
continue
captured_amount+=2
@@ -845,7 +852,7 @@ datum/objective/heist/kidnap
var/list/priority_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE"))
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && (possible_target.assigned_role != "MODE"))
possible_targets += possible_target
for(var/role in roles)
if(possible_target.assigned_role == role)
@@ -865,7 +872,7 @@ datum/objective/heist/kidnap
check_completion()
if(target && target.current)
if (target.current.stat == 2)
if (target.current.stat == DEAD)
return 0 // They're dead. Fail.
//if (!target.current.restrained())
// return 0 // They're loose. Close but no cigar.