mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Replaces uses of u_equip() with remove_from_mob() or drop_from_inventory(), where appropriate.
This commit is contained in:
@@ -173,6 +173,7 @@ var/list/slot_equipment_priority = list( \
|
||||
//Removes the object from any slots the mob might have, calling the appropriate icon update proc.
|
||||
//Does nothing else.
|
||||
//DO NOT CALL THIS PROC DIRECTLY. It is meant to be called only by other inventory procs.
|
||||
//The only exception to this is if you are transferring the item between slots on the same mob.
|
||||
//As far as I can tell the proc exists so that mobs with different inventory slots can override
|
||||
//the search through all the slots, without having to duplicate the rest of the item dropping.
|
||||
/mob/proc/u_equip(obj/W as obj)
|
||||
|
||||
@@ -301,16 +301,9 @@
|
||||
|
||||
if(!item) return //Grab processing has a chance of returning null
|
||||
|
||||
item.layer = initial(item.layer)
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
|
||||
if (istype(usr, /mob/living/carbon)) //Check if a carbon mob is throwing. Modify/remove this line as required.
|
||||
item.loc = src.loc
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
if(istype(item, /obj/item))
|
||||
item:dropped(src) // let it know it's been dropped
|
||||
|
||||
src.remove_from_mob(item)
|
||||
item.loc = src.loc
|
||||
|
||||
//actually throw it!
|
||||
if (item)
|
||||
|
||||
@@ -73,7 +73,7 @@ emp_act
|
||||
if(c_hand && (stun_amount || agony_amount > 10))
|
||||
msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect")
|
||||
|
||||
u_equip(c_hand)
|
||||
drop_from_inventory(c_hand)
|
||||
if (affected.status & ORGAN_ROBOT)
|
||||
emote("me", 1, "drops what they were holding, their [affected.display_name] malfunctioning!")
|
||||
else
|
||||
|
||||
@@ -81,13 +81,7 @@
|
||||
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
|
||||
return
|
||||
var/obj/item/W = target.wear_mask
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
target.drop_from_inventory(W)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/clothing/mask))
|
||||
@@ -99,13 +93,7 @@
|
||||
if("l_hand")
|
||||
if (target.l_hand)
|
||||
var/obj/item/W = target.l_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
target.drop_from_inventory(W)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
@@ -119,13 +107,7 @@
|
||||
if("r_hand")
|
||||
if (target.r_hand)
|
||||
var/obj/item/W = target.r_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
target.drop_from_inventory(W)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
@@ -139,13 +121,7 @@
|
||||
if("back")
|
||||
if (target.back)
|
||||
var/obj/item/W = target.back
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
target.target.drop_from_inventory(W)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if ((istype(item, /obj/item) && item.slot_flags & SLOT_BACK ))
|
||||
@@ -157,13 +133,7 @@
|
||||
if("handcuff")
|
||||
if (target.handcuffed)
|
||||
var/obj/item/W = target.handcuffed
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
target.target.drop_from_inventory(W)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/weapon/handcuffs))
|
||||
|
||||
Reference in New Issue
Block a user