From 89ded4fc4dd7affa516abaf500f6ce86d9260bfb Mon Sep 17 00:00:00 2001 From: 4dplanner <3combined@gmail.com> Date: Tue, 29 Jan 2019 12:40:02 +0000 Subject: [PATCH] Antimagic works again --- code/datums/components/anti_magic.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/datums/components/anti_magic.dm b/code/datums/components/anti_magic.dm index 908aef45115..f4d6fa98b0e 100644 --- a/code/datums/components/anti_magic.dm +++ b/code/datums/components/anti_magic.dm @@ -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