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 ..()