mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-01 04:52:39 +00:00
- I attempted to group together some code in human.life() when I was doing the breathing updates. The code I wanted to group was the code that handles the situation when you are located inside another object - this code is copy-pasted into 4 places in this proc. So I started deleting them, but then abandoned the attempt. Apparently I did not press undo enough times, causing two of the code segments to be left out. This meant that only turfs now facilitated breaths, objects did so only in specific situations.
Thank you Noddie, love you! :) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4289 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -260,7 +260,10 @@
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(isturf(loc))
|
||||
if(isobj(loc))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(isturf(loc))
|
||||
var/breath_moles = 0
|
||||
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
|
||||
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
|
||||
@@ -293,6 +296,9 @@
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user