Replaced all the extraneous flags with bitflags
This commit is contained in:
@@ -221,9 +221,9 @@
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
var/mob/living/OW = owner
|
||||
if(L.absorbed && !include_absorbed)
|
||||
if(L.vore_flags & ABSORBED && !include_absorbed)
|
||||
continue
|
||||
L.absorbed = FALSE
|
||||
L.vore_flags &= ~ABSORBED
|
||||
L.stop_sound_channel(CHANNEL_PREYLOOP)
|
||||
SEND_SIGNAL(OW, COMSIG_CLEAR_MOOD_EVENT, "fedpred", /datum/mood_event/fedpred)
|
||||
SEND_SIGNAL(L, COMSIG_CLEAR_MOOD_EVENT, "fedprey", /datum/mood_event/fedprey)
|
||||
@@ -277,14 +277,14 @@
|
||||
SEND_SIGNAL(OW, COMSIG_ADD_MOOD_EVENT, "emptypred", /datum/mood_event/emptypred)
|
||||
SEND_SIGNAL(ML, COMSIG_ADD_MOOD_EVENT, "emptyprey", /datum/mood_event/emptyprey)
|
||||
|
||||
if(ML.absorbed)
|
||||
ML.absorbed = FALSE
|
||||
if(CHECK_BITFIELD(ML.vore_flags,ABSORBED))
|
||||
DISABLE_BITFIELD(ML.vore_flags,ABSORBED)
|
||||
if(ishuman(M) && ishuman(OW))
|
||||
var/mob/living/carbon/human/Prey = M
|
||||
var/mob/living/carbon/human/Pred = OW
|
||||
var/absorbed_count = 2 //Prey that we were, plus the pred gets a portion
|
||||
for(var/mob/living/P in contents)
|
||||
if(P.absorbed)
|
||||
if(CHECK_BITFIELD(P.vore_flags,ABSORBED))
|
||||
absorbed_count++
|
||||
Pred.reagents.trans_to(Prey, Pred.reagents.total_volume / absorbed_count)
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
formatted_message = replacetext(formatted_message,"%pred",owner)
|
||||
formatted_message = replacetext(formatted_message,"%prey",english_list(contents))
|
||||
for(var/mob/living/P in contents)
|
||||
if(!P.absorbed) //This is required first, in case there's a person absorbed and not absorbed in a stomach.
|
||||
if(!CHECK_BITFIELD(P.vore_flags, ABSORBED)) //This is required first, in case there's a person absorbed and not absorbed in a stomach.
|
||||
total_bulge += P.mob_size
|
||||
if(total_bulge >= bulge_size && bulge_size != 0)
|
||||
return("<span class='warning'>[formatted_message]</span><BR>")
|
||||
@@ -484,7 +484,7 @@
|
||||
|
||||
// Handle a mob being absorbed
|
||||
/obj/belly/proc/absorb_living(var/mob/living/M)
|
||||
M.absorbed = TRUE
|
||||
ENABLE_BITFIELD(M.vore_flags, ABSORBED)
|
||||
to_chat(M,"<span class='notice'>[owner]'s [lowertext(name)] absorbs your body, making you part of them.</span>")
|
||||
to_chat(owner,"<span class='notice'>Your [lowertext(name)] absorbs [M]'s body, making them part of you.</span>")
|
||||
|
||||
@@ -498,7 +498,7 @@
|
||||
for(var/belly in M.vore_organs)
|
||||
var/obj/belly/B = belly
|
||||
for(var/mob/living/Mm in B)
|
||||
if(Mm.absorbed)
|
||||
if(CHECK_BITFIELD(Mm.vore_flags, ABSORBED))
|
||||
absorb_living(Mm)
|
||||
|
||||
//Update owner
|
||||
|
||||
Reference in New Issue
Block a user