Some A* and medbot sanity. (#39104)

* Adds some missing astar sanity.

* Also fixes where this came from.

* Actually let's notify when someone does something dumb like this.
This commit is contained in:
AnturK
2018-07-15 03:29:57 +03:00
committed by vuonojenmustaturska
parent 4b5debbe82
commit dc7edcca95
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -101,7 +101,10 @@ Actual Adjacent procs :
//sanitation
var/turf/end = get_turf(_end)
var/turf/start = get_turf(caller)
if((!start)||(start.z != end.z)||(start == end)) //no pathfinding between z levels
if(!start || !end)
stack_trace("Invalid A* start or destination")
return 0
if( start.z != end.z || start == end ) //no pathfinding between z levels
return 0
if(maxnodes)
//if start turf is farther than maxnodes from end turf, no need to do anything
@@ -287,7 +287,7 @@
oldpatient = patient
soft_reset()
if(!patient)
if(QDELETED(patient))
if(!shut_up && prob(1))
var/list/messagevoice = list("Radar, put a mask on!" = 'sound/voice/mradar.ogg',"There's always a catch, and I'm the best there is." = 'sound/voice/mcatch.ogg',"I knew it, I should've been a plastic surgeon." = 'sound/voice/msurgeon.ogg',"What kind of medbay is this? Everyone's dropping like flies." = 'sound/voice/mflies.ogg',"Delicious!" = 'sound/voice/mdelicious.ogg')
var/message = pick(messagevoice)