Fixes multiple holograms being active at the same time, fixes AI's being unable to set wanted status.

This commit is contained in:
Markolie
2016-10-09 18:20:20 +02:00
parent 55bb3e125b
commit 8a2a9ee3b0
4 changed files with 8 additions and 23 deletions
+4 -1
View File
@@ -90,12 +90,15 @@ var/const/HOLOPAD_MODE = 0
user.eyeobj.setLoc(get_turf(src))
else if(!hologram)//If there is no hologram, possibly make one.
activate_holo(user)
else if(master==user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing.
else if(master == user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing.
clear_holo()
return
/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user)
if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it.
if(user.holo)
var/obj/machinery/hologram/holopad/current = user.holo
current.clear_holo()
if(!hologram)//If there is not already a hologram.
create_holo(user)//Create one.
src.visible_message("A holographic image of [user] flicks to life right before your eyes!")