Cleans up drop_from_inventory overrides.

This commit is contained in:
MistakeNot4892
2023-01-21 22:34:10 +11:00
parent 1b8c017cc9
commit 476af103ac
4 changed files with 8 additions and 22 deletions
+3 -6
View File
@@ -149,10 +149,8 @@ var/global/list/slot_equipment_priority = list( \
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/target)
if(W)
remove_from_mob(W, target)
if(!(W && W.loc))
return 1 // self destroying objects (tk, grabs)
return 1
return 0
return TRUE
return FALSE
//Drops the item in our left hand
/mob/proc/drop_l_hand(var/atom/Target)
@@ -222,8 +220,7 @@ var/global/list/slot_equipment_priority = list( \
else
I.dropInto(drop_location())
I.dropped(src)
return 1
return TRUE
//Returns the item equipped to the specified slot, if any.
/mob/proc/get_equipped_item(var/slot)
@@ -1387,10 +1387,8 @@
to_chat(S, "<span class='danger'>[U] pops your [current_limb.joint] back in!</span>")
current_limb.relocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in organs)
return
..()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/target = null)
return !(W in organs) && ..()
/mob/living/carbon/human/reset_view(atom/A, update_hud = 1)
..()
+2 -4
View File
@@ -714,10 +714,8 @@
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
return FALSE
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in internal_organs)
return
..()
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/target = null)
return !(W in internal_organs) && ..()
/mob/living/touch_map_edge()
+1 -8
View File
@@ -135,13 +135,6 @@
to_chat(src, "<span class='danger'>Your [hand_form] are not fit for use of \the [display_name].</span>")
return humanoid_hands
/mob/living/simple_mob/drop_from_inventory(var/obj/item/W, var/atom/target = null)
. = ..(W, target)
if(!target)
target = src.loc
if(.)
W.forceMove(src.loc)
/mob/living/simple_mob/is_holding_item_of_type(typepath)
for(var/obj/item/I in list(l_hand, r_hand))
if(istype(I, typepath))
@@ -153,4 +146,4 @@
if(l_hand)
. += l_hand
if(r_hand)
. += r_hand
. += r_hand