From 401b09e207bb04d9ecbceb86841dc0969aafdbbb Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 2 Nov 2021 12:00:32 +0000 Subject: [PATCH] [MIRROR] Changes Plasmamen belt tanks volume and the rate that their lungs consume plasma to 1/4 of the previous value. [MDB IGNORE] (#9197) * Changes Plasmamen belt tanks volume and the rate that their lungs consume plasma to 1/4 of the previous value. (#62081) Plasmamen belt tank volume is 24, the extended engineering one is 6 and the emergency internals are 3. The issue balance wise is that all of those have the same pocket size and can be printed at the same Research tier, this results on smart atmos/engineers printing a plasmamen belt tank and filling it with O2 so their internals can last for almost 2 hours instead of the 24 minutes of the extended O2. Now they have the same volume but plasmamen lungs were rebalanced to consume plasma at a lower rate. To be clear, it will have no effect on how long the internal last for a plasmamen. Removes a no skill trick that gives you internals that will last for all shift, you can still make those but it will take a tiny bit of effort now. Also a small step to make internals balanced. * Changes Plasmamen belt tanks volume and the rate that their lungs consume plasma to 1/4 of the previous value. Co-authored-by: GuillaumePrata <55374212+GuillaumePrata@users.noreply.github.com> --- code/__DEFINES/atmospherics/atmos_piping.dm | 2 + code/game/objects/items/tanks/tank_types.dm | 4 +- code/modules/surgery/organs/lungs.dm | 2 +- code/modules/unit_tests/breath.dm | 43 +++++++++++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/atmospherics/atmos_piping.dm b/code/__DEFINES/atmospherics/atmos_piping.dm index f206d95a5f8..98a74102c18 100644 --- a/code/__DEFINES/atmospherics/atmos_piping.dm +++ b/code/__DEFINES/atmospherics/atmos_piping.dm @@ -39,6 +39,8 @@ #define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3) /// The default initial value gas tanks release valves are set to. (At least the ones containing pure plasma/oxygen.) #define TANK_DEFAULT_RELEASE_PRESSURE 16 +/// The default initial value gas plasmamen tanks releases valves are set to. +#define TANK_PLASMAMAN_RELEASE_PRESSURE 4 /// The internal temperature in kelvins at which a handheld gas tank begins to take damage. #define TANK_MELT_TEMPERATURE 1000000 /// The internal pressure in kPa at which a handheld gas tank begins to take damage. diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm index a6daf40b543..cd9eb15add2 100644 --- a/code/game/objects/items/tanks/tank_types.dm +++ b/code/game/objects/items/tanks/tank_types.dm @@ -106,7 +106,7 @@ inhand_icon_state = "plasmaman_tank" tank_holder_icon_state = null force = 10 - distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE + distribute_pressure = TANK_PLASMAMAN_RELEASE_PRESSURE /obj/item/tank/internals/plasmaman/populate_gas() air_contents.assert_gas(/datum/gas/plasma) @@ -125,7 +125,7 @@ worn_icon = null slot_flags = ITEM_SLOT_BELT force = 5 - volume = 24 //enough so they need to refill but not that often to be a chore + volume = 6 //same size as the engineering ones but plasmamen have special lungs that consume less plasma per breath w_class = WEIGHT_CLASS_SMALL //thanks i forgot this /obj/item/tank/internals/plasmaman/belt/full/populate_gas() diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 99887a3baf2..9ad37a6406e 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -504,7 +504,7 @@ icon_state = "lungs-plasma" safe_oxygen_min = 0 //We don't breathe this - safe_plasma_min = 16 //We breathe THIS! + safe_plasma_min = 4 //We breathe THIS! safe_plasma_max = 0 /obj/item/organ/lungs/slime diff --git a/code/modules/unit_tests/breath.dm b/code/modules/unit_tests/breath.dm index a36e5731408..36aa38e659d 100644 --- a/code/modules/unit_tests/breath.dm +++ b/code/modules/unit_tests/breath.dm @@ -32,5 +32,48 @@ TEST_ASSERT(!lab_rat.has_alert("not_enough_oxy"), "Humans can't get a full breath from the standard initial_gas_mix on a turf") +/// Tests to make sure plasmaman can breath from their internal tanks +/datum/unit_test/breath_sanity_plasmamen +/datum/unit_test/breath_sanity_plasmamen/Run() + var/mob/living/carbon/human/species/plasma/lab_rat = allocate(/mob/living/carbon/human/species/plasma) + var/obj/item/clothing/mask/breath/tube = allocate(/obj/item/clothing/mask/breath) + var/obj/item/tank/internals/plasmaman/source = allocate(/obj/item/tank/internals/plasmaman) + lab_rat.equip_to_slot_if_possible(tube, ITEM_SLOT_MASK) + lab_rat.equip_to_slot_if_possible(source, ITEM_SLOT_HANDS) + source.toggle_internals(lab_rat) + + lab_rat.breathe() + + TEST_ASSERT(!lab_rat.has_alert("not_enough_plas"), "Plasmamen can't get a full breath from a standard plasma tank") + lab_rat.clear_alert("not_enough_plas") + + //Prep the mob + source.toggle_internals(lab_rat) + TEST_ASSERT(!lab_rat.internal, "Plasmaman toggle_internals() failed to toggle internals") + +/// Tests to make sure ashwalkers can breath from the lavaland air +/datum/unit_test/breath_sanity_ashwalker + +/datum/unit_test/breath_sanity_ashwalker/Run() + var/mob/living/carbon/human/species/lizard/ashwalker/lab_rat = allocate(/mob/living/carbon/human/species/lizard/ashwalker) + + //Prep the mob + lab_rat.forceMove(run_loc_floor_bottom_left) + + var/turf/open/to_fill = run_loc_floor_bottom_left + //Prep the floor + to_fill.initial_gas_mix = LAVALAND_DEFAULT_ATMOS + to_fill.air = new + to_fill.air.copy_from_turf(to_fill) + + lab_rat.breathe() + + TEST_ASSERT(!lab_rat.has_alert("not_enough_oxy"), "Ashwalkers can't get a full breath from the Lavaland's initial_gas_mix on a turf") + +/datum/unit_test/breath_sanity_ashwalker/Destroy() + //Reset initial_gas_mix to avoid future issues on other tests + var/turf/open/to_fill = run_loc_floor_bottom_left + to_fill.initial_gas_mix = OPENTURF_DEFAULT_ATMOS + return ..()