Absorb Languages

Makes it so when someone is absorbed, the pred and prey share languages. (and this is undone when unabsorbed/released)
This commit is contained in:
VerySoft
2022-02-13 23:37:16 -05:00
parent 5d069ea214
commit a751b73cd4
4 changed files with 48 additions and 0 deletions
+3
View File
@@ -36,6 +36,9 @@
qdel(selected_image)
QDEL_NULL(vorePanel) //VOREStation Add
QDEL_LIST_NULL(vore_organs) //VOREStation Add
temp_language_sources = null //VOREStation Add
temp_languages = null //VOREStation Add
if(LAZYLEN(organs))
organs_by_name.Cut()
+40
View File
@@ -374,6 +374,7 @@
ML.muffled = 0
if(ML.absorbed)
ML.absorbed = FALSE
handle_absorb_langs(ML, owner)
if(ishuman(M) && ishuman(OW))
var/mob/living/carbon/human/Prey = M
var/mob/living/carbon/human/Pred = OW
@@ -676,6 +677,11 @@
absorb_alert_prey = replacetext(absorb_alert_prey, "%countprey", absorbed_count)
M.absorbed = TRUE
if(M.ckey)
owner.temp_language_sources += M
M.temp_language_sources += owner
handle_absorb_langs(M, owner)
to_chat(M, "<span class='notice'>[absorb_alert_prey]</span>")
to_chat(owner, "<span class='notice'>[absorb_alert_owner]</span>")
if(M.noisy) //Mute drained absorbee hunger if enabled.
@@ -741,6 +747,7 @@
unabsorb_alert_prey = replacetext(unabsorb_alert_prey, "%countprey", absorbed_count)
M.absorbed = FALSE
handle_absorb_langs(M, owner)
to_chat(M, "<span class='notice'>[unabsorb_alert_prey]</span>")
to_chat(owner, "<span class='notice'>[unabsorb_alert_owner]</span>")
@@ -752,6 +759,39 @@
if(isanimal(owner))
owner.update_icon()
/////////////////////////////////////////////////////////////////////////
/obj/belly/proc/handle_absorb_langs(var/mob/living/prey, var/mob/living/pred)
for(var/mob/living/p in pred.temp_language_sources) //Let's look at the pred's sources
if (!p.absorbed)
for(var/L in pred.temp_languages)
if(L in p.languages)
pred.languages -= L
pred.temp_languages -= L
pred.temp_language_sources -= p
else
for(var/L in p.languages)
if(L in pred.languages)
continue
pred.languages += L
pred.temp_languages += L
for(var/mob/living/P in prey.temp_language_sources) //Let's look at the prey's sources
if (!prey.absorbed)
for(var/L in prey.temp_languages)
if(L in P.languages)
prey.languages -= L
prey.temp_languages -= L
prey.temp_language_sources -= P
else
for(var/L in P.languages)
if(L in prey.languages)
continue
prey.languages += L
prey.temp_languages += L
////////////////////////////////////////////////////////////////////////
//Digest a single item
//Receives a return value from digest_act that's how much nutrition
//the item should be worth
+2
View File
@@ -12,6 +12,8 @@
var/obj/belly/vore_selected // Default to no vore capability.
var/list/vore_organs = list() // List of vore containers inside a mob
var/absorbed = FALSE // If a mob is absorbed into another
var/list/temp_language_sources = list() //VOREStation Addition - Absorbs add languages to the pred
var/list/temp_languages = list() //VOREStation Addition - Absorbs add languages to the pred
var/weight = 137 // Weight for mobs for weightgain system
var/weight_gain = 1 // How fast you gain weight
var/weight_loss = 0.5 // How fast you lose weight
+3
View File
@@ -540,6 +540,9 @@
to_chat(user,"<span class='warning'>You manage to [lowertext(TB.vore_verb)] [M] into your [lowertext(TB.name)]!</span>")
to_chat(M,"<span class='warning'>[host] manages to [lowertext(TB.vore_verb)] you into their [lowertext(TB.name)]!</span>")
to_chat(OB.owner,"<span class='warning'>Someone inside you has eaten someone else!</span>")
if(M.absorbed)
M.absorbed = FALSE
OB.handle_absorb_langs(M, OB.owner)
TB.nom_mob(M)
/datum/vore_look/proc/pick_from_outside(mob/user, params)