Skip to content

Commit 5bea7bb

Browse files
authored
1 parent e42150f commit 5bea7bb

File tree

2 files changed

+20
-3
lines changed
  • code
    • _onclick
    • modules/mob/living/silicon/ai/freelook

2 files changed

+20
-3
lines changed

code/_onclick/ai.dm

+12-3
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,15 @@
117117

118118
/mob/living/silicon/ai/CtrlShiftClickOn(atom/A)
119119
A.AICtrlShiftClick(src)
120+
120121
/mob/living/silicon/ai/ShiftClickOn(atom/A)
121-
A.AIShiftClick(src)
122+
if(A.AIShiftClick(src))
123+
return
124+
return ..()
125+
122126
/mob/living/silicon/ai/CtrlClickOn(atom/A, list/params)
123127
A.AICtrlClick(src)
128+
124129
/mob/living/silicon/ai/AltClickOn(atom/A)
125130
A.AIAltClick(src)
126131

@@ -132,12 +137,15 @@
132137

133138
/* Atom Procs */
134139
/atom/proc/AICtrlClick()
135-
return
140+
return FALSE
141+
136142
/atom/proc/AIAltClick(mob/living/silicon/ai/user)
137143
AltClick(user)
138144
return
145+
139146
/atom/proc/AIShiftClick()
140147
return
148+
141149
/atom/proc/AICtrlShiftClick()
142150
return
143151

@@ -160,10 +168,11 @@
160168

161169
/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
162170
if(obj_flags & EMAGGED)
163-
return
171+
return FALSE
164172

165173
user_toggle_open(usr)
166174
log_touch(usr)
175+
return TRUE
167176

168177
/obj/machinery/door/airlock/AICtrlShiftClick() // Sets/Unsets Emergency Access Override
169178
if(obj_flags & EMAGGED)

code/modules/mob/living/silicon/ai/freelook/eye.dm

+8
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
eyeobj.ai = src
190190
eyeobj.setLoc(loc)
191191
eyeobj.set_real_name("[name] (AI Eye)")
192+
eyeobj.RegisterSignal(src, COMSIG_CLICK_SHIFT, TYPE_PROC_REF(/mob/camera/ai_eye, examinate_check))
192193
set_eyeobj_visible(TRUE)
193194

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

217+
///Called when the AI shiftclicks on something to examinate it.
218+
/mob/camera/ai_eye/proc/examinate_check(mob/user, atom/source)
219+
SIGNAL_HANDLER
220+
221+
if(user.client.eye == src)
222+
return COMPONENT_ALLOW_EXAMINATE
223+
216224
/obj/effect/overlay/ai_detect_hud
217225
name = ""
218226
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

0 commit comments

Comments
 (0)