Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://github.com/tgstation/tgstation/pull/89146 #1230

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions code/_onclick/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,15 @@

/mob/living/silicon/ai/CtrlShiftClickOn(atom/A)
A.AICtrlShiftClick(src)

/mob/living/silicon/ai/ShiftClickOn(atom/A)
A.AIShiftClick(src)
if(A.AIShiftClick(src))
return
return ..()

/mob/living/silicon/ai/CtrlClickOn(atom/A, list/params)
A.AICtrlClick(src)

/mob/living/silicon/ai/AltClickOn(atom/A)
A.AIAltClick(src)

Expand All @@ -132,12 +137,15 @@

/* Atom Procs */
/atom/proc/AICtrlClick()
return
return FALSE

/atom/proc/AIAltClick(mob/living/silicon/ai/user)
AltClick(user)
return

/atom/proc/AIShiftClick()
return

/atom/proc/AICtrlShiftClick()
return

Expand All @@ -160,10 +168,11 @@

/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
if(obj_flags & EMAGGED)
return
return FALSE

user_toggle_open(usr)
log_touch(usr)
return TRUE

/obj/machinery/door/airlock/AICtrlShiftClick() // Sets/Unsets Emergency Access Override
if(obj_flags & EMAGGED)
Expand Down
8 changes: 8 additions & 0 deletions code/modules/mob/living/silicon/ai/freelook/eye.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
eyeobj.ai = src
eyeobj.setLoc(loc)
eyeobj.set_real_name("[name] (AI Eye)")
eyeobj.RegisterSignal(src, COMSIG_CLICK_SHIFT, TYPE_PROC_REF(/mob/camera/ai_eye, examinate_check))
set_eyeobj_visible(TRUE)

sense_of_self = image(eyeobj.icon, eyeobj, eyeobj.icon_state)
Expand All @@ -213,6 +214,13 @@
if(relay_speech && speaker && ai && !radio_freq && speaker != ai && near_camera(speaker))
ai.relay_speech(message, speaker, message_language, raw_message, radio_freq, spans, message_mods)

///Called when the AI shiftclicks on something to examinate it.
/mob/camera/ai_eye/proc/examinate_check(mob/user, atom/source)
SIGNAL_HANDLER

if(user.client.eye == src)
return COMPONENT_ALLOW_EXAMINATE

/obj/effect/overlay/ai_detect_hud
name = ""
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
Expand Down
Loading