ports anti-magic component code updates (holymelon not included).
This commit is contained in:
@@ -737,15 +737,17 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
mob_spell_list -= S
|
||||
qdel(S)
|
||||
|
||||
/mob/proc/anti_magic_check(magic = TRUE, holy = FALSE)
|
||||
if(!magic && !holy)
|
||||
/mob/proc/anti_magic_check(magic = TRUE, holy = FALSE, tinfoil = FALSE, chargecost = 1, self = FALSE)
|
||||
if(!magic && !holy && !tinfoil)
|
||||
return
|
||||
var/list/protection_sources = list()
|
||||
if(SEND_SIGNAL(src, COMSIG_MOB_RECEIVE_MAGIC, magic, holy, protection_sources) & COMPONENT_BLOCK_MAGIC)
|
||||
if(SEND_SIGNAL(src, COMSIG_MOB_RECEIVE_MAGIC, src, magic, holy, tinfoil, chargecost, self, protection_sources) & COMPONENT_BLOCK_MAGIC)
|
||||
if(protection_sources.len)
|
||||
return pick(protection_sources)
|
||||
else
|
||||
return src
|
||||
if((magic && HAS_TRAIT(src, TRAIT_ANTIMAGIC)) || (holy && HAS_TRAIT(src, TRAIT_HOLY)))
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user