Fixes being able to insert hand emote items (kisses, slappers, etc) into storage (#65169)

Gives hand emote items (kisses, slappers, etc) `TRAIT_NO_STORAGE_INSERT`
Makes evidence bags respect `TRAIT_NO_STORAGE_INSERT`
This commit is contained in:
John Willard
2022-03-05 19:39:00 -06:00
committed by GitHub
parent c16f48aa2a
commit 3936229f86
9 changed files with 62 additions and 64 deletions
@@ -662,7 +662,7 @@
to_chat(src, span_danger("You fail to grasp your [grasped_part.name]."))
return
var/obj/item/self_grasp/grasp = new
var/obj/item/hand_item/self_grasp/grasp = new
if(starting_hand_index != active_hand_index || !put_in_active_hand(grasp))
to_chat(src, span_danger("You fail to grasp your [grasped_part.name]."))
QDEL_NULL(grasp)
@@ -670,13 +670,11 @@
grasp.grasp_limb(grasped_part)
/// an abstract item representing you holding your own limb to staunch the bleeding, see [/mob/living/carbon/proc/grabbedby] will probably need to find somewhere else to put this.
/obj/item/self_grasp
/obj/item/hand_item/self_grasp
name = "self-grasp"
desc = "Sometimes all you can do is slow the bleeding."
icon_state = "latexballon"
inhand_icon_state = "nothing"
force = 0
throwforce = 0
slowdown = 1
item_flags = DROPDEL | ABSTRACT | NOBLUDGEON | SLOWS_WHILE_IN_HAND | HAND_ITEM
/// The bodypart we're staunching bleeding on, which also has a reference to us in [/obj/item/bodypart/var/grasped_by]
@@ -684,7 +682,7 @@
/// The carbon who owns all of this mess
var/mob/living/carbon/user
/obj/item/self_grasp/Destroy()
/obj/item/hand_item/self_grasp/Destroy()
if(user)
to_chat(user, span_warning("You stop holding onto your[grasped_part ? " [grasped_part.name]" : "self"]."))
UnregisterSignal(user, COMSIG_PARENT_QDELETING)
@@ -696,12 +694,12 @@
return ..()
/// The limb or the whole damn person we were grasping got deleted or dismembered, so we don't care anymore
/obj/item/self_grasp/proc/qdel_void()
/obj/item/hand_item/self_grasp/proc/qdel_void()
SIGNAL_HANDLER
qdel(src)
/// We've already cleared that the bodypart in question is bleeding in [the place we create this][/mob/living/carbon/proc/grabbedby], so set up the connections
/obj/item/self_grasp/proc/grasp_limb(obj/item/bodypart/grasping_part)
/obj/item/hand_item/self_grasp/proc/grasp_limb(obj/item/bodypart/grasping_part)
user = grasping_part.owner
if(!istype(user))
stack_trace("[src] attempted to try_grasp() with [istype(user, /datum) ? user.type : isnull(user) ? "null" : user] user")
+9 -9
View File
@@ -46,18 +46,18 @@
if(!iscarbon(user) || user.usable_hands < 2)
return FALSE
return ..()
/datum/emote/living/carbon/circle
key = "circle"
key_third_person = "circles"
hands_use_check = TRUE
/datum/emote/living/carbon/circle/run_emote(mob/user, params, type_override, intentional)
. = ..()
if(!length(user.get_empty_held_indexes()))
to_chat(user, span_warning("You don't have any free hands to make a circle with."))
return
var/obj/item/circlegame/N = new(user)
var/obj/item/hand_item/circlegame/N = new(user)
if(user.put_in_hands(N))
to_chat(user, span_notice("You make a circle with your hand."))
@@ -67,7 +67,7 @@
message = "moans!"
message_mime = "appears to moan!"
emote_type = EMOTE_AUDIBLE
/datum/emote/living/carbon/noogie
key = "noogie"
key_third_person = "noogies"
@@ -77,7 +77,7 @@
. = ..()
if(!.)
return
var/obj/item/noogie/noogie = new(user)
var/obj/item/hand_item/noogie/noogie = new(user)
if(user.put_in_hands(noogie))
to_chat(user, span_notice("You ready your noogie'ing hand."))
else
@@ -104,7 +104,7 @@
message_param = "signs the number %t."
mob_type_allowed_typecache = list(/mob/living/carbon/alien)
hands_use_check = TRUE
/datum/emote/living/carbon/sign/select_param(mob/user, params)
. = ..()
if(!isnum(text2num(params)))
@@ -116,18 +116,18 @@
message_param = "raises %t fingers."
mob_type_allowed_typecache = list(/mob/living/carbon/human)
hands_use_check = TRUE
/datum/emote/living/carbon/slap
key = "slap"
key_third_person = "slaps"
hands_use_check = TRUE
cooldown = 3 SECONDS // to prevent endless table slamming
/datum/emote/living/carbon/slap/run_emote(mob/user, params, type_override, intentional)
. = ..()
if(!.)
return
var/obj/item/slapper/N = new(user)
var/obj/item/hand_item/slapper/N = new(user)
if(user.put_in_hands(N))
to_chat(user, span_notice("You ready your slapping hand."))
else
+2 -2
View File
@@ -202,10 +202,10 @@
. = ..()
if(!.)
return
var/kiss_type = /obj/item/kisser
var/kiss_type = /obj/item/hand_item/kisser
if(HAS_TRAIT(user, TRAIT_KISS_OF_DEATH))
kiss_type = /obj/item/kisser/death
kiss_type = /obj/item/hand_item/kisser/death
var/obj/item/kiss_blower = new kiss_type(user)
if(user.put_in_hands(kiss_blower))