Merge pull request #10455 from Ghommie/Ghommie-cit501
Porting some runtime fixes.
This commit is contained in:
@@ -700,10 +700,10 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
/obj/item/pda/proc/remove_id()
|
||||
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
/obj/item/pda/proc/remove_id(mob/user)
|
||||
if(issilicon(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
do_remove_id(usr)
|
||||
do_remove_id(user)
|
||||
|
||||
/obj/item/pda/proc/do_remove_id(mob/user)
|
||||
if(!id)
|
||||
@@ -827,23 +827,23 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
/obj/item/pda/proc/create_message(mob/living/U, obj/item/pda/P)
|
||||
send_message(U,list(P))
|
||||
|
||||
/obj/item/pda/AltClick()
|
||||
/obj/item/pda/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(id)
|
||||
remove_id()
|
||||
remove_id(user)
|
||||
playsound(src, 'sound/machines/terminal_eject_disc.ogg', 50, 1)
|
||||
else
|
||||
remove_pen()
|
||||
remove_pen(user)
|
||||
playsound(src, 'sound/machines/button4.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/pda/CtrlClick()
|
||||
/obj/item/pda/CtrlClick(mob/user)
|
||||
..()
|
||||
|
||||
if(isturf(loc)) //stops the user from dragging the PDA by ctrl-clicking it.
|
||||
return
|
||||
|
||||
remove_pen()
|
||||
remove_pen(user)
|
||||
|
||||
/obj/item/pda/verb/verb_toggle_light()
|
||||
set category = "Object"
|
||||
@@ -857,7 +857,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
set src in usr
|
||||
|
||||
if(id)
|
||||
remove_id()
|
||||
remove_id(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This PDA does not have an ID in it!</span>")
|
||||
|
||||
@@ -896,7 +896,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
/obj/item/pda/proc/id_check(mob/user, obj/item/card/id/I)
|
||||
if(!I)
|
||||
if(id && (src in user.contents))
|
||||
remove_id()
|
||||
remove_id(user)
|
||||
return TRUE
|
||||
else
|
||||
var/obj/item/card/id/C = user.get_active_held_item()
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/obj/structure/grille/attack_animal(mob/user)
|
||||
. = ..()
|
||||
if(!shock(user, 70))
|
||||
if(!shock(user, 70) && !QDELETED(src)) //Last hit still shocks but shouldn't deal damage to the grille)
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_paw(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user