Vore code to json and more (#5789)

* Vore 2.0

Initial commit

* double checked porting

* Fixes compile issues

* converts Ash Drake bellies to new system

digs out lingering datum/belly stuff too

* Let's just work on this later

* System operational

* Update preferences.dm
This commit is contained in:
Poojawa
2018-03-06 03:59:31 -06:00
committed by GitHub
parent 9d8286ee53
commit 6e5131cfc5
33 changed files with 1976 additions and 871 deletions
@@ -252,10 +252,6 @@
if(91.01 to INFINITY)
msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n"
for (var/I in src.vore_organs)
var/datum/belly/B = vore_organs[I]
msg += B.get_examine_msg()
msg += "</span>"
if(!appears_dead)
@@ -329,7 +325,7 @@
if(print_flavor_text() && get_visible_name() != "Unknown")//Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
msg += "[print_flavor_text()]\n"
msg += "*---------*</span>"
to_chat(user, msg)
@@ -42,13 +42,4 @@
message = "<span class='warning'>[t_His] stomach is firmly packed with digesting slop. [t_He] must have eaten at least a few times worth their body weight! It looks hard for them to stand, and [t_his] gut jiggles when they move.</span>\n"
if(4075 to 10000) // Four or more people.
message = "<span class='warning'>[t_He] [t_is] so absolutely stuffed that you aren't sure how it's possible to move. [t_He] can't seem to swell any bigger. The surface of [t_his] belly looks sorely strained!</span>\n"
return message
/mob/living/carbon/human/proc/examine_bellies()
var/message = ""
for (var/I in src.vore_organs)
var/datum/belly/B = vore_organs[I]
message += B.get_examine_msg()
return message
@@ -32,6 +32,7 @@
/mob/living/carbon/human/Destroy()
QDEL_NULL(physiology)
QDEL_NULL_LIST(vore_organs) // CITADEL EDIT belly stuff
return ..()
/mob/living/carbon/human/OpenCraftingMenu()
+9 -1
View File
@@ -64,6 +64,10 @@
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
if((wear_suit && (wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (head && (head.flags_1 & STOPSPRESSUREDMAGE_1)))
return ONE_ATMOSPHERE
if(istype(loc, /obj/belly))
return ONE_ATMOSPHERE
if(istype(loc, /obj/item/device/dogborg/sleeper))
return ONE_ATMOSPHERE
else
return pressure
@@ -138,6 +142,8 @@
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
if(ismob(loc))
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
if(istype(loc, /obj/belly))
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
//END EDIT
if(wear_suit)
if(wear_suit.max_heat_protection_temperature >= FIRE_SUIT_MAX_TEMP_PROTECT)
@@ -246,10 +252,12 @@
/mob/living/carbon/human/proc/get_cold_protection(temperature)
if(has_trait(TRAIT_RESISTCOLD))
return TRUE
//CITADEL EDIT Mandatory for vore code.
if(istype(loc, /obj/item/device/dogborg/sleeper))
return 1 //freezing to death in sleepers ruins fun.
if(istype(loc, /obj/belly))
return 1
if(ismob(loc))
return 1 //because lazy and being inside somemone insulates you from space
//END EDIT
@@ -351,3 +351,10 @@
H.update_body()
else
return
//misc
/mob/living/carbon/human/dummy
no_vore = TRUE
/mob/living/carbon/human/vore
devourable = TRUE
+2
View File
@@ -52,6 +52,8 @@
return
if(ismob(loc))
return
if(istype(loc, /obj/belly))
return
var/datum/gas_mixture/environment
if(loc)
-3
View File
@@ -54,9 +54,6 @@
handle_fire()
// Citadel Vore code for belly processes
handle_internal_contents()
//stuff in the stomach
handle_stomach()
@@ -1,26 +1,27 @@
/mob/living/simple_animal/hostile/megafauna/dragon
vore_active = TRUE
no_vore = FALSE
/mob/living/simple_animal/hostile/megafauna/dragon/Initialize()
// Create and register 'stomachs'
var/datum/belly/megafauna/dragon/maw/maw = new(src)
var/datum/belly/megafauna/dragon/gullet/gullet = new(src)
var/datum/belly/megafauna/dragon/gut/gut = new(src)
for(var/datum/belly/X in list(maw, gullet, gut))
vore_organs[X.name] = X
var/obj/belly/megafauna/dragon/maw/maw = new(src)
var/obj/belly/megafauna/dragon/gullet/gullet = new(src)
var/obj/belly/megafauna/dragon/gut/gut = new(src)
// for(var/obj/belly/X in list(maw, gullet, gut))
// vore_organs[X.name] = X
// Connect 'stomachs' together
maw.transferlocation = gullet
gullet.transferlocation = gut
vore_selected = maw.name // NPC eats into maw
vore_selected = maw // NPC eats into maw
return ..()
/datum/belly/megafauna/dragon
/obj/belly/megafauna/dragon
human_prey_swallow_time = 50 // maybe enough to switch targets if distracted
nonhuman_prey_swallow_time = 50
/datum/belly/megafauna/dragon/maw
/obj/belly/megafauna/dragon/maw
name = "maw"
inside_flavor = "The maw of the dreaded Ash drake closes around you, engulfing you into a swelteringly hot, disgusting enviroment. The acidic saliva tingles over your form while that tongue pushes you further back...towards the dark gullet beyond."
desc = "The maw of the dreaded Ash drake closes around you, engulfing you into a swelteringly hot, disgusting enviroment. The acidic saliva tingles over your form while that tongue pushes you further back...towards the dark gullet beyond."
vore_verb = "scoop"
vore_sound = 'sound/vore/pred/taurswallow.ogg'
swallow_time = 20
@@ -30,9 +31,9 @@
autotransferchance = 66
autotransferwait = 200
/datum/belly/megafauna/dragon/gullet
/obj/belly/megafauna/dragon/gullet
name = "gullet"
inside_flavor = "A ripple of muscle and arching of the tongue pushes you down like any other food. No choice in the matter, you're simply consumed. The dark ambiance of the outside world is replaced with working, wet flesh. Your only light being what you brought with you."
desc = "A ripple of muscle and arching of the tongue pushes you down like any other food. No choice in the matter, you're simply consumed. The dark ambiance of the outside world is replaced with working, wet flesh. Your only light being what you brought with you."
swallow_time = 60 // costs extra time to eat directly to here
escapechance = 5
// From above, will transfer into gut
@@ -40,10 +41,10 @@
autotransferchance = 50
autotransferwait = 200
/datum/belly/megafauna/dragon/gut
/obj/belly/megafauna/dragon/gut
name = "stomach"
vore_capacity = 5 //I doubt this many people will actually last in the gut, but...
inside_flavor = "With a rush of burning ichor greeting you, you're introduced to the Drake's stomach. Wrinkled walls greedily grind against you, acidic slimes working into your body as you become fuel and nutriton for a superior predator. All that's left is your body's willingness to resist your destiny."
desc = "With a rush of burning ichor greeting you, you're introduced to the Drake's stomach. Wrinkled walls greedily grind against you, acidic slimes working into your body as you become fuel and nutriton for a superior predator. All that's left is your body's willingness to resist your destiny."
digest_mode = DM_DRAGON
digest_burn = 5
swallow_time = 100 // costs extra time to eat directly to here
@@ -103,7 +103,8 @@
stack_trace("Simple animal being instantiated in nullspace")
if(vore_active)
init_belly()
verbs |= /mob/living/proc/animal_nom
if(!IsAdvancedToolUser())
verbs |= /mob/living/simple_animal/proc/animal_nom
/mob/living/simple_animal/Destroy()
GLOB.simple_animals[AIStatus] -= src
@@ -7,18 +7,18 @@
var/vore_default_mode = DM_DIGEST // Default bellymode (DM_DIGEST, DM_HOLD, DM_ABSORB)
var/vore_digest_chance = 25 // Chance to switch to digest mode if resisted
var/vore_escape_chance = 25 // Chance of resisting out of mob
var/vore_absorb_chance = 0 // chance of absorbtion by mob
var/vore_stomach_name // The name for the first belly if not "stomach"
var/vore_stomach_flavor // The flavortext for the first belly if not the default
var/vore_fullness = 0 // How "full" the belly is (controls icons)
var/list/living_mobs = list()
// Release belly contents beforey being gc'd!
/mob/living/simple_animal/Destroy()
for(var/I in vore_organs)
var/datum/belly/B = vore_organs[I]
B.release_all_contents() // When your stomach is empty
release_vore_contents()
prey_excludes.Cut()
. = ..()
@@ -34,10 +34,10 @@
vore_fullness = new_fullness
/*
/mob/living/simple_animal/proc/swallow_check()
for(var/I in vore_organs)
var/datum/belly/B = vore_organs[I]
var/obj/belly/B = vore_organs[I]
if(vore_active)
update_fullness()
if(!vore_fullness)
@@ -48,16 +48,14 @@
/mob/living/simple_animal/proc/swallow_mob()
for(var/I in vore_organs)
var/datum/belly/B = vore_organs[I]
for(var/mob/living/M in B.internal_contents)
B.transfer_contents(M, B.transferlocation)
var/obj/belly/B = vore_organs[I]
for(var/mob/living/M in B.contents)
B.transfer_contents(M, transferlocation)
*/
/mob/living/simple_animal/death()
for(var/I in vore_organs)
var/datum/belly/B = vore_organs[I]
B.release_all_contents() // When your stomach is empty
..() // then you have my permission to die.
release_vore_contents()
. = ..()
// Simple animals have only one belly. This creates it (if it isn't already set up)
/mob/living/simple_animal/proc/init_belly()
@@ -66,18 +64,19 @@
if(no_vore) //If it can't vore, let's not give it a stomach.
return
var/datum/belly/B = new /datum/belly(src)
B.immutable = TRUE
var/obj/belly/B = new /obj/belly(src)
vore_selected = B
B.immutable = 1
B.name = vore_stomach_name ? vore_stomach_name : "stomach"
B.inside_flavor = vore_stomach_flavor ? vore_stomach_flavor : "Your surroundings are warm, soft, and slimy. Makes sense, considering you're inside \the [name]."
B.desc = vore_stomach_flavor ? vore_stomach_flavor : "Your surroundings are warm, soft, and slimy. Makes sense, considering you're inside \the [name]."
B.digest_mode = vore_default_mode
B.escapable = vore_escape_chance > 0
B.escapechance = vore_escape_chance
B.digestchance = vore_digest_chance
B.absorbchance = vore_absorb_chance
B.human_prey_swallow_time = swallowTime
B.nonhuman_prey_swallow_time = swallowTime
B.vore_verb = "swallow"
// TODO - Customizable per mob
B.emote_lists[DM_HOLD] = list( // We need more that aren't repetitive. I suck at endo. -Ace
"The insides knead at you gently for a moment.",
"The guts glorp wetly around you as some air shifts.",
@@ -98,5 +97,21 @@
"The juices pooling beneath you sizzle against your sore skin.",
"The churning walls slowly pulverize you into meaty nutrients.",
"The stomach glorps and gurgles as it tries to work you into slop.")
src.vore_organs[B.name] = B
src.vore_selected = B.name
/* B.emote_lists[DM_ITEMWEAK] = list(
"The burning acids eat away at your form.",
"The muscular stomach flesh grinds harshly against you.",
"The caustic air stings your chest when you try to breathe.",
"The slimy guts squeeze inward to help the digestive juices soften you up.",
"The onslaught against your body doesn't seem to be letting up; you're food now.",
"The predator's body ripples and crushes against you as digestive enzymes pull you apart.",
"The juices pooling beneath you sizzle against your sore skin.",
"The churning walls slowly pulverize you into meaty nutrients.",
"The stomach glorps and gurgles as it tries to work you into slop.")*/
//Grab = Nomf
/*
/mob/living/simple_animal/UnarmedAttack(var/atom/A, var/proximity)
. = ..()
if(a_intent == I_GRAB && isliving(A) && !has_hands)
animal_nom(A)*/