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
@@ -516,6 +516,13 @@
to_chat(usr, "<span class='notice'>Successfully added comment.</span>")
return
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
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, "<span class='warning'>You need to get closer to examine that!</span>")
/mob/living/carbon/human/proc/canUseHUD()
return CHECK_MOBILITY(src, MOBILITY_UI)
@@ -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)
+3 -1
View File
@@ -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"