AI PDA tapping fix

An AI should no longer tap on a non-existing screen with its non-existing fingers while writing PDA messages.
This commit is contained in:
PsiOmega
2014-10-15 17:38:54 +02:00
parent cb6a27b93a
commit 68f4f1809e
+4 -4
View File
@@ -225,7 +225,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (!c) // if the user hasn't selected a PDA file we can't send a message
return
var/selected = plist[c]
create_message(usr, selected)
create_message(usr, selected, 0)
/obj/item/device/pda/ai/verb/cmd_toggle_pda_receiver()
@@ -879,9 +879,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
id.loc = get_turf(src)
id = null
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P)
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1)
if(tap)
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
U.last_target_click = world.time
var/t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)