vore soulcatcher (#8526)

This commit is contained in:
Kashargul
2024-07-18 09:40:48 +02:00
committed by GitHub
parent 813049ab40
commit 7468bf90af
90 changed files with 4593 additions and 2388 deletions

View File

@@ -1,11 +1,12 @@
//CHOMPEdit, all moved to globals! code\__defines\nif_ch.dm
//These two also have NIF FLAG representations. These are the local setting representations.
#define NIF_SC_CATCHING_ME 0x1
#define NIF_SC_CATCHING_OTHERS 0x2
//# define NIF_SC_CATCHING_ME 0x1 //CHOMPRemove
//# define NIF_SC_CATCHING_OTHERS 0x2 //CHOMPRemove
//These are purely local setings flags, without global representation.
#define NIF_SC_ALLOW_EARS 0x4
#define NIF_SC_ALLOW_EYES 0x8
#define NIF_SC_BACKUPS 0x10
#define NIF_SC_PROJECTING 0x20
//# define NIF_SC_ALLOW_EARS 0x4 //CHOMPRemove
//# define NIF_SC_ALLOW_EYES 0x8 //CHOMPRemove
//# define NIF_SC_BACKUPS 0x10 //CHOMPRemove
//# define NIF_SC_PROJECTING 0x20 //CHOMPRemove
///////////
// Soulcatcher - Like a posibrain, sorta!
@@ -212,6 +213,7 @@
//Complex version for catching in-round characters
/datum/nifsoft/soulcatcher/proc/catch_mob(var/mob/M)
if(!M.mind) return
if(!(M.soulcatcher_pref_flags & SOULCATCHER_ALLOW_CAPTURE)) return
//Create a new brain mob
var/mob/living/carbon/brain/caught_soul/brainmob = new(nif)
@@ -312,7 +314,7 @@
. = ..()
if(!parent_mob && !transient &&(life_tick % 150 == 0) && soulcatcher.setting_flags & NIF_SC_BACKUPS)
if(!parent_mob && !transient &&(life_tick % 150 == 0) && soulcatcher?.setting_flags & NIF_SC_BACKUPS) //CHOMPEdit
SStranscore.m_backup(mind,0) //Passed 0 means "Don't touch the nif fields on the mind record"
life_tick++
@@ -413,7 +415,7 @@
plane = PLANE_AUGMENTED
icon = 'icons/obj/machines/ar_elements.dmi'
icon_state = "beacon"
var/mob/living/carbon/human/parent_human
var/mob/living/parent_human //CHOMPEdit, no human, all living!
/mob/observer/eye/ar_soul/New(var/mob/brainmob, var/human)
ASSERT(brainmob && brainmob.client)
@@ -474,19 +476,33 @@
///////////////////
//The catching hook
/hook/death/proc/nif_soulcatcher(var/mob/living/carbon/human/H)
if(!istype(H) || !H.mind) return TRUE //Hooks must return TRUE
/hook/death/proc/nif_soulcatcher(var/mob/living/L) //CHOMPEdit Start
if(!istype(L) || !L.mind) return TRUE //Hooks must return TRUE
if(isbelly(H.loc)) //Died in someone
var/obj/belly/B = H.loc
if(isbelly(L.loc)) //Died in someone
var/obj/belly/B = L.loc
var/mob/living/owner = B.owner
var/obj/soulgem/gem = owner.soulgem
if(owner && gem.flag_check(SOULGEM_ACTIVE | NIF_SC_CATCHING_OTHERS, TRUE))
gem.catch_mob(L)
return TRUE
var/mob/living/carbon/human/HP = B.owner
var/mob/living/carbon/human/H = L
if(!istype(H)) return TRUE
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 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)
else
var/obj/soulgem/gem = L.soulgem
if(gem && gem.flag_check(SOULGEM_ACTIVE | NIF_SC_CATCHING_ME, TRUE))
gem.catch_mob(L)
return TRUE
var/mob/living/carbon/human/H = L
if(!istype(H)) return TRUE
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)
//CHOMPEdit End
return TRUE
///////////////////
@@ -618,9 +634,9 @@
var/sane_message = sanitize(message)
soulcatcher.emote_into(sane_message,src,null)
#undef NIF_SC_CATCHING_ME
#undef NIF_SC_CATCHING_OTHERS
#undef NIF_SC_ALLOW_EARS
#undef NIF_SC_ALLOW_EYES
#undef NIF_SC_BACKUPS
#undef NIF_SC_PROJECTING
//# undef NIF_SC_CATCHING_ME //CHOMPRemove
//# undef NIF_SC_CATCHING_OTHERS //CHOMPRemove
//# undef NIF_SC_ALLOW_EARS //CHOMPRemove
//# undef NIF_SC_ALLOW_EYES //CHOMPRemove
//# undef NIF_SC_BACKUPS //CHOMPRemove
//# undef NIF_SC_PROJECTING //CHOMPRemove