Modular items update tweak, Water Sponge vapor function
Changed modular items to update periodically though handle_fatness, not just when fatness is changed. Water Sponge vapor function restored and updated
This commit is contained in:
@@ -40,17 +40,22 @@
|
||||
var/mob/living/carbon/L = AM
|
||||
L.reagents.add_reagent(/datum/reagent/water, 3)
|
||||
|
||||
/* Disabling this for now.
|
||||
/mob/living/carbon/proc/water_check(datum/gas_mixture/breath)
|
||||
if(HAS_TRAIT(src, TRAIT_WATER_SPONGE))
|
||||
|
||||
/obj/item/organ/lungs/proc/water_check(datum/gas_mixture/breath, mob/living/carbon/human/H)
|
||||
if(HAS_TRAIT(H, TRAIT_WATER_SPONGE))
|
||||
if(breath)
|
||||
if(breath.gases)
|
||||
var/breath_gases = breath.gases
|
||||
if(breath_gases[/datum/gas/water_vapor])
|
||||
var/H2O_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/water_vapor])
|
||||
reagents.add_reagent(/datum/reagent/water, H2O_pp/10)
|
||||
breath_gases[/datum/gas/water_vapor] -= H2O_pp
|
||||
*/
|
||||
var/pressure = breath.return_pressure()
|
||||
var/total_moles = breath.total_moles()
|
||||
#define PP_MOLES(X) ((X / total_moles) * pressure)
|
||||
#define PP(air, gas) PP_MOLES(air.get_moles(gas))
|
||||
var/gas_breathed = PP(breath,GAS_H2O)
|
||||
if(gas_breathed > 0)
|
||||
H.reagents.add_reagent(/datum/reagent/water, gas_breathed)
|
||||
breath.adjust_moles(GAS_H2O, -gas_breathed)
|
||||
|
||||
/obj/item/organ/lungs/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
|
||||
water_check(breath, H)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/sink
|
||||
var/mob/living/attached
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/mob/living/carbon
|
||||
var/modular_items = list()
|
||||
|
||||
/mob/living/carbon/adjust_fatness(adjustment_amount, type_of_fattening = FATTENING_TYPE_ITEM)
|
||||
..()
|
||||
/mob/living/carbon/proc/handle_modular_items(adjustment_amount, type_of_fattening = FATTENING_TYPE_ITEM)
|
||||
for(var/obj/item/item in modular_items)
|
||||
item.update_modular_overlays(src)
|
||||
|
||||
|
||||
@@ -222,6 +222,7 @@
|
||||
|
||||
/datum/species/proc/handle_fatness(mob/living/carbon/human/H)
|
||||
handle_helplessness(H)
|
||||
H.handle_modular_items()
|
||||
|
||||
// update movement speed
|
||||
var/fatness_delay = 0
|
||||
|
||||
Reference in New Issue
Block a user