mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 23:29:10 +01:00
Merge pull request #3680 from CHOMPStation2/upstream-merge-12227
[MIRROR] Absorb Languages
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -432,6 +432,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
|
||||
@@ -738,6 +739,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.
|
||||
@@ -803,6 +809,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>")
|
||||
|
||||
@@ -814,6 +821,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
|
||||
|
||||
@@ -11,6 +11,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
|
||||
|
||||
@@ -652,6 +652,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)
|
||||
|
||||
Reference in New Issue
Block a user