mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
* Small update to check that user isn't null and that the spawned item is a /obj/item before trying to put it in the user's hand.
This commit is contained in:
@@ -55,7 +55,7 @@ var/list/uplink_items = list()
|
||||
if(!istype(U))
|
||||
return 0
|
||||
|
||||
if (user.stat || user.restrained())
|
||||
if (!user || user.stat || user.restrained())
|
||||
return 0
|
||||
|
||||
if (!( istype(user, /mob/living/carbon/human)))
|
||||
@@ -69,7 +69,7 @@ var/list/uplink_items = list()
|
||||
|
||||
var/obj/I = spawn_item(get_turf(user), U)
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(I, /obj/item) && ishuman(user))
|
||||
var/mob/living/carbon/human/A = user
|
||||
A.put_in_any_hand_if_possible(I)
|
||||
U.purchase_log += "[user] ([user.ckey]) bought [name]."
|
||||
|
||||
Reference in New Issue
Block a user