mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Destroyed items now use drop_from_inventory instead of unEquip. Reduces the risk of references being kept in case of held items.
This commit is contained in:
@@ -65,9 +65,10 @@
|
||||
/obj/item/Destroy()
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.unEquip(src, 1)
|
||||
m.drop_from_inventory(src)
|
||||
m.update_inv_r_hand()
|
||||
m.update_inv_l_hand()
|
||||
src.loc = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device
|
||||
@@ -604,4 +605,4 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
|
||||
/obj/item/proc/pwr_drain()
|
||||
return 0 // Process Kill
|
||||
return 0 // Process Kill
|
||||
|
||||
Reference in New Issue
Block a user