diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm
index 6a45b64488..630f10602d 100644
--- a/code/modules/vore/eating/belly_obj_vr.dm
+++ b/code/modules/vore/eating/belly_obj_vr.dm
@@ -39,7 +39,7 @@
//Actual full digest modes
var/tmp/static/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_HEAL,DM_SHRINK,DM_GROW,DM_SIZE_STEAL)
//Digest mode addon flags
- var/tmp/static/list/mode_flag_list = list("Numbing" = DM_FLAG_NUMBING, "Itemweak" = DM_FLAG_ITEMWEAK, "Stripping" = DM_FLAG_STRIPPING)
+ var/tmp/static/list/mode_flag_list = list("Numbing" = DM_FLAG_NUMBING, "Itemweak" = DM_FLAG_ITEMWEAK, "Stripping" = DM_FLAG_STRIPPING, "Leave Remains" = DM_FLAG_LEAVEREMAINS) //TFF 30/4/19: Ports VoreStation Remains Option - add new belly mode addon to toggle
//Transformation modes
var/tmp/static/list/transform_modes = list(DM_TRANSFORM_MALE,DM_TRANSFORM_FEMALE,DM_TRANSFORM_KEEP_GENDER,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG,DM_TRANSFORM_REPLICA,DM_TRANSFORM_REPLICA_EGG,DM_TRANSFORM_KEEP_GENDER_EGG,DM_TRANSFORM_MALE_EGG,DM_TRANSFORM_FEMALE_EGG, DM_EGG)
@@ -259,10 +259,9 @@
if(owner.stat == DEAD)
return
if(!prey.isEdible) //CHOMPEDIT: Trying to make pred mobs prey? N O U
-
+
var/mob/living/simple_animal/preydator = prey
-
- if(preydator.icon_state == preydator.icon_living && preydator.size_multiplier >= 1)
+ if(preydator.icon_state == preydator.icon_living)
user.visible_message("\the [user] promptly gets tackled by \the [prey] for trying to break their prefs! !!")
user.Weaken(5)
if (preydator.will_eat(user))
diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm
index 6c7a38633d..a632bdebcd 100644
--- a/code/modules/vore/eating/bellymodes_vr.dm
+++ b/code/modules/vore/eating/bellymodes_vr.dm
@@ -113,6 +113,9 @@
to_chat(M,"" + digest_alert_prey + "")
play_sound = pick(death_sounds)
+ //TFF 30/4/19: Ports VoreStation Remains Option - handler to leave remains
+ if((mode_flags & DM_FLAG_LEAVEREMAINS) && M.digest_leave_remains)
+ handle_remains_leaving(M)
digestion_death(M)
owner.update_icons()
if(compensation > 0)
@@ -129,9 +132,9 @@
if(istype(M,/mob/living/simple_animal/retaliate/synx))
var/syntox = digest_brute+digest_burn
owner.adjustToxLoss(syntox)
- M.adjustBruteLoss(-syntox*2) //Should automaticaly clamp to 0
- M.adjustFireLoss(-syntox*2) //Should automaticaly clamp to 0
- //END SYNX hook.
+ if(M.health <= M.maxHealth)
+ M.health = M.health + syntox*2
+
// Deal digestion damage (and feed the pred)
var/old_brute = M.getBruteLoss()
var/old_burn = M.getFireLoss()
diff --git a/code/modules/vore/eating/leave_remains_vr.dm b/code/modules/vore/eating/leave_remains_vr.dm
new file mode 100644
index 0000000000..46ac2f873e
--- /dev/null
+++ b/code/modules/vore/eating/leave_remains_vr.dm
@@ -0,0 +1,164 @@
+//TFF 30/4/19: Ports VoreStation Remains Option - add new file to handle leaving some remains after digestion kills you
+/obj/belly/proc/handle_remains_leaving(var/mob/living/M)
+
+ if(istype(M,/mob/living/carbon/human)) //Are we even humanoid?
+ var/mob/living/carbon/human/H = M
+
+ if((H.species.name in remainless_species) || H.isSynthetic()) //Don't leave anything if there is nothing to leave
+ return
+
+ else
+ var/bones_amount = rand(2,3) //some random variety in amount of bones left
+
+ if(prob(20)) //ribcage surviving whole is some luck
+ new /obj/item/weapon/digestion_remains/ribcage(src,owner)
+ bones_amount--
+
+ while(bones_amount) //throw in the rest
+ new /obj/item/weapon/digestion_remains(src,owner)
+ bones_amount--
+
+ var/skull_amount = 1
+ switch(H.species.name) //oh boy here we go, finding us a right skull
+ if(SPECIES_HUMAN)
+ new /obj/item/weapon/digestion_remains/skull(src,owner)
+ skull_amount--
+ if(SPECIES_TAJ)
+ new /obj/item/weapon/digestion_remains/skull/tajaran(src,owner)
+ skull_amount--
+ if(SPECIES_UNATHI)
+ new /obj/item/weapon/digestion_remains/skull/unathi(src,owner)
+ skull_amount--
+ if(SPECIES_SKRELL)
+ new /obj/item/weapon/digestion_remains/skull/skrell(src,owner)
+ skull_amount--
+ if(SPECIES_VASILISSAN)
+ new /obj/item/weapon/digestion_remains/skull/vasilissan(src,owner)
+ skull_amount--
+ if(SPECIES_AKULA)
+ new /obj/item/weapon/digestion_remains/skull/akula(src,owner)
+ skull_amount--
+ if(SPECIES_RAPALA)
+ new /obj/item/weapon/digestion_remains/skull/rapala(src,owner)
+ skull_amount--
+ if(SPECIES_VULPKANIN)
+ new /obj/item/weapon/digestion_remains/skull/vulpkanin(src,owner)
+ skull_amount--
+ if(SPECIES_SERGAL)
+ new /obj/item/weapon/digestion_remains/skull/sergal(src,owner)
+ skull_amount--
+ if(SPECIES_ZORREN_FLAT || SPECIES_ZORREN_HIGH)
+ new /obj/item/weapon/digestion_remains/skull/zorren(src,owner)
+ skull_amount--
+ if(SPECIES_NEVREAN)
+ new /obj/item/weapon/digestion_remains/skull/nevrean(src,owner)
+ skull_amount--
+ if(SPECIES_TESHARI)
+ new /obj/item/weapon/digestion_remains/skull/teshari(src,owner)
+ skull_amount--
+ if(SPECIES_VOX)
+ new /obj/item/weapon/digestion_remains/skull/vox(src,owner)
+ skull_amount--
+ if(SPECIES_XENOHYBRID)
+ new /obj/item/weapon/digestion_remains/skull/xenohybrid(src,owner)
+ skull_amount--
+ if(skull_amount && H.species.selects_bodytype) //We still haven't found correct skull...
+ if(H.species.base_species == SPECIES_HUMAN)
+ new /obj/item/weapon/digestion_remains/skull/unknown(src,owner)
+ else
+ new /obj/item/weapon/digestion_remains/skull/unknown/anthro(src,owner)
+ else if(skull_amount) //Something entirely different...
+ new /obj/item/weapon/digestion_remains/skull/unknown(src,owner)
+ else
+ return
+
+/obj/item/weapon/digestion_remains
+ name = "bone"
+ desc = "A bleached bone. It's very non-descript and its hard to tell what species or part of the body it came from."
+ icon = 'icons/obj/bones_vr.dmi'
+ icon_state = "generic"
+ force = 0
+ throwforce = 0
+ item_state = "bone"
+ w_class = ITEMSIZE_SMALL
+ var/pred_ckey
+ var/pred_name
+
+/obj/item/weapon/digestion_remains/New(var/newloc,var/mob/living/pred)
+ ..(newloc)
+ pred_ckey = pred.ckey
+ pred_name = pred.name
+
+/obj/item/weapon/digestion_remains/attack_self(mob/user)
+ if(user.a_intent == I_HURT)
+ to_chat(user,"As you squeeze the [name], it crumbles into dust and falls apart into nothing!")
+ qdel(src)
+
+/obj/item/weapon/digestion_remains/ribcage
+ name = "ribcage"
+ desc = "A bleached ribcage. It's very white and definitely has seen better times. Hard to tell what it belonged to."
+ icon_state = "ribcage"
+
+/obj/item/weapon/digestion_remains/skull
+ name = "skull"
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a human."
+ icon_state = "skull"
+
+/obj/item/weapon/digestion_remains/skull/tajaran
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a tajara."
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/unathi
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to an unathi."
+ icon_state = "skull_unathi"
+
+/obj/item/weapon/digestion_remains/skull/skrell
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a skrell."
+ icon_state = "skull"
+
+/obj/item/weapon/digestion_remains/skull/vasilissan
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a vasilissan."
+ icon_state = "skull"
+
+/obj/item/weapon/digestion_remains/skull/akula
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to an akula."
+ icon_state = "skull_unathi"
+
+/obj/item/weapon/digestion_remains/skull/rapala
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a rapala."
+ icon_state = "skull"
+
+/obj/item/weapon/digestion_remains/skull/vulpkanin
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a vulpkanin."
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/sergal
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a sergal."
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/zorren
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a zorren."
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/nevrean
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a nevrean."
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/teshari
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a teshari."
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/vox
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to a vox."
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/unknown
+ desc = "A bleached skull. It looks very weakened. You can't quite tell what species it belonged to."
+ icon_state = "skull"
+
+/obj/item/weapon/digestion_remains/skull/unknown/anthro
+ icon_state = "skull_taj"
+
+/obj/item/weapon/digestion_remains/skull/xenohybrid
+ desc = "A bleached skull. It looks very weakened. Seems like it belonged to something with an elongated head."
+ icon_state = "skull_xenohybrid"
\ No newline at end of file
diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm
index a7bfc1af9c..8d1717b320 100644
--- a/code/modules/vore/eating/living_vr.dm
+++ b/code/modules/vore/eating/living_vr.dm
@@ -1,7 +1,11 @@
///////////////////// Mob Living /////////////////////
/mob/living
var/digestable = 1 // Can the mob be digested inside a belly?
+ //TFF 30/4/19: Ports VoreStation Remains Option - set var for leaving remains
+ var/digest_leave_remains = 0 // Will this mob leave bones/skull/etc after the melty demise?
var/allowmobvore = 1 // Will simplemobs attempt to eat the mob?
+ //TFF 30/4/19: Ports VoreStation Mechanical Vore Prefs - set var for displaying vore prefs on examine
+ var/showvoreprefs = 1 // Determines if the mechanical vore preferences button will be displayed on the mob or not.
var/obj/belly/vore_selected // Default to no vore capability.
var/list/vore_organs = list() // List of vore containers inside a mob
var/absorbed = 0 // If a mob is absorbed into another
@@ -194,6 +198,8 @@
var/datum/vore_preferences/P = client.prefs_vr
P.digestable = src.digestable
+ //TFF 30/4/19: Ports VoreStation Remains Option
+ P.digest_leave_remains = src.digest_leave_remains
P.allowmobvore = src.allowmobvore
P.vore_taste = src.vore_taste
P.can_be_drop_prey = src.can_be_drop_prey
@@ -219,6 +225,8 @@
var/datum/vore_preferences/P = client.prefs_vr
digestable = P.digestable
+ //TFF 30/4/19: Ports VoreStation Remains Option
+ P.digest_leave_remains = src.digest_leave_remains
allowmobvore = P.allowmobvore
vore_taste = P.vore_taste
can_be_drop_prey = P.can_be_drop_prey
@@ -612,3 +620,27 @@
set category = "Preferences"
set desc = "Switch sharp/fuzzy scaling for current mob."
appearance_flags ^= PIXEL_SCALE
+
+//TFF 30/4/19: Ports VoreStation Mechanical Vore Prefs & Remains-leaving in 1 go
+/mob/living/examine(mob/user)
+ . = ..()
+ if(showvoreprefs)
+ to_chat(user, "\[Mechanical Vore Preferences\]")
+
+/mob/living/Topic(href, href_list) //Can't find any instances of Topic() being overridden by /mob/living in polaris' base code, even though /mob/living/carbon/human's Topic() has a ..() call
+ if(href_list["vore_prefs"])
+ display_voreprefs(usr)
+ return ..()
+
+/mob/living/proc/display_voreprefs(mob/user) //Called by Topic() calls on instances of /mob/living (and subtypes) containing vore_prefs as an argument
+ if(!user)
+ CRASH("display_voreprefs() was called without an associated user.")
+ var/dispvoreprefs = "[src]'s vore preferences
"
+ dispvoreprefs += "Digestable: [digestable ? "Enabled" : "Disabled"]
"
+ dispvoreprefs += "Leaves Remains: [digest_leave_remains ? "Enabled" : "Disabled"]
"
+ dispvoreprefs += "Mob Vore: [allowmobvore ? "Enabled" : "Disabled"]
"
+ dispvoreprefs += "Drop-nom prey: [can_be_drop_prey ? "Enabled" : "Disabled"]
"
+ dispvoreprefs += "Drop-nom pred: [can_be_drop_pred ? "Enabled" : "Disabled"]
"
+ user << browse("