Fix safe...?

Conflicts:
	code/game/objects/objs.dm
This commit is contained in:
Rob Nelson
2014-06-05 16:21:26 -04:00
committed by ZomgPonies
parent 5649e2c34d
commit 0762e137ab
3 changed files with 24 additions and 19 deletions
+23 -19
View File
@@ -65,27 +65,31 @@
/obj/proc/updateUsrDialog()
if(in_use)
var/is_in_use = 0
var/list/nearby = viewers(1, src)
for(var/mob/M in _using.Copy()) // Only check things actually messing with us.
if (!M || !M.client || M.machine != src)
_using.Remove(M)
continue
if(_using.len)
var/list/nearby = viewers(1, src)
for(var/mob/M in _using.Copy()) // Only check things actually messing with us.
if (!M || !M.client || M.machine != src)
_using.Remove(M)
continue
if(!M in nearby) // NOT NEARBY
// AIs/Robots can do shit from afar.
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
is_in_use = 1
src.attack_ai(M)
if(!M in nearby) // NOT NEARBY
// AIs/Robots can do shit from afar.
if (isAI(M) || isrobot(M))
is_in_use = 1
src.attack_ai(M)
// check for TK users
else if (istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab))
if(usr.client && usr.machine==src)
// check for TK users
else if (ishuman(M))
if(istype(M.l_hand, /obj/item/tk_grab) || istype(M.r_hand, /obj/item/tk_grab))
is_in_use = 1
src.attack_hand(usr)
else // EVERYTHING FROM HERE DOWN MUST BE NEARBY
is_in_use = 1
attack_hand(usr)
src.attack_hand(M)
else
// Remove.
_using.Remove(M)
continue
else // EVERYTHING FROM HERE DOWN MUST BE NEARBY
is_in_use = 1
attack_hand(M)
in_use = is_in_use
/obj/proc/updateDialog()
@@ -145,4 +149,4 @@
var/rendered = "<span class='game say'><span class='name'>[M.name]: </span> <span class='message'>[text]</span></span>"
mo.show_message(rendered, 2)
*/
return
return
+1
View File
@@ -83,6 +83,7 @@ FLOOR SAFES
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
dat += "</table></center>"
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
onclose(user, "safe")
/obj/structure/safe/Topic(href, href_list)