mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
Merge pull request #14936 from ItsSelis/selis-weakrefs
Little Weakref Refactor
This commit is contained in:
@@ -850,12 +850,12 @@
|
||||
plane = PLANE_PLAYER_HUD_ITEMS
|
||||
layer = 0.1
|
||||
alpha = 200
|
||||
var/weakref/held_item
|
||||
var/datum/weakref/held_item
|
||||
|
||||
/atom/movable/storage_slot/New(newloc, obj/item/held_item)
|
||||
ASSERT(held_item)
|
||||
name += held_item.name
|
||||
src.held_item = weakref(held_item)
|
||||
src.held_item = WEAKREF(held_item)
|
||||
|
||||
/atom/movable/storage_slot/Destroy()
|
||||
held_item = null
|
||||
@@ -898,4 +898,4 @@
|
||||
var/obj/item/weapon/holder/H = new user.holder_type(get_turf(user), user)
|
||||
src.handle_item_insertion(H, 1)
|
||||
to_chat(user, "<span class='notice'>You climb into \the [src].</span>")
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user