mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-20 11:32:51 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user