From cac23937e1e9d6b7a3e0080e6aafe4787f2608d9 Mon Sep 17 00:00:00 2001 From: Heroman Date: Fri, 7 Jan 2022 06:32:21 +1000 Subject: [PATCH] Makes Vox and Zaddat capable of breathing and not dying when in stomachs --- .../carbon/human/species/outsider/vox.dm | 5 ++- .../human/species/species_getters_vr.dm | 5 ++- .../carbon/human/species/station/station.dm | 2 ++ code/modules/mob/living/life.dm | 10 ++++-- code/modules/vore/eating/living_vr.dm | 34 +++++++++++++++++-- 5 files changed, 49 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index e8ff96175a7..bb80c4c9d4f 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -109,4 +109,7 @@ H.internal = H.r_hand H.internal = locate(/obj/item/weapon/tank) in H.contents if(istype(H.internal,/obj/item/weapon/tank) && H.internals) - H.internals.icon_state = "internal1" \ No newline at end of file + H.internals.icon_state = "internal1" + +/datum/species/vox/get_perfect_belly_air_type() + return /datum/gas_mixture/belly_air/vox \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/species_getters_vr.dm b/code/modules/mob/living/carbon/human/species/species_getters_vr.dm index 4ba9305accc..8bccade3585 100644 --- a/code/modules/mob/living/carbon/human/species/species_getters_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_getters_vr.dm @@ -4,4 +4,7 @@ /datum/species/proc/get_wing(var/mob/living/carbon/human/H) return wing /datum/species/proc/get_wing_animation(var/mob/living/carbon/human/H) - return wing_animation \ No newline at end of file + return wing_animation + +/datum/species/proc/get_perfect_belly_air_type(var/mob/living/carbon/human/H) + return /datum/gas_mixture/belly_air //Default \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 870ac0e97d0..46f66e02f09 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -467,6 +467,8 @@ if(!(K in covered)) H.apply_damage(light_amount/4, BURN, K, 0, 0, "Abnormal growths") +/datum/species/zaddat/get_perfect_belly_air_type() + return /datum/gas_mixture/belly_air/zaddat /datum/species/diona name = SPECIES_DIONA diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 90bec77cb7d..1182dcf34bd 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -10,7 +10,11 @@ if(!loc) return - var/datum/gas_mixture/environment = loc.return_air() + var/datum/gas_mixture/environment + if(isbelly(loc)) + environment = loc.return_air_for_internal_lifeform(src) + else + environment = loc.return_air() //handle_modifiers() // Do this early since it might affect other things later. //VOREStation Edit @@ -42,10 +46,10 @@ //Check if we're on fire handle_fire() - + if(client && !(client.prefs.ambience_freq == 0)) // Handle re-running ambience to mobs if they've remained in an area, AND have an active client assigned to them, and do not have repeating ambience disabled. handle_ambience() - + //stuff in the stomach //handle_stomach() //VOREStation Code diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 7551b4a2da4..9637ea2fe94 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -554,11 +554,20 @@ /obj/belly/return_air() return return_air_for_internal_lifeform() -/obj/belly/return_air_for_internal_lifeform() +/obj/belly/return_air_for_internal_lifeform(var/mob/living/lifeform) //Free air until someone wants to code processing it for reals from predbreaths - var/datum/gas_mixture/belly_air/air = new(1000) + var/air_type = lifeform.get_perfect_belly_air_type() // Without any overrides/changes, its gonna be /datum/gas_mixture/belly_air + var/air = new air_type(1000) return air +/mob/living/proc/get_perfect_belly_air_type() + return /datum/gas_mixture/belly_air + +/mob/living/carbon/human/get_perfect_belly_air_type() + if(species) + return species.get_perfect_belly_air_type() + return ..() + // This is about 0.896m^3 of atmosphere /datum/gas_mixture/belly_air volume = 2500 @@ -571,6 +580,27 @@ "oxygen" = 21, "nitrogen" = 79) +/datum/gas_mixture/belly_air/vox + volume = 2500 + temperature = 293.150 + total_moles = 104 + +/datum/gas_mixture/belly_air/vox/New() + . = ..() + gas = list( + "phoron" = 100) + +/datum/gas_mixture/belly_air/zaddat + volume = 2500 + temperature = 293.150 + total_moles = 300 + +/datum/gas_mixture/belly_air/zaddat/New() + . = ..() + gas = list( + "oxygen" = 100) + + /mob/living/proc/feed_grabbed_to_self_falling_nom(var/mob/living/user, var/mob/living/prey) var/belly = user.vore_selected return perform_the_nom(user, prey, user, belly, delay = 1) //1/10th of a second is probably fine.