From 5c44cc22f481fece783803a0255dd67ba9ec4801 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 13 Jun 2021 00:54:15 -0700 Subject: [PATCH] attempt examinate --- code/_onclick/click.dm | 3 +++ code/modules/keybindings/keybind/mob.dm | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 935fbce301..d24aa06806 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -288,6 +288,9 @@ return /atom/proc/ShiftClick(mob/user) + attempt_examinate(user) + +/atom/proc/attempt_examinate(mob/user) var/flags = SEND_SIGNAL(src, COMSIG_CLICK_SHIFT, user) | SEND_SIGNAL(user, COMSIG_MOB_CLICKED_SHIFT_ON, src) if(!(flags & COMPONENT_DENY_EXAMINATE) && user.client && (user.client.eye == user || user.client.eye == user.loc || flags & COMPONENT_ALLOW_EXAMINATE)) user.examinate(src) diff --git a/code/modules/keybindings/keybind/mob.dm b/code/modules/keybindings/keybind/mob.dm index 257ccc37e6..85862ee14f 100644 --- a/code/modules/keybindings/keybind/mob.dm +++ b/code/modules/keybindings/keybind/mob.dm @@ -76,3 +76,15 @@ else user.mob.dropItemToGround(I) return TRUE + +/datum/keybinding/mob/examine_immediate + hotkey_keys = list() + classic_keys = list() + name = "examine_immediate" + full_name = "Examine (Immediate)" + description = "Immediately examine anything you're hovering your mouse over." + +/datum/keybinding/mob/examine_immediate/down(client/user) + var/atom/A = user.mosueObject + if(A) + A.attempt_examinate(user.mob))