Merge pull request #2953 from comma/master

For for air alarms and bots
This commit is contained in:
Mloc
2013-06-02 06:16:12 -07:00
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -170,10 +170,10 @@
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click as a faint electronic humming stops.")
var/old_level = danger_level
danger_level = overall_danger_level()
if (alarm_area.master_air_alarm == src)
if (old_level != danger_level)
refresh_danger_level()
update_icon()
+1
View File
@@ -299,6 +299,7 @@
if(src.patient && src.path.len == 0 && (get_dist(src,src.patient) > 1))
spawn(0)
src.path = AStar(src.loc, get_turf(src.patient), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
if (!path) path = list()
if(src.path.len == 0)
src.oldpatient = src.patient
src.patient = null
+1 -1
View File
@@ -583,7 +583,7 @@ Auto Patrol: []"},
// given an optional turf to avoid
/obj/machinery/bot/secbot/proc/calc_path(var/turf/avoid = null)
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
if (!path) path = list()
// look for a criminal in view of the bot