Paranoid updates to maybe fix air duplication
This commit is contained in:
@@ -102,6 +102,12 @@
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/remove_air_ratio(ratio)
|
||||
if(loc)
|
||||
return loc.remove_air_ratio(ratio)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
@@ -116,8 +122,7 @@
|
||||
|
||||
if(breath_request>0)
|
||||
var/datum/gas_mixture/environment = return_air()
|
||||
var/breath_percentage = BREATH_VOLUME / environment.return_volume()
|
||||
return remove_air(environment.total_moles() * breath_percentage)
|
||||
return remove_air_ratio(BREATH_VOLUME / environment.return_volume())
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user