diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 216f0f0ff1..bdaa8b6714 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -516,6 +516,13 @@ to_chat(usr, "Successfully added comment.") return to_chat(usr, "Unable to locate a data core entry for this person.") + + if(href_list["lookitem"]) //It's for the show item at sandcode/code/modules/mob/living/carbon/show.dm + var/obj/item/I = locate(href_list["lookitem"]) + if(I in view(4)) + src.examinate(I) + else + to_chat(usr, "You need to get closer to examine that!") /mob/living/carbon/human/proc/canUseHUD() return CHECK_MOBILITY(src, MOBILITY_UI) diff --git a/sandcode/code/modules/keybindings/keybind/carbon.dm b/sandcode/code/modules/keybindings/keybind/carbon.dm new file mode 100644 index 0000000000..b3bdcb2cf5 --- /dev/null +++ b/sandcode/code/modules/keybindings/keybind/carbon.dm @@ -0,0 +1,12 @@ +/datum/keybinding/carbon/showoff + hotkey_keys = list("Unbound") + name = "showoff" + full_name = "Show your held item" + description = "Show your held item, people close to you can examine it, \ + if you're not holding anything, you'll show your arm." + category = CATEGORY_CARBON + +/datum/keybinding/carbon/showoff/down(client/user) + var/mob/living/carbon/L = user.mob + L.showoff() + return TRUE diff --git a/sandcode/code/modules/mob/living/give.dm b/sandcode/code/modules/mob/living/carbon/give.dm similarity index 97% rename from sandcode/code/modules/mob/living/give.dm rename to sandcode/code/modules/mob/living/carbon/give.dm index fdccc451ee..97723bc85d 100644 --- a/sandcode/code/modules/mob/living/give.dm +++ b/sandcode/code/modules/mob/living/carbon/give.dm @@ -1,4 +1,4 @@ -/mob/living/verb/give() +/mob/living/carbon/verb/give() set category = "IC" set name = "Give" set desc = "Give something to someone!" @@ -6,7 +6,7 @@ give_item(usr) -/mob/living/proc/give_item(mob/living/carbon/user) +/mob/living/carbon/proc/give_item(mob/living/carbon/user) /mob/living/carbon/give_item(mob/living/carbon/user) diff --git a/sandcode/code/modules/mob/living/carbon/show.dm b/sandcode/code/modules/mob/living/carbon/show.dm new file mode 100644 index 0000000000..0a05154bda --- /dev/null +++ b/sandcode/code/modules/mob/living/carbon/show.dm @@ -0,0 +1,18 @@ +/obj/item/proc/showoff(mob/user) + for(var/mob/M in view(user)) + M.show_message("[user] holds up [src]. Take a closer look.", 1) + +/mob/living/carbon/verb/show_item() + set name = "Show Held Item" + set category = "Object" + set desc = "Show the thing you're holding." + + showoff(usr) + +/mob/living/carbon/proc/showoff() + var/obj/item/I = get_active_held_item() + var/obj/item/arm = get_active_hand() + if(!I) + usr.show_message("[usr] holds up [arm].", 1) + else if(!HAS_TRAIT(I, ABSTRACT_ITEM_TRAIT)) + I.showoff(src) diff --git a/tgstation.dme b/tgstation.dme index 84795df555..6ea483fe53 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3611,6 +3611,7 @@ #include "sandcode\code\modules\custom_loadout\custom_items.dm" #include "sandcode\code\modules\hydroponics\grown\misc.dm" #include "sandcode\code\modules\integrated_electronics\subtypes\output.dm" +#include "sandcode\code\modules\keybindings\keybind\carbon.dm" #include "sandcode\code\modules\language\dragon.dm" #include "sandcode\code\modules\language\language.dm" #include "sandcode\code\modules\mining\machine_bluespaceminer.dm" @@ -3623,10 +3624,11 @@ #include "sandcode\code\modules\mob\dead\observer\observer.dm" #include "sandcode\code\modules\mob\living\combat_indicator.dm" #include "sandcode\code\modules\mob\living\emote.dm" -#include "sandcode\code\modules\mob\living\give.dm" #include "sandcode\code\modules\mob\living\say.dm" #include "sandcode\code\modules\mob\living\ssd_indicator.dm" #include "sandcode\code\modules\mob\living\typing_indicator_overrides.dm" +#include "sandcode\code\modules\mob\living\carbon\give.dm" +#include "sandcode\code\modules\mob\living\carbon\show.dm" #include "sandcode\code\modules\mob\living\simple_animal\friendly\doges.dm" #include "sandcode\code\modules\mob\living\simple_animal\hostile\megafauna\blood_drunk_miner.dm" #include "sandcode\code\modules\mob\living\simple_animal\hostile\megafauna\bubblegum.dm"