- Added null checks for get_mobs_in_radio_range().

- Added a check to EI NATH for humans who are brainless.
- Fixed fires runtiming. When I replaced del(src) with a garbage collecting proc, I forgot to return afterwards so the rest of the code didn't execute.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5567 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2013-01-17 06:52:49 +00:00
parent 388dfd8bc3
commit 015b19f800
4 changed files with 18 additions and 17 deletions

View File

@@ -97,12 +97,15 @@
var/turf/simulated/floor/location = loc
if(!istype(location))
Kill()
return
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
Kill()
return
if(location.air.toxins < 0.5 || location.air.oxygen < 0.5)
Kill()
return
perform_exposure()

View File

@@ -156,7 +156,7 @@ turf/simulated
else
air_master.active_singletons.Remove(src)
if(active_hotspot)
del(active_hotspot)
active_hotspot.Kill()
if(blocks_air)
for(var/direction in list(NORTH, SOUTH, EAST, WEST))
var/turf/simulated/tile = get_step(src,direction)

View File

@@ -192,29 +192,25 @@
set background = 1
. = list()
// Returns a list of mobs who can hear any of the radios given in @radios
var/list/speaker_coverage = list()
for(var/i = 1; i <= radios.len; i++)
var/obj/item/device/radio/R = radios[i]
var/turf/speaker = get_turf(R)
if(R)
var/turf/speaker = get_turf(R)
if(speaker)
for(var/turf/T in hear(R.canhear_range,speaker))
speaker_coverage[T] = T
if(speaker)
for(var/turf/T in hear(R.canhear_range,speaker))
speaker_coverage[T] = T
// Try to find all the players who can hear the message
for(var/i = 1; i <= player_list.len; i++)
var/mob/M = player_list[i]
var/turf/ear = get_turf(M)
if(ear)
if(speaker_coverage[ear])
. |= M
if(M)
var/turf/ear = get_turf(M)
if(ear)
if(speaker_coverage[ear])
. |= M
return .
#define SIGN(X) ((X<0)?-1:1)

View File

@@ -25,8 +25,10 @@
target.gib()
if("gib_brain")
if(ishuman(target) || ismonkey(target))
var/obj/item/brain/B = new(target.loc)
B.transfer_identity(target)
var/mob/living/carbon/C = target
if(C.brain_op_stage != 4) // Their brain is already taken out
var/obj/item/brain/B = new(C.loc)
B.transfer_identity(C)
target.gib()
if("disintegrate")
target.dust()