mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-20 11:48:49 +01:00
Show Held Item
This commit is contained in:
@@ -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
|
||||
+2
-2
@@ -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)
|
||||
Reference in New Issue
Block a user