Merge pull request #7338 from Citadel-Station-13/upstream-merge-38649

[MIRROR] Converts antimagic from GetComponent to a signal
This commit is contained in:
deathride58
2018-07-10 01:59:14 -04:00
committed by GitHub
4 changed files with 39 additions and 36 deletions
+7
View File
@@ -894,6 +894,13 @@
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), EFFECT_IRRADIATE, blocked)
/mob/living/anti_magic_check(magic = TRUE, holy = FALSE)
. = ..()
if(.)
return
if((magic && has_trait(TRAIT_ANTIMAGIC)) || (holy && has_trait(TRAIT_HOLY)))
return src
/mob/living/proc/fakefireextinguish()
return
+10
View File
@@ -693,6 +693,16 @@
mob_spell_list -= S
qdel(S)
/mob/proc/anti_magic_check(magic = TRUE, holy = FALSE)
if(!magic && !holy)
return
var/list/protection_sources = list()
if(SEND_SIGNAL(src, COMSIG_MOB_RECEIVE_MAGIC, magic, holy, protection_sources) & COMPONENT_BLOCK_MAGIC)
if(protection_sources.len)
return pick(protection_sources)
else
return src
//You can buckle on mobs if you're next to them since most are dense
/mob/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(M.buckled)