Moves tesla_ignore from var on /mob/living to secondary flag

This commit is contained in:
CitadelStationBot
2017-04-17 09:45:30 -05:00
parent 21827263f5
commit dd76874f1c
7 changed files with 8 additions and 6 deletions
@@ -169,7 +169,7 @@
..()
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
if(tesla_shock && tesla_ignore)
if(tesla_shock && HAS_SECONDARY_FLAG(src, TESLA_IGNORE))
return FALSE
shock_damage *= siemens_coeff
if(dna && dna.species)
@@ -456,7 +456,7 @@
else if(S.siemens_coefficient == (-1))
total_coeff -= 1
siemens_coeff = total_coeff
if(tesla_ignore)
if(HAS_SECONDARY_FLAG(src, TESLA_IGNORE))
siemens_coeff = 0
else if(!safety)
var/gloves_siemens_coeff = 1
+1 -1
View File
@@ -271,7 +271,7 @@
return 1
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
if(tesla_shock && tesla_ignore)
if(tesla_shock && HAS_SECONDARY_FLAG(src, TESLA_IGNORE))
return FALSE
if(shock_damage > 0)
if(!illusion)
@@ -70,7 +70,6 @@
var/list/status_effects //a list of all status effects the mob has
var/list/implants = null
var/tesla_ignore = FALSE
var/datum/riding/riding_datum
+1 -1
View File
@@ -203,7 +203,7 @@ GLOBAL_LIST_INIT(blacklisted_tesla_types, typecacheof(list(/obj/machinery/atmosp
else if(isliving(A))
var/dist = get_dist(source, A)
var/mob/living/L = A
if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !L.tesla_ignore)
if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !HAS_SECONDARY_FLAG(L, TESLA_IGNORE))
closest_mob = L
closest_atom = A
closest_dist = dist