Fix some poor intercom code

This commit is contained in:
Bjorn Neergaard
2016-02-12 00:11:50 -06:00
parent 8619725ab0
commit ad6f0cb157
@@ -58,14 +58,11 @@
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
last_tick = world.timeofday
if(!src.loc)
var/area/A = get_area_master(src)
if(!A || emped)
on = 0
else
var/area/A = src.loc.loc
if(!A || !isarea(A) || !A.master || emped)
on = 0
else
on = A.master.powered(EQUIP) // set "on" to the power status
on = A.powered(EQUIP) // set "on" to the power status
if(!on)
icon_state = "intercom-p"