Fixes crate scanners working on crates stored on the crate shelves (#21579)

It caused some issues when a crate scanner was used on a crate on the
crate shelves. This prevents that behavior.
This commit is contained in:
Casper3667
2025-11-17 19:18:37 +00:00
committed by GitHub
parent 34875a3ab9
commit a41b9ccd06
2 changed files with 11 additions and 2 deletions
@@ -417,10 +417,13 @@
else if(istype(attacking_item, /obj/item/device/cratescanner))
var/obj/item/device/cratescanner/Cscanner = attacking_item
if(locked)
to_chat(user, SPAN_WARNING("[attacking_item] refuses to scan [src]. Unlock it first!"))
to_chat(user, SPAN_WARNING("[attacking_item] refuses to scan \the [src]. Unlock it first!"))
return
if(welded)
to_chat(user, SPAN_WARNING("[attacking_item] detects that [src] is welded shut, and refuses to scan."))
to_chat(user, SPAN_WARNING("[attacking_item] detects that \the [src] is welded shut, and refuses to scan."))
return
if(istype(loc, /obj/structure/crate_shelf))
to_chat(user, SPAN_WARNING("[attacking_item] can't scan \the [src] while it is on \the [loc]."))
return
Cscanner.print_contents(name, contents, src.loc)
else if(istype(attacking_item, /obj/item/stack/packageWrap))