restrict food tray pickup items to food, fix sliceable tray click pickup (#29216)

This commit is contained in:
warriorstar-orion
2025-05-13 04:02:24 +00:00
committed by GitHub
parent 3756534fd6
commit cca96c5e15
2 changed files with 6 additions and 2 deletions
@@ -361,7 +361,11 @@
flags = CONDUCT
slot_flags = null
materials = list(MAT_METAL=3000)
cant_hold = list(/obj/item/disk/nuclear) // Prevents some cheesing
can_hold = list(
/obj/item/food,
/obj/item/reagent_containers/drinks,
/obj/item/reagent_containers/condiment,
)
/obj/item/storage/bag/tray/attack__legacy__attackchain(mob/living/M, mob/living/user)
..()
+1 -1
View File
@@ -330,7 +330,7 @@
if(istype(I, /obj/item/kitchen/knife) || istype(I, /obj/item/scalpel))
inaccurate = FALSE
else
return TRUE
return ..()
if(!isturf(loc) || !(locate(/obj/structure/table) in loc) && \
!(locate(/obj/machinery/optable) in loc) && !(locate(/obj/item/storage/bag/tray) in loc))
to_chat(user, "<span class='warning'>You cannot slice [src] here! You need a table or at least a tray to do it.</span>")