mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Fix detective bag not always showing an item
This commit is contained in:
@@ -40,8 +40,7 @@
|
||||
if(!isturf(I.loc)) //If it isn't on the floor. Do some checks to see if it's in our hands or a box. Otherwise give up.
|
||||
if(istype(I.loc,/obj/item/weapon/storage)) //in a container.
|
||||
var/obj/item/weapon/storage/U = I.loc
|
||||
user.client.screen -= I
|
||||
U.contents.Remove(I)
|
||||
U.remove_from_storage(I, src)
|
||||
else if(user.l_hand == I) //in a hand
|
||||
user.drop_l_hand()
|
||||
else if(user.r_hand == I) //in a hand
|
||||
@@ -59,6 +58,7 @@
|
||||
I.pixel_x = 0 //then remove it so it'll stay within the evidence bag
|
||||
I.pixel_y = 0
|
||||
var/image/img = image("icon"=I, "layer"=FLOAT_LAYER) //take a snapshot. (necessary to stop the underlays appearing under our inventory-HUD slots ~Carn
|
||||
img.plane = FLOAT_PLANE
|
||||
I.pixel_x = xx //and then return it
|
||||
I.pixel_y = yy
|
||||
overlays += img
|
||||
@@ -69,7 +69,7 @@
|
||||
w_class = I.w_class
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/evidencebag/attack_self(mob/user as mob)
|
||||
/obj/item/weapon/evidencebag/attack_self(mob/user)
|
||||
if(contents.len)
|
||||
var/obj/item/I = contents[1]
|
||||
user.visible_message("<span class='notice'>[user] takes [I] out of [src].</span>", "<span class='notice'>You take [I] out of [src].</span>",\
|
||||
@@ -83,17 +83,16 @@
|
||||
else
|
||||
to_chat(user, "[src] is empty.")
|
||||
icon_state = "evidenceobj"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/evidence
|
||||
name = "evidence bag box"
|
||||
desc = "A box claiming to contain evidence bags."
|
||||
New()
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/evidence/New()
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
..()
|
||||
Reference in New Issue
Block a user