[MIRROR] Polaris Hook Removal Part 1 (#11887)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-10-30 13:40:35 -07:00
committed by GitHub
parent 2a35bdaac7
commit d82d0807a5
52 changed files with 198 additions and 286 deletions
+20 -18
View File
@@ -491,39 +491,41 @@
///////////////////
//The catching hook
/hook/death/proc/nif_soulcatcher(var/mob/living/L)
if(!istype(L) || !L.mind) return TRUE //Hooks must return TRUE
/mob/living/proc/soulcatcher_on_mob_death()
if(!mind)
return
if(isbelly(L.loc)) //Died in someone
var/obj/belly/B = L.loc
if(isbelly(loc)) //Died in someone
var/obj/belly/B = loc
var/mob/living/owner = B.owner
var/obj/soulgem/gem = owner.soulgem
if(gem && gem.flag_check(SOULGEM_ACTIVE | NIF_SC_CATCHING_OTHERS, TRUE))
var/to_use_custom_name = null
if(isanimal(L))
to_use_custom_name = L.name
gem.catch_mob(L, to_use_custom_name)
return TRUE
if(isanimal(src))
to_use_custom_name = name
gem.catch_mob(src, to_use_custom_name)
return
var/mob/living/carbon/human/HP = B.owner
var/mob/living/carbon/human/H = L
if(!istype(H)) return TRUE
var/mob/living/carbon/human/H = src
if(!istype(H))
return
if(istype(HP) && HP.nif && HP.nif.flag_check(NIF_O_SCOTHERS,NIF_FLAGS_OTHER))
var/datum/nifsoft/soulcatcher/SC = HP.nif.imp_check(NIF_SOULCATCHER)
SC.catch_mob(H)
else
var/obj/soulgem/gem = L.soulgem
var/obj/soulgem/gem = soulgem
if(gem && gem.flag_check(SOULGEM_ACTIVE | NIF_SC_CATCHING_ME, TRUE))
var/to_use_custom_name = null
if(isanimal(L))
to_use_custom_name = L.name
gem.catch_mob(L, to_use_custom_name)
return TRUE
var/mob/living/carbon/human/H = L
if(!istype(H)) return TRUE
if(isanimal(src))
to_use_custom_name = name
gem.catch_mob(src, to_use_custom_name)
return
var/mob/living/carbon/human/H = src
if(!istype(H))
return
if(H.nif && H.nif.flag_check(NIF_O_SCMYSELF,NIF_FLAGS_OTHER)) //They are caught in their own NIF
var/datum/nifsoft/soulcatcher/SC = H.nif.imp_check(NIF_SOULCATCHER)
SC.catch_mob(H)
return TRUE
///////////////////
//Verbs for humans