Show Held Item

This commit is contained in:
Enric Gabriel
2020-08-12 11:30:55 -03:00
parent 6fa0249fbc
commit 3fbf8d71f4
5 changed files with 42 additions and 3 deletions
@@ -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
@@ -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)
@@ -0,0 +1,18 @@
/obj/item/proc/showoff(mob/user)
for(var/mob/M in view(user))
M.show_message("[user] holds up [src]. <a HREF=?src=\ref[M];lookitem=\ref[src]>Take a closer look.</a>", 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)