mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Emptying other players inv puts item in your hands
This commit is contained in:
@@ -61,23 +61,11 @@
|
||||
//Puts the item our active hand if possible. Failing that it tries our inactive hand. Returns 1 on success.
|
||||
//If both fail it drops it on the floor and returns 0.
|
||||
//This is probably the main one you need to know :)
|
||||
/mob/proc/put_in_hands(var/obj/item/W)
|
||||
if(!W) return 0
|
||||
if(put_in_active_hand(W))
|
||||
update_inv_l_hand()
|
||||
update_inv_r_hand()
|
||||
return 1
|
||||
else if(put_in_inactive_hand(W))
|
||||
update_inv_l_hand()
|
||||
update_inv_r_hand()
|
||||
return 1
|
||||
else
|
||||
W.loc = get_turf(src)
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped()
|
||||
return 0
|
||||
|
||||
|
||||
//Just puts stuff on the floor for most mobs, since all mobs have hands but putting stuff in the AI/corgi/ghost hand is VERY BAD.
|
||||
/mob/proc/put_in_hands(obj/item/W)
|
||||
W.loc = get_turf(src)
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped()
|
||||
|
||||
/mob/proc/drop_item_v() //this is dumb.
|
||||
if(stat == CONSCIOUS && isturf(loc))
|
||||
|
||||
@@ -553,7 +553,7 @@
|
||||
if(do_mob(usr, src, STRIP_DELAY))
|
||||
if(pocket_item)
|
||||
u_equip(pocket_item)
|
||||
if(pickpocket) usr.put_in_hands(pocket_item)
|
||||
usr.put_in_hands(pocket_item)
|
||||
else
|
||||
if(place_item)
|
||||
usr.u_equip(place_item)
|
||||
|
||||
@@ -326,13 +326,20 @@
|
||||
src.u_equip(W)
|
||||
W.loc = src.back
|
||||
else
|
||||
src << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
src << "<span class='warning'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>"
|
||||
return
|
||||
|
||||
W.layer = 20
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/put_in_hands(obj/item/W)
|
||||
if(!W) return 0
|
||||
if(put_in_active_hand(W)) return 1
|
||||
else if(put_in_inactive_hand(W)) return 1
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/effect/equip_e
|
||||
name = "equip e"
|
||||
var/mob/source = null
|
||||
@@ -785,4 +792,6 @@ It can still be worn/put on as normal.
|
||||
return l_hand
|
||||
if(slot_r_hand)
|
||||
return r_hand
|
||||
return null
|
||||
return null
|
||||
|
||||
|
||||
|
||||
@@ -233,4 +233,11 @@
|
||||
|
||||
W.layer = 20
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/put_in_hands(obj/item/W)
|
||||
if(!W) return 0
|
||||
if(put_in_active_hand(W)) return 1
|
||||
else if(put_in_inactive_hand(W)) return 1
|
||||
else
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user