Partial breathing refactor

Reorganizes breathing, and moves common human/monkey breathing code into
carbon. handle_breath() is largely unchanged.
Removes unnecessary handle_internal_lifeform().
Fixes monkies being held by people in mecha in space not being able to breathe.
This commit is contained in:
mwerezak
2015-03-08 01:52:40 -05:00
parent b730e8309e
commit b71f6c1121
10 changed files with 124 additions and 233 deletions

View File

@@ -220,7 +220,7 @@
/datum/gas_mixture/proc/remove_ratio(ratio, out_group_multiplier = 1)
if(ratio <= 0)
return null
out_group_multiplier = max(1, min(group_multiplier, out_group_multiplier))
out_group_multiplier = between(1, out_group_multiplier, group_multiplier)
ratio = min(ratio, 1)
@@ -237,6 +237,11 @@
return removed
//Removes a volume of gas from the mixture and returns a gas_mixture containing the removed air with the given volume
/datum/gas_mixture/proc/remove_volume(removed_volume)
var/datum/gas_mixture/removed = remove_ratio(removed_volume/volume, 1)
removed.volume = removed_volume
return removed
//Removes moles from the gas mixture, limited by a given flag. Returns a gax_mixture containing the removed air.
/datum/gas_mixture/proc/remove_by_flag(flag, amount)