Antimagic works again

This commit is contained in:
4dplanner
2019-01-29 12:40:02 +00:00
parent dcf48b709e
commit 89ded4fc4d
+5 -3
View File
@@ -33,12 +33,14 @@
UnregisterSignal(user, COMSIG_MOB_RECEIVE_MAGIC)
/datum/component/anti_magic/proc/protect(datum/source, mob/user, _magic, _holy, major, self, list/protection_sources)
if(((_magic && magic) || (_holy && holy)) && (self && blocks_self))
if(((_magic && magic) || (_holy && holy)) && (!self || !blocks_self))
protection_sources += parent
reaction.Invoke(user, major)
if(reaction)
reaction.Invoke(user, major)
if(major)
charges--
if(charges <= 0)
expire.Invoke(user)
if(expire)
expire.Invoke(user)
return COMPONENT_BLOCK_MAGIC