mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-13 00:47:42 +01:00
Merge pull request #9610 from Ghommie/Ghommie-cit273
ports anti-magic component code updates (holymelon sold separately).
This commit is contained in:
@@ -804,15 +804,17 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
if(client)
|
||||
client << output(null, "statbrowser:check_spells")
|
||||
|
||||
/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